Skip to content

fix(ccip/sui): link upgraded offramp against upgraded ccip pkg#22016

Closed
Fletch153 wants to merge 1 commit intodevelopfrom
fix-sui-offramp-ccip-linkage
Closed

fix(ccip/sui): link upgraded offramp against upgraded ccip pkg#22016
Fletch153 wants to merge 1 commit intodevelopfrom
fix-sui-offramp-ccip-linkage

Conversation

@Fletch153
Copy link
Copy Markdown
Collaborator

@Fletch153 Fletch153 commented Apr 14, 2026

Summary

Resolves intermittent 20-min timeouts in Test_CCIP_Upgrade_EVM2Sui and Test_CCIP_Upgrade_CommonPkg_EVM2Sui ((sui) timed out after waiting for commit report). Two Sui-specific bugs independently gate commit-report delivery; both must be fixed together.

Issue 1 — offramp v2 linked against v1 ccip pkg

upgradeSuiOffRamp compiled offramp v2 with "ccip": state.CCIPAddress (v1 pkg) in the named-address map. Sui Move captures linkage at compile time, so offramp v2 dispatched fee_quoter::update_prices into the v1 fee_quoter (VERSION=2). After BlockVersion(fee_quoter, v=2), commit reports carrying price updates aborted on verify_function_allowed and the whole tx reverted. The flake surfaces because OCR decides per-round whether to include price updates — empty-price rounds committed cleanly, price-carrying rounds reverted.

Fix: point ccip at CCIPMockV2PackageId. Supply original_ccip_pkg: CCIPAddress so Sui's upgrade validator accepts the dep swap (Published.toml original-id must match on-chain).

Issue 2 — RMNProxy.GetARM references a Move function that doesn't exist

The Sui chain-reader config mapped MethodNameGetARM to Move function rmn_remote::get_arm, which is not defined in chainlink-sui/contracts/ccip/ccip/sources/rmn_remote.move. On Sui rmn_remote lives inside the CCIP package — there is no proxy indirection, so there's no get_arm to call.

Every config-refresh batch failed on the RMN leg. chainlink-ccip's DefaultAccessor.GetAllConfigsLegacy catches that error, replaces the entire ChainConfigSnapshot with a zero-valued struct, and returns nil; configPollerV2 caches it as if successful. GetOffRampConfigDigest then returns 0x0, the commit plugin self-rejects every report at commit/report.go:221, and nothing transmits.

Fix: ResponseFromInputs: []string{"package_id"} on the GetARM binding synthesizes the response via chainlink-sui's existing executeFunction short-circuit — the correct "ARM address" on Sui is the latest CCIP package id since rmn_remote lives there.

Evidence (pre-fix failing log)

integration-tests/smoke/ccip/logs/2026-04-14T22-18-10_Test_CCIP_Upgrade_EVM2Sui.log:

  • 349 × default_accessor.go:115 "failed to process standard chain config results" err="... get_arm: FunctionNotFound in command 0"
  • config_poller_v2.go:464 caching snapshot with ConfigDigest=0x000…0
  • First "my config digest doesn't match offramp's config digest" warning immediately follows
  • On-chain offramp::latest_config_details returned the correct digest 0x000acd0c35… — confirming the 0x0 is cache-poisoning, not a contract issue
  • Zero SubmitTransaction calls on the Sui chain writer across the 22-min run

CI

Previously red with the digest-zero signature. Post-fix: 6 consecutive CI runs of both tests green. P(6 passes | 50% flake rate) = 1.6% — empirical null rejected.

Follow-up (out of scope)

chainlink-ccip/pkg/chainaccessor/config_processors.go is fail-fast across all reads in the dest-chain batch — one broken view zeros the whole ChainConfigSnapshot, exposing every non-EVM family to the same fragility. Worth a separate PR to isolate per-contract failures.

Closes CORE-2414.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 14, 2026

✅ No conflicts with other open PRs targeting develop

@trunk-io
Copy link
Copy Markdown

trunk-io bot commented Apr 14, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@github-actions
Copy link
Copy Markdown
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@Fletch153 Fletch153 force-pushed the fix-sui-offramp-ccip-linkage branch from 0d3d806 to 074a87a Compare April 15, 2026 15:54
Two independent bugs compound into a config-digest cache poisoning +
on-chain commit tx revert, manifesting as intermittent 20-min timeouts
in Test_CCIP_Upgrade_EVM2Sui and Test_CCIP_Upgrade_CommonPkg_EVM2Sui.

1. upgradeSuiOffRamp compiled offramp v2 with "ccip": state.CCIPAddress
   (v1 pkg). Sui Move captures linkage at compile time, so offramp v2
   dispatched fee_quoter::update_prices into the v1 fee_quoter
   (VERSION=2). After BlockVersion(fee_quoter, v=2), commit reports
   carrying price updates aborted on verify_function_allowed and the
   whole tx reverted. Intermittent because OCR commit rounds decide
   per-report whether to include price updates. Fix: point ccip at
   CCIPMockV2PackageId and supply original_ccip_pkg = CCIPAddress for
   Sui's upgrade validator.

2. The Sui chain-reader config mapped MethodNameGetARM to Move function
   rmn_remote::get_arm, which does not exist in chainlink-sui
   (rmn_remote lives inside the CCIP package, no proxy indirection).
   Every config-refresh batch failed with FunctionNotFound, and
   chainlink-ccip's DefaultAccessor.GetAllConfigsLegacy replaces the
   whole ChainConfigSnapshot with zeros on any sub-read error, caching
   it as a valid result. offRampConfigDigest came back as 0x0, the
   commit plugin self-rejected every report via
   ShouldAcceptAttestedReport. Fix: synthesize the response via
   ResponseFromInputs:["package_id"] — on Sui the correct "ARM address"
   is the latest CCIP package id.

Empirically validated: 6 consecutive CI passes of both tests with this
fix; A alone was previously red with the digest=0x0 cache-poison
signature. A workaround that seeded Sui fee_quoter prices after
upgrade was tested and proven inert, then dropped.

Closes CORE-2414.
@Fletch153 Fletch153 force-pushed the fix-sui-offramp-ccip-linkage branch from 67ed406 to 2785b88 Compare April 15, 2026 19:59
@cl-sonarqube-production
Copy link
Copy Markdown

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.

1 participant