refactor(mcms): inline set-config sequences and add idempotency keys#94
refactor(mcms): inline set-config sequences and add idempotency keys#94graham-chainlink wants to merge 1 commit into
Conversation
Collapse nested EVM and Solana set-config sequences into their MCMS runners while keeping manual operations, and scope operation idempotency per chain and target address for safer re-runs.
Release impact (release-please)
PR title: This title will not trigger a semver bump when squash-merged to Conventional commit → bump
Update the PR title before merge if you need a different bump (squash commit message = PR title). Preview is based on this PR title only. The release-please release PR may include other unreleased commits already on |
| } | ||
|
|
||
| // OpEVMSetConfigMCM sets MCMS config on an EVM MCM contract via the MCMS SDK configurer. | ||
| // TODO: this may be removed if we generate operations via operations gen tool. |
There was a problem hiding this comment.
after discussion, we decided to not use operations-gen cli for setconfig but instead use the mcms sdk
| ) | ||
|
|
||
| // SeqEVMSetConfigInput is the input for the generic EVM set-config sequence. | ||
| type SeqEVMSetConfigInput struct { |
There was a problem hiding this comment.
flattening this sequence into the parent sequence as this adds unnecessary extra layer of sequence
| ) | ||
|
|
||
| // SeqSolanaSetConfigInput is the input for the generic Solana set-config sequence. | ||
| type SeqSolanaSetConfigInput struct { |
There was a problem hiding this comment.
flattening this sequence into the parent sequence as this adds unnecessary extra layer of sequence
There was a problem hiding this comment.
Pull request overview
This PR refactors the MCMS set-config runners for both EVM and Solana by removing the nested Seq*SetConfig wrapper sequences, inlining their per-target execution logic directly into runEVMSetConfig / runSolanaSetConfig, and adding per-target idempotency keys.
Changes:
- Inline per-target
Op*SetConfigMCMexecution intorunEVMSetConfigandrunSolanaSetConfig, removing the exported wrapper sequences. - Add per-target operation idempotency keys scoped as
chainSelector:addressfor both EVM and Solana execution. - Update sequence tests to call the runners directly using
setconfig.ChainInputand provide MCMS input when running in proposal mode.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| mcms/solana/set-config/sequence.go | Removes the wrapper sequence, inlines per-target operation execution, adds idempotency keys, and keeps Solana batching behavior in MCMS mode. |
| mcms/solana/set-config/sequence_test.go | Updates tests to call runSolanaSetConfig directly via setconfig.ChainInput, including MCMS proposal input when applicable. |
| mcms/solana/set-config/operation_test.go | Renames the sequence test hook to the new runner-based test function. |
| mcms/evm/set-config/sequence.go | Removes the wrapper sequence, inlines per-target operation execution, adds idempotency keys, and preserves batch construction in MCMS mode. |
| mcms/evm/set-config/sequence_test.go | Updates tests to call runEVMSetConfig directly via setconfig.ChainInput and provide MCMS input in proposal mode. |
| mcms/evm/set-config/operation.go | Removes an outdated TODO comment now that wrappers/ops-gen direction has been clarified by the refactor. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|




Summary
SeqEVMSetConfigandSeqSolanaSetConfigwrappers and inline their logic intorunEVMSetConfigandrunSolanaSetConfig, keeping the existing manualOpEVMSetConfigMCMandOpSolanaSetConfigMCMoperations.chainSelector:addressfor both EVM and Solana set-config execution.setconfig.ChainInputand pass MCMS input when running in proposal mode.Why
This applies the set-config sequence cleanup from PR #93 without switching to operations-gen generated write operations. Inlining removes an unnecessary sequence layer while preserving direct-send vs MCMS proposal behavior, and idempotency keys make partial changeset re-runs safer when multiple MCM targets are configured on a chain.