fix(cctp-finalizer): pad receiveMessage gasLimit to avoid out-of-gas reverts - #3738
Open
ashwinrava wants to merge 2 commits into
Open
fix(cctp-finalizer): pad receiveMessage gasLimit to avoid out-of-gas reverts#3738ashwinrava wants to merge 2 commits into
ashwinrava wants to merge 2 commits into
Conversation
…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>
ashwinrava
requested review from
bmzig,
dijanin-brat,
mrice32,
nicholaspai and
pxrl
as code owners
August 19, 2026 16:09
amateima
approved these changes
Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
During the 2026-08-19 ~15:30Z incident, sponsored-CCTP mints on Mainnet intermittently reverted out of gas and breached finalization SLAs:
0x9a98dba1and0x5b31a4f8both reverted with gasUsed 509,046 of a 511,460 limit (99.5%).processMintEvmsubmits mints throughsubmitTransaction, which discards the simulated gasLimit and lets ethers re-estimate at send time with zero headroom (DEFAULT_GAS_LIMIT_MULTIPLIER = 1.0, andgasLimitMultiplierpadding is a no-op whentxn.gasLimitis undefined).receiveMessagegas 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
submitTransactionhelper and all other bots are unchanged:processMintEvmnow simulates viaTransactionClient.simulateand submits the simulated transaction, whose definedgasLimitlets the multiplier apply.gasLimitMultiplier: 1.2(511k estimate → ~614k limit, comfortably above the ~530k worst case observed; unused gas is refunded).submitTransactionbehavior so caller retry/nack flow is unchanged.Testing
yarn eslintandtsc --noEmitclean.0x5b31a4f8calldata viaeth_callwith a padded limit succeeds.🤖 Generated with Claude Code