Skip to content

add TON support for OrchestrateChangesets#21570

Open
huangzhen1997 wants to merge 4 commits intodevelopfrom
fix-AggregateProposalsV2-to-support-ton
Open

add TON support for OrchestrateChangesets#21570
huangzhen1997 wants to merge 4 commits intodevelopfrom
fix-AggregateProposalsV2-to-support-ton

Conversation

@huangzhen1997
Copy link
Contributor

@huangzhen1997 huangzhen1997 commented Mar 17, 2026

Requires

  • TON support for OrchestrateChangesets
    • fix-AggregateProposalsV2-to-support-ton

Supports

Resolve TON MCMS contract address

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 in AggregateProposalsV2.
  • Extend the on-chain state view to load TON MCMS state by chain.
  • Attempt to pass TON MCMS state into OrchestrateChangesets aggregation.

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.go TON aggregation branch (qualifier selection semantics and how TON timelock/MCMS addresses are derived).
  • End-to-end correctness of TON aggregated proposals given buildProposalMetadataV2 currently 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.

Comment on lines +61 to +85
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")
}
}
Comment on lines +476 to +495
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
tt-cll
tt-cll previously approved these changes Mar 17, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

✅ No conflicts with other open PRs targeting develop

@trunk-io
Copy link

trunk-io bot commented Mar 18, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@cl-sonarqube-production
Copy link

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