Skip to content

feat(mcms): add Solana deploy changeset for MCMS with timelock [CLD-2719]#108

Open
graham-chainlink wants to merge 1 commit into
mainfrom
ggoh/CLD-2719/solana-mcms-deploy
Open

feat(mcms): add Solana deploy changeset for MCMS with timelock [CLD-2719]#108
graham-chainlink wants to merge 1 commit into
mainfrom
ggoh/CLD-2719/solana-mcms-deploy

Conversation

@graham-chainlink

@graham-chainlink graham-chainlink commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Adds a Solana chain-family implementation for the deploy MCMS changeset

Closes CLD-2719.

@graham-chainlink graham-chainlink requested a review from Copilot June 26, 2026 05:53
@github-actions

Copy link
Copy Markdown

Release impact (release-please)

Current version 0.7.1 (on main)
After merge 0.8.0 (minor bump)

PR title: feat(mcms): add Solana deploy changeset for MCMS with timelock [CLD-2719]

Merging this PR as-is will contribute a minor bump to the next release-please release PR.

Conventional commit → bump

Intent PR title prefix Bump
Bug fix fix: patch
New feature feat: minor
Breaking change feat!: / fix!: or BREAKING CHANGE: / BREAKING-CHANGE: in description major
No release chore:, docs:, ci:, refactor:, etc. none

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 main.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread mcms/solana/deploy/operations.go
Comment thread mcms/solana/deploy/operations.go Outdated
Comment thread mcms/solana/deploy/sequence.go Outdated
Comment thread mcms/solana/deploy/sequence.go Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comment thread mcms/solana/deploy/operations.go Outdated
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"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Comment thread mcms/solana/deploy/operations.go Outdated
Comment thread mcms/solana/deploy/operations.go
Comment thread mcms/solana/deploy/addresses.go Outdated
) (common.Address, bool) {
baseFilters := make([]cldfdatastore.FilterFunc[cldfdatastore.AddressRefKey, cldfdatastore.AddressRef], 0, 3)
baseFilters = append(baseFilters,
version := semvers.V1_0_0

@graham-chainlink graham-chainlink Jun 26, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Comment thread mcms/solana/deploy/idempotency.go
Comment thread mcms/solana/deploy/addresses.go Outdated
Comment thread mcms/evm/deploy/addresses.go Outdated
Comment thread mcms/evm/deploy/addresses.go
@graham-chainlink graham-chainlink marked this pull request as ready for review June 26, 2026 10:59
@graham-chainlink graham-chainlink requested a review from a team as a code owner June 26, 2026 10:59
@graham-chainlink graham-chainlink force-pushed the ggoh/CLD-2719/solana-mcms-deploy branch from 4251a75 to 61ad06b Compare June 26, 2026 11:00
@graham-chainlink graham-chainlink requested a review from Copilot June 26, 2026 11:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Comment thread mcms/solana/deploy/changeset_test.go Outdated
Comment thread mcms/solana/deploy/sequence.go Outdated
@graham-chainlink graham-chainlink force-pushed the ggoh/CLD-2719/solana-mcms-deploy branch from 61ad06b to 97025bc Compare June 26, 2026 11:11
@graham-chainlink graham-chainlink requested a review from ecPablo June 26, 2026 11:14
Comment thread mcms/solana/deploy/operations.go
@cl-sonarqube-production

Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
71.9% Coverage on New Code (required ≥ 75%)

See analysis details on SonarQube

ecPablo
ecPablo previously approved these changes Jun 26, 2026
Comment thread mcms/evm/deploy/addresses_test.go Outdated
return refs
}

type fakeDataStore struct {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we could use mockery to get a datastore mock and save ourselves a bit of code

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread mcms/solana/deploy/addresses_test.go Outdated
Comment on lines +291 to +295
// 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",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@graham-chainlink graham-chainlink Jun 29, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add tests for each of the operations logic? just asserting the individual ixs are what we expect?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added more coverage on the integration tests instead of more unit test as i can test the end results.

Copilot AI review requested due to automatic review settings June 29, 2026 06:02
@graham-chainlink graham-chainlink force-pushed the ggoh/CLD-2719/solana-mcms-deploy branch from 97025bc to 64f6019 Compare June 29, 2026 06:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Comment thread mcms/solana/deploy/addresses.go
Comment thread mcms/solana/deploy/addresses.go

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Comment thread mcms/solana/deploy/operations.go
…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.
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