Skip to content

USDC migration post validation script#1965

Open
0xsuryansh wants to merge 11 commits intomainfrom
cctp_migration_post_validation
Open

USDC migration post validation script#1965
0xsuryansh wants to merge 11 commits intomainfrom
cctp_migration_post_validation

Conversation

@0xsuryansh
Copy link
Copy Markdown
Member

@0xsuryansh 0xsuryansh commented Apr 9, 2026

What It Does

The validator runs two independent checks:

  1. chains checks (any EVM chain):

    • Step 1: resolve expected TAR active pool (direct address, datastore ref, or pool-kind)
    • Step 2: validate proxy local wiring (token + supported token)
    • Step 3: validate proxy backing pools (optional) and validate each remote lane
  2. homeChainLiquidity checks (Ethereum mainnet or Sepolia only):

    • Step 1: validate siloed pool token is USDC
    • Step 2: fetch lockbox topology from the siloed pool and assert uniqueness
    • Step 3: for each remote selector, validate lock-release mode, lockbox authorization, and liquidity deltas

The validator aggregates findings: it attempts to run all independent validations and reports all
misconfigurations it can observe in a single error, only skipping checks that are blocked by a
failed upstream read/bind.

Typical Rollout Usage Patterns

  1. Pre-cutover (in-flight messages must use legacy pool):

    • On canonical chains: validate TAR points to legacy USDCTokenPool 1.6.2
    • On Ethereum mainnet: validate TAR points to legacy HybridLockReleaseUSDCTokenPool 1.6.2
  2. Post-cutover (proxy becomes active pool):

    • Validate TAR points to USDCTokenPoolProxy 2.0.0
    • Validate proxy backing pools match expected deployed pools (kinds)
  3. Remote pool list evolution (legacy only -> legacy + new):

    • For a lane where you want the proxy to accept both old and new remotes, set:
      • expectedremotepoolkinds: [{legacy kind...}, {new kind...}]

Minimal YAML Sketch

This matches the repo’s existing YAML style where keys are lowercase field names:

environment: mainnet
domain: ccip
changesets:
  - validate_usdc_cld_rollout:
      payload:
        chains:
          5009297550715157269: # Ethereum Mainnet
            usdctoken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
            tokenadminregistryref:
              type: "TokenAdminRegistry"
              version: "1.5.0"
            expectedtokenpoolkind:
              kind: "USDC_TOKEN_POOL_PROXY"
            usdctokenpoolproxyref:
              type: "USDCTokenPoolProxy"
              version: "2.0.0"
            expectedproxypoolkinds:
              cctpv1pool: { kind: "CCTP_V1_POOL" }
              cctpv2pool: { kind: "CCTP_V2_POOL" }
              cctpv2poolwithccv: { kind: "CCTP_V2_POOL_WITH_CCV" }
              siloedlockreleasepool: { kind: "SILOED_LOCK_RELEASE_POOL" }
            remotechains:
              3849287863852499584: # BOB mainnet selector (example)
                expectedmechanism: "LOCK_RELEASE"
                expectedremotepoolkinds:
                  - kind: "LEGACY_NON_CANONICAL_BURN_MINT_TOKEN_POOL"
                    qualifier: "0x<remote-qualifier>"

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2026

👋 0xsuryansh, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@0xsuryansh 0xsuryansh changed the title USDC migration post validation script [WIP]USDC migration post validation script Apr 9, 2026
Copy link
Copy Markdown
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

Adds a read-only changeset and basic tests to validate the post-migration on-chain state for the USDC CLD rollout across EVM chains (token admin registry active pool, USDCTokenPoolProxy routing/config, remote lane config, and Ethereum home-chain liquidity migration invariants).

Changes:

  • Introduces ValidateUSDCCLDRollout changeset with config schema, precondition validation, and on-chain reads/assertions.
  • Adds home-chain liquidity migration checks (hybrid lock-release mode, lockbox auth, locked/balance derived expectations).
  • Adds unit tests covering key VerifyPreconditions failures and an Apply missing-chain failure.

Reviewed changes

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

File Description
ccv/chains/evm/deployment/v1_7_0/changesets/validate_usdc_cld_rollout.go New post-validation changeset implementing config validation + on-chain assertions for USDC CLD rollout.
ccv/chains/evm/deployment/v1_7_0/changesets/validate_usdc_cld_rollout_test.go New tests for precondition validation and basic apply error behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ccv/chains/evm/deployment/v1_7_0/changesets/validate_usdc_cld_rollout.go Outdated
Comment thread ccv/chains/evm/deployment/v1_7_0/changesets/validate_usdc_cld_rollout.go Outdated
@0xsuryansh 0xsuryansh marked this pull request as ready for review April 10, 2026 18:20
@0xsuryansh 0xsuryansh requested a review from Alkhara April 10, 2026 18:21
@0xsuryansh 0xsuryansh changed the title [WIP]USDC migration post validation script USDC migration post validation script Apr 10, 2026
@0xsuryansh 0xsuryansh force-pushed the cctp_migration_post_validation branch from 4e6ab47 to fbac028 Compare April 13, 2026 15:16
@github-actions
Copy link
Copy Markdown

Metric cctp_migration_post_validation main
Coverage 70.1% 69.8%

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.

2 participants