feat(mcms): add Solana deploy changeset for MCMS with timelock [CLD-2719]#108
feat(mcms): add Solana deploy changeset for MCMS with timelock [CLD-2719]#108graham-chainlink wants to merge 1 commit into
Conversation
Release impact (release-please)
PR title: Merging this PR as-is will contribute a minor bump to the next release-please release PR. 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 |
There was a problem hiding this comment.
Pull request overview
Adds a Solana chain-family implementation of the MCMS “deploy with timelock” changeset, wiring it into the shared deploy registry and providing Solana operations + sequencing to deploy programs, initialize accounts/instances, and grant timelock roles.
Changes:
- Introduces a Solana deploy sequence that deploys/initializes AccessController, MCM instances, and Timelock, then configures role grants.
- Adds Solana-specific operations (deploy program, init AC account, init MCM instance, init timelock instance, setup roles) with idempotency handling.
- Adds Solana integration tests covering fresh and partial deployments.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| mcms/solana/deploy/sequence.go | Orchestrates the end-to-end Solana MCMS+timelock deployment flow and output metadata collection. |
| mcms/solana/deploy/operations.go | Implements Solana operations for deploying programs, initializing accounts/instances, and granting roles. |
| mcms/solana/deploy/register.go | Registers the Solana family implementation in the shared deploy registry and validates chain presence. |
| mcms/solana/deploy/idempotency.go | Adds chain-scoped idempotency key helper for operation caching. |
| mcms/solana/deploy/changeset_test.go | Solana integration tests for fresh deploy and partial deploy behavior. |
| mcms/solana/deploy/addresses.go | Loads existing deployed Solana addresses/seeds from the datastore with version/qualifier filtering. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5d4c0ad to
74276e1
Compare
74276e1 to
f79f36c
Compare
| mcmscontracts "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/contracts/mcms" | ||
|
|
||
| "github.com/smartcontractkit/cld-changesets/internal/semvers" | ||
| legacysolana "github.com/smartcontractkit/cld-changesets/legacy/pkg/family/solana" |
There was a problem hiding this comment.
this has to use some of the legacy code, but i think those are useful, considering to move them out of legacy pkg after this PR is merged
f79f36c to
4251a75
Compare
| ) (common.Address, bool) { | ||
| baseFilters := make([]cldfdatastore.FilterFunc[cldfdatastore.AddressRefKey, cldfdatastore.AddressRef], 0, 3) | ||
| baseFilters = append(baseFilters, | ||
| version := semvers.V1_0_0 |
There was a problem hiding this comment.
hardcoded version to be 1 for now, ideally user should specify the version they want (proposal util timelock config struct does not contain version field currently)
4251a75 to
61ad06b
Compare
61ad06b to
97025bc
Compare
|
| return refs | ||
| } | ||
|
|
||
| type fakeDataStore struct { |
There was a problem hiding this comment.
nit: we could use mockery to get a datastore mock and save ourselves a bit of code
There was a problem hiding this comment.
For simple use case, i prefer using stubs but i see your point about the duplication, so i ended moving the stub into internal/testutil so it can be reused, have a look.
| // opSetupTimelockRoles grants proposer/executor/canceller/bypasser roles on the timelock. | ||
| var opSetupTimelockRoles = operations.NewOperation( | ||
| "sol-setup-timelock-roles", | ||
| semver.MustParse("1.0.0"), | ||
| "Grant MCMS signer PDAs their roles on the Solana timelock", |
There was a problem hiding this comment.
Thinking if we should move this togrant-roles/ folder... I have a WIP adding the evm implementation here #104, solana is still pending but a portion of this might be used for the grant-role solana logic. Maybe not exactly the same since grant-role should allow arbitrary contracts and not force the specific
grants := []roleGrant{
{timelockBindings.Proposer_Role, []solanago.PublicKey{proposerPDA}, in.ProposerAC},
{timelockBindings.Executor_Role, []solanago.PublicKey{chain.DeployerKey.PublicKey()}, in.ExecutorAC},
{timelockBindings.Canceller_Role, []solanago.PublicKey{cancellerPDA, proposerPDA, bypasserPDA}, in.CancellerAC},
{timelockBindings.Bypasser_Role, []solanago.PublicKey{bypasserPDA}, in.BypasserAC},
}structure used for the standard topology
There was a problem hiding this comment.
i see, once your solana PR goes in, i can update this to use the operation over there then? Same for EVM
| "github.com/stretchr/testify/require" | ||
| ) | ||
|
|
||
| func TestTimelockMinDelayUint64(t *testing.T) { |
There was a problem hiding this comment.
Should we add tests for each of the operations logic? just asserting the individual ixs are what we expect?
There was a problem hiding this comment.
I added more coverage on the integration tests instead of more unit test as i can test the end results.
97025bc to
64f6019
Compare
64f6019 to
0408440
Compare
0408440 to
efee063
Compare
…719] Register Solana in the MCMS deploy registry with an operations-based sequence that deploys programs, initializes accounts/instances, and grants timelock roles, matching the EVM deploy pattern.
efee063 to
e9a713b
Compare


Adds a Solana chain-family implementation for the deploy MCMS changeset
Closes CLD-2719.