add TON support for OrchestrateChangesets#21570
add TON support for OrchestrateChangesets#21570huangzhen1997 wants to merge 4 commits intodevelopfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Risk Rating: HIGH — this extends shared proposal aggregation logic (AggregateProposalsV2) used across deployment tooling and introduces a new chain-family path (TON) that can affect how multi-chain MCMS timelock proposals are constructed.
This PR aims to add TON support to OrchestrateChangesets by wiring TON MCMS/timelock state into the aggregated proposal flow.
Changes:
- Add TON MCMS role selection (
MCMBasedOnActionTON) and TON support inAggregateProposalsV2. - Extend the on-chain state view to load TON MCMS state by chain.
- Attempt to pass TON MCMS state into
OrchestrateChangesetsaggregation.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
deployment/common/proposalutils/propose.go |
Adds TON MCMS role selection + adds TON branch to multi-family proposal aggregation. |
deployment/ccip/shared/stateview/state.go |
Adds a TON MCMS state loader method returning (map, error). |
deployment/ccip/changeset/cs_orchestrate_changesets.go |
Plumbs TON MCMS state into orchestration’s call to AggregateProposalsV2. |
Requires scrupulous human review:
deployment/common/proposalutils/propose.goTON aggregation branch (qualifier selection semantics and how TON timelock/MCMS addresses are derived).- End-to-end correctness of TON aggregated proposals given
buildProposalMetadataV2currently has no TON handling (metadata requirements should be confirmed against the MCMS proposal format).
Suggested reviewers (per CODEOWNERS):
@smartcontractkit/operations-platform(owns/deployment/common)@smartcontractkit/ccip-tooling,@smartcontractkit/ccip-offchain,@smartcontractkit/operations-platform,@smartcontractkit/core(own/deployment/ccip)
You can also share your feedback on Copilot code review. Take the survey.
| func (tc *TimelockConfig) MCMBasedOnActionTON(s *tonstate.MCMSSuiteState) (string, error) { | ||
| // if MCMSAction is not set, default to timelock.Schedule, this is to ensure no breaking changes for existing code | ||
| if tc.MCMSAction == "" { | ||
| tc.MCMSAction = types.TimelockActionSchedule | ||
| } | ||
| switch tc.MCMSAction { | ||
| case types.TimelockActionSchedule: | ||
| if s.Proposer == nil { | ||
| return "", errors.New("missing TON proposer") | ||
| } | ||
| return s.Proposer.String(), nil | ||
| case types.TimelockActionCancel: | ||
| if s.Canceller == nil { | ||
| return "", errors.New("missing TON canceller") | ||
| } | ||
| return s.Canceller.String(), nil | ||
| case types.TimelockActionBypass: | ||
| if s.Bypasser == nil { | ||
| return "", errors.New("missing TON bypasser") | ||
| } | ||
| return s.Bypasser.String(), nil | ||
| default: | ||
| return "", errors.New("invalid MCMS action") | ||
| } | ||
| } |
| tonMCMS, exists := mcmsTimelockStates.MCMSTONState[chainSel] | ||
| if !exists { | ||
| return nil, fmt.Errorf("missing MCMS state for TON chain %d", chainSel) | ||
| } | ||
| qualifier := mcmsConfig.TimelockQualifierPerChain[chainSel] | ||
| // Get the default qualifier suite (or iterate ByQualifier) | ||
| suite, ok := tonMCMS.ByQualifier[qualifier] // default qualifier? | ||
| if !ok || suite == nil { | ||
| return nil, fmt.Errorf("missing TON timelock for chain %d qualifier %q", chainSel, qualifier) | ||
| } | ||
| if suite.Timelock == nil { | ||
| return nil, fmt.Errorf("missing TON timelock address for chain %d", chainSel) | ||
| } | ||
| timelocks[chainSel] = suite.Timelock.String() | ||
| // Select MCMS address based on action | ||
| mcmsAddr, err := mcmsConfig.MCMBasedOnActionTON(suite) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| mcmsPerChain[chainSel] = mcmsAddr |
|
✅ No conflicts with other open PRs targeting |
|




Requires
Supports
Resolve TON MCMS contract address