Skip to content

Conversation

@SDavidson1177
Copy link
Contributor

@SDavidson1177 SDavidson1177 commented Oct 2, 2025

Description

The Coordinator v2's migration message allows you to optionally provide a prover address for each chain. Instead of defaulting to the prover address stored in the coordinator's state, this change causes the coordinator to use the provided prover address by default. Consequently, the provided prover addresses will be treated as overrides.

Reasoning

The migration process for coordinator v2 described here requires the multisig to be migrated to v2.3 first. Migrating the multisig to v2.3 removes any duplicate prover -> chain mappings from the multisig's state (migrating account chooses which provers to keep). When we then migrate to coordinator v2, the coordinator's chain -> prover mapping must be synchronized with the multisig's state in order to ensure the protocol continues to operate correctly. In the event that these maps differ on some chain/prover pair, as was the case on devnet-amplifier, this override will bring the coordinator's map to match with the multisig's map. The alternative would be to correct the coordinator's state afterwards by repeatedly calling RegisterChain, but we probably don't want this because it requires more manual intervention.

Convention Checklist

  • Each contract should have a client mod for others to interact with it.
  • Derive macros
  • The state mod and msg mod should use separate data structures so that internal state changes do not break the contract interface. Check out the interchain-token-service for reference.
    • msg.rs should never use any type from the state.rs
    • Shared types must be defined in a separate shared mod. If those types have already been defined somewhere else, then they should get re-exported in the shared mod

Note

Migration now uses provided prover_address over state, and fails with a list of chains if any registered provers are missing corresponding chain_contracts.

  • Migration logic:
    • Prefer provided prover_address over stored/state prover when saving ChainContracts.
    • Collect legacy provers into a HashMap and remove as processed; error if any remain.
    • Update MigrationError::MissingContracts to accept Vec<ChainName> and report all missing chains.
  • Tests:
    • Add test ensuring provided prover overrides state.
    • Add test asserting failure when registered provers lack corresponding contracts.

Written by Cursor Bugbot for commit 2558575. This will update automatically on new commits. Configure here.

@SDavidson1177 SDavidson1177 marked this pull request as ready for review October 2, 2025 21:19
@SDavidson1177 SDavidson1177 requested a review from a team as a code owner October 2, 2025 21:19
@codecov
Copy link

codecov bot commented Oct 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.56%. Comparing base (cd32cdd) to head (2558575).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1058      +/-   ##
==========================================
+ Coverage   92.55%   92.56%   +0.01%     
==========================================
  Files         283      283              
  Lines       59961    60049      +88     
==========================================
+ Hits        55495    55585      +90     
+ Misses       4466     4464       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SDavidson1177 SDavidson1177 merged commit f684fae into main Oct 3, 2025
13 checks passed
@SDavidson1177 SDavidson1177 deleted the fix/coordinator-default-multisig-prover branch October 3, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants