Skip to content

fix(cctp-finalizer): pad receiveMessage gasLimit to avoid out-of-gas reverts - #3738

Open
ashwinrava wants to merge 2 commits into
masterfrom
ashwin/cctp-finalizer-mint-gas-padding
Open

fix(cctp-finalizer): pad receiveMessage gasLimit to avoid out-of-gas reverts#3738
ashwinrava wants to merge 2 commits into
masterfrom
ashwin/cctp-finalizer-mint-gas-padding

Conversation

@ashwinrava

Copy link
Copy Markdown
Member

Problem

During the 2026-08-19 ~15:30Z incident, sponsored-CCTP mints on Mainnet intermittently reverted out of gas and breached finalization SLAs:

  • 0x9a98dba1 and 0x5b31a4f8 both reverted with gasUsed 509,046 of a 511,460 limit (99.5%).
  • Successful retries of the same messages estimated 528,814 and used ~437,900.

processMintEvm submits mints through submitTransaction, which discards the simulated gasLimit and lets ethers re-estimate at send time with zero headroom (DEFAULT_GAS_LIMIT_MULTIPLIER = 1.0, and gasLimitMultiplier padding is a no-op when txn.gasLimit is undefined). receiveMessage gas usage on the SponsoredCCTPDstPeriphery is state-dependent, so a mint included after a sibling mint changed state can need ~20k more gas than estimated and dies at its limit.

Change

Scoped to the cctp-finalizer only — the shared submitTransaction helper and all other bots are unchanged:

  • processMintEvm now simulates via TransactionClient.simulate and submits the simulated transaction, whose defined gasLimit lets the multiplier apply.
  • Adds gasLimitMultiplier: 1.2 (511k estimate → ~614k limit, comfortably above the ~530k worst case observed; unused gas is refunded).
  • Error semantics preserved: throws on simulation failure and on empty submit result, matching the previous submitTransaction behavior so caller retry/nack flow is unchanged.

Testing

  • yarn eslint and tsc --noEmit clean.
  • Replay of the failed 0x5b31a4f8 calldata via eth_call with a padded limit succeeds.

🤖 Generated with Claude Code

…reverts

processMintEvm submitted mints with no explicit gasLimit, so they went
onchain with the bare send-time estimate. receiveMessage gas usage on the
sponsored periphery is state-dependent, and mints included after a sibling
mint changed state reverted out-of-gas (e.g. mainnet 0x9a98dba1, 0x5b31a4f8:
gasUsed 509,046 of a 511,460 limit).

Simulate via TransactionClient and submit the simulated transaction, whose
defined gasLimit lets the 1.2x gasLimitMultiplier padding apply. Scoped to
the cctp-finalizer; the shared submitTransaction helper is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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