Skip to content

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

Draft
Fletch153 wants to merge 6 commits intodevelopfrom
fix-sui-offramp-ccip-linkage
Draft

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

Conversation

@Fletch153
Copy link
Copy Markdown
Collaborator

@Fletch153 Fletch153 commented Apr 14, 2026

Summary

Fixes intermittent CI flake in Test_CCIP_Upgrade_EVM2Sui / Test_CCIP_Upgrade_CommonPkg_EVM2Sui: 20-min wait for CommitReportAccepted yields zero events, then timeout. Three distinct but cascading failures — all three must land together for the tests to go green.

Root causes (A + X + Y)

A. Offramp v2 linked against v1 ccip pkg

upgradeSuiOffRamp (integration-tests/smoke/ccip/ccip_sui_upgrade_test.go) compiled the v2 offramp with "ccip": state.CCIPAddress (original v1 ccip pkg) in the named-address map. Offramp v2's linkage table resolved ccip::fee_quoter::update_prices to the v1 ccip pkg's fee_quoter (VERSION=2). After BlockVersion(fee_quoter, v=2), commit reports carrying non-empty price updates dispatch into fee_quoter v2 → verify_function_allowed(..., 2) fails → whole tx reverts → no CommitReportAccepted event emitted. Fix: point the ccip dep's published-at at CCIPMockV2PackageId (upgraded pkg, fee_quoter v3). Supply original_ccip_pkg = CCIPAddress so Sui's upgrade validator accepts the dep swap.

X. RMNProxy.GetARMFunctionNotFound

Sui chainreader config (core/capabilities/ccip/configs/sui/contract_reader.go) mapped MethodNameGetARM to Move function rmn_remote::get_arm, which does not exist in chainlink-sui's rmn_remote.move (grep confirms zero definitions). Every config-refresh cycle failed on the RMN leg of the batch in chainaccessor/default_accessor.go → fail-fast in config_processors.go → zero-valued OfframpConfig{} → cached zero ConfigDigest → commit plugin self-rejects own reports at commit/report.go:222 ("my config digest doesn't match offramp's"). On Sui rmn_remote lives inside the CCIP package, so the correct "ARM address" is the latest CCIP package id. Fix: ResponseFromInputs:["package_id"] synthesizes that value via chainlink-sui's existing executeFunction plumbing — no Move source change, no dep bump.

Y. Sui fee_quoter price tables empty for EVM dest

AddLane(from=EVM, to=Sui) populates EVM-side fee_quoter only (test_helpers_solana_v0_1_0.go:943-1012 — no case chainsel.FamilySui: on the toFamily switch). Sui-side usd_per_unit_gas_by_dest_chain[EVM selector] and usd_per_token[LINK] stay empty. Commit plugin observation aborts every cycle with EUnknownDestChainSelector(3) (fee_quoter.move:1578-1581) and EUnknownToken(4) (fee_quoter.move:1569-1571). In isolation these are tolerated warnings, but in the same batch as X they compound into the same zero-digest cascade. Fix: seed via FeeQuoterUpdatePricesWithOwnerCapOp immediately after upgradeCCIP (so the write targets the post-upgrade, unblocked package). Values mirror SendSuiCCIPRequest in test_sui_helpers.go:145-168.

Why A, X, and Y cascade together

Both X and Y reads live in the same batch in chainaccessor.prepareDestChainRequest. processOfframpResults / processStandardChainConfigResults are fail-fast: one bad sibling zeros the whole OfframpConfig → cached zero digest → commit plugin refuses to transmit → even if reports ARE produced, they never land. Once X+Y let reports reach transmission, A (commit-tx linkage) is what finally lets the commit tx succeed on-chain.

  • X alone unblocked → Y still triggers zero-digest cascade
  • Y alone unblocked → X still triggers zero-digest cascade
  • X+Y unblocked, A still broken → tx revert on update_prices (when report carries price updates); works when report is empty — the original intermittency
  • A+X+Y together → clean commit path end-to-end

Evidence

Failing job 71358465085 (latest CI on this branch before X+Y), log at integration-tests/smoke/ccip/logs/2026-04-14T22-18-10_Test_CCIP_Upgrade_EVM2Sui.log:

  • L72091: correct on-chain OCR3 digest returned (000acd0c35…) — proves read path isn't broken at the contract level.
  • L72678+: plugin compares against offRampConfigDigest: 0x0000…0000 from poller cache → rejects own report.
  • default_accessor.go:115 errors repeat for full 22 min: get_arm: FunctionNotFound and get_dest_chain_gas_price: EUnknownDestChainSelector.
  • Zero SubmitTransaction/signAndExecute calls on the Sui chain writer through the test lifetime.

Earlier failing job 71329559585 (pre-A-fix) shows fee_quoter::update_prices MoveAbort on commit-tx submission path — the A symptom that PR's original commit targets.

Scope

  • integration-tests/smoke/ccip/ccip_sui_upgrade_test.goupgradeSuiOffRamp named-address fix (A); seedSuiFeeQuoterForRemote helper called after upgradeCCIP in both failing tests (Y)
  • core/capabilities/ccip/configs/sui/contract_reader.go — 3-line ResponseFromInputs addition on GetARM (X)

go vet ./... and go test -run=XXX -count=1 ./smoke/ccip/... clean.

Test plan

  • Test_CCIP_Upgrade_EVM2Sui passes
  • Test_CCIP_Upgrade_CommonPkg_EVM2Sui passes
  • No regression on Test_CCIP_Messaging_EVM2Sui, Test_CCIP_Upgrade_Sui2EVM, Test_CCIP_Upgrade_NoBlock_EVM2Sui, EVM2Sui token-transfer tests
  • Review with CCIP team: does ResponseFromInputs:["package_id"] return the correct address for downstream RMNRemote binding (expected: yes — RMNRemote reads bind to the same CCIP package)

Closes CORE-2414.

upgradeSuiOffRamp compiled offramp v2 with the original ccip pkg as its
`ccip` dep, so the published linkage pointed at fee_quoter v2. After
BlockVersion(fee_quoter, v=2), commit reports with price_updates reverted
inside offramp.commit → fee_quoter::update_prices → verify_function_allowed,
producing zero CommitReportAccepted events and flaking Test_CCIP_Upgrade_EVM2Sui
on roughly a price-update-cadence basis.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 14, 2026

✅ No conflicts with other open PRs targeting develop

…v3-routed dep

Previous attempt set ccip's published-at to CCIPMockV2PackageId without overriding
original_ccip_pkg, so managePackage wrote Published.toml with original-id = v3 =
published-at. Sui's PublishUpgradeMissingDependency check rejects because the
on-chain original-id of CCIPMockV2PackageId is actually CCIPAddress (v1).

Wire original-id = CCIPAddress while keeping published-at = CCIPMockV2PackageId
so offramp v2's linkage routes fee_quoter::update_prices into v3 (unblocked) but
the bytecode's linkage table references the correct on-chain original-id.

Also drops the dead latest_ccip_pkg named-address — it has no consumer in
ccip_offramp/Move.toml.
@trunk-io
Copy link
Copy Markdown

trunk-io bot commented Apr 14, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

…er upgrade

Two independent failures cascade through the same chainaccessor
batch-refresh path and zero-out the offramp OCR3 config digest,
causing the CCIP commit plugin to self-reject its own reports
(commit/report.go:222 "my config digest doesn't match offramp's"),
making Test_CCIP_Upgrade_EVM2Sui and Test_CCIP_Upgrade_CommonPkg_EVM2Sui
flaky on Sui.

X. RMNProxy.GetARM → FunctionNotFound
   Sui chainreader config mapped MethodNameGetARM to Move function
   rmn_remote::get_arm, which doesn't exist in chainlink-sui's
   rmn_remote.move. Every refresh cycle hit FunctionNotFound in the
   RMN leg of the batch. On Sui the rmn_remote module lives inside
   the CCIP package, so the correct "ARM address" is the latest CCIP
   package id. Use ResponseFromInputs:["package_id"] to synthesize
   that response without touching chainlink-sui or Move source.

Y. Sui fee_quoter has no dest-chain gas / token price state after upgrade
   AddLane(EVM→Sui) seeds the EVM-side fee_quoter only. No helper
   writes usd_per_unit_gas_by_dest_chain[EVM selector] or
   usd_per_token[Sui LINK] on the Sui side, so the commit plugin's
   observation reads abort EUnknownDestChainSelector(3) /
   EUnknownToken(4) from fee_quoter::*_internal. Seed those tables
   via FeeQuoterUpdatePricesWithOwnerCapOp against the post-upgrade
   (unblocked) CCIP package immediately after upgradeCCIP in both
   failing tests.

Both failures share the batch-refresh fail-fast behavior in
chainaccessor/config_processors.go: a single read error returns a
zero-valued OfframpConfig, poisoning the config-digest cache. Fixing
either alone still leaves the other to trigger the zero-digest
cascade, so both must land together.

(cherry picked from commit ba5feb2)
@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.

@cl-sonarqube-production
Copy link
Copy Markdown

Theory: X (ResponseFromInputs:"package_id" for GetARM) is the decisive
reader-side fix. Y was defense-in-depth that might be inert.

Temporary commit for empirical validation. If A+X proves sufficient over
3 CI runs, this commit stays and Y stays dropped. If flakes return, revert.
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