feat(APP-1054): Implement gasLimit param (8/10) - #1308
Open
milosh86 wants to merge 5 commits into
Open
Conversation
|
🚀 Preview Deployment: View Here |
|
E2E results (preview) Smoke
|
milosh86
marked this pull request as ready for review
August 7, 2026 12:09
Signed-off-by: Milos Dzepina <milos@aragon.org>
Signed-off-by: Milos Dzepina <milos@aragon.org>
Signed-off-by: Milos Dzepina <milos@aragon.org>
Signed-off-by: Milos Dzepina <milos@aragon.org>
milosh86
force-pushed
the
app-1054-implement-gaslimit-param
branch
from
August 7, 2026 12:42
9722b65 to
62d8cef
Compare
Signed-off-by: Milos Dzepina <milos@aragon.org>
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.
Description
Closes APP-1054.
Replaces the hardcoded
1_000_000placeholder_gasLimit(left as aTODO(APP-1029)in the forward-message action)with a real, required gas-limit field backed by a backend simulation.
crossChainControllerService.estimateGasLimit(newPOST /v2/simulations/:network/cross-chain/:controllerAddress/gas-limit) simulates the inbound delivery on thedestination chain and returns the measured
requiredGas, sinceeth_estimateGascan't measure it: the controllerwraps the payload in a
try/catch, so the node's binary search only ever prices the catch branch.crossChainControllerGasUtils.resolveGasLimitturns the raw measurement into a submittablelimit by applying a 30% safety margin (justified in
crossChainControllerGas— the payload is arbitraryuser-composed actions, frozen into calldata weeks before execution, five call-frames deep), a 200k floor (the CCIP
default), and a 3M cap (the lane's typical
maxPerMsgGasLimit, since the backend deliberately never checks it).GasLimitInput— new number input with a "Calculate" action alongside the usual +/- steppers.CrossChainControllerForwardMessageAction— the gas-limit field isrequired(an unset limit risks the messagelanding "delivered but not executed", recoverable only via a permissioned retry on the destination chain) and is
cleared whenever the destination chain or the action list changes, since a limit measured for a different payload is
worse than none. Surfaces the simulation outcome (success/reverted/margin-reduced/exceeds-cap) as an inline alert,
with a link to the saved Tenderly simulation when available.
Dependencies: stacked on
app-1056-show-warning-about-controller-fee-balance→app-1053-…→main. Merge thebases first.
Type of Change
Developer Checklist:
Review Checklist: