fix(coordinator): coordinator v2 migration defaults to multisig prover addresses #1058
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 -> chainmappings from the multisig's state (migrating account chooses which provers to keep). When we then migrate to coordinator v2, the coordinator'schain -> provermapping 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 callingRegisterChain, but we probably don't want this because it requires more manual intervention.Convention Checklist
sharedmod. If those types have already been defined somewhere else, then they should get re-exported in thesharedmodNote
Migration now uses provided
prover_addressover state, and fails with a list of chains if any registered provers are missing correspondingchain_contracts.prover_addressover stored/state prover when savingChainContracts.HashMapand remove as processed; error if any remain.MigrationError::MissingContractsto acceptVec<ChainName>and report all missing chains.Written by Cursor Bugbot for commit 2558575. This will update automatically on new commits. Configure here.