vault: default qualifier, shared MCMS per chain, migration changeset#21232
Draft
vault: default qualifier, shared MCMS per chain, migration changeset#21232
Conversation
- Add DefaultTimelockQualifier ("default") and timelockQualifierFromConfig for
first timelock when qualifier omitted; duplicate (chain,qualifier) check.
- DeployTimelockInput + DeployMCMSWithTimelockV2FromInput with
SharedMCMSPerChain: reuse existing MCMS, deploy only RBACTimelock+CallProxy
for new qualifier when full set exists in datastore.
- FindQualifierWithFullMCMSSet + RequiredMCMSContractTypes in state/evm;
persist existing Bypasser/Canceller/Proposer to address book in timelock-only path.
- MigrateAddressRefsToDefaultQualifier changeset for one-off migration of
address refs to qualifier "default".
- Vault: GetContractAddressWithQualifier treats empty qualifier as "default";
batch_native, set_whitelist, transfer_erc20 support timelock_id/qualifier.
- prod_oev_mainnet unchanged (uses DeployMCMSWithTimelockV2, no qualifier).
Co-authored-by: Cursor <cursoragent@cursor.com>
|
|
ChrisAmora
reviewed
Feb 19, 2026
| } | ||
| byQualifier[q][datastore.ContractType(ref.Type)] = true | ||
| } | ||
| for q, typesSet := range byQualifier { |
Contributor
There was a problem hiding this comment.
I think we will need to skip the "" qualifier here if you keep this approach
| WhitelistByChain map[uint64][]WhitelistAddress `json:"whitelist_by_chain"` | ||
| // WhitelistByChain maps chain selector to the list of whitelisted addresses for that chain (legacy, default timelock). | ||
| // Use when only one timelock per chain or for the default/empty qualifier. | ||
| WhitelistByChain map[uint64][]WhitelistAddress `json:"whitelist_by_chain,omitempty"` |
Contributor
There was a problem hiding this comment.
I would remove this. It will be a bit of work but the code will become simpler
ChrisAmora
reviewed
Feb 19, 2026
| // on the given chains with qualifier DefaultTimelockQualifier ("default"). When the framework | ||
| // merges this into the environment, lookups by qualifier "default" will find these refs. | ||
| // Run once per environment; safe to run multiple times (adds refs, may duplicate if already migrated). | ||
| func MigrateAddressRefsToDefaultQualifier(env cldf.Environment, input MigrateAddressRefsToDefaultQualifierInput) (cldf.ChangesetOutput, error) { |
Contributor
There was a problem hiding this comment.
Maybe we could remove the whole complexity of adding this:
We could do: existing contracts are looked up by chain + type, new contracts get the new explicit qualifiers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.




Requires
Supports