fix(apt): opt in to dynamic gas estimation - #9701
Draft
ralph-bitgo[bot] wants to merge 1 commit into
Draft
Conversation
ralph-bitgo
Bot
force-pushed
the
fix/cecho-2022-aptos-gas
branch
from
September 9, 2026 20:53
e36d948 to
f7c4b4f
Compare
Contributor
ralph-bitgo
Bot
force-pushed
the
fix/cecho-2022-aptos-gas
branch
6 times, most recently
from
September 9, 2026 20:57
c0f7a5d to
5d8ee7f
Compare
Use Aptos SDK simulation with a conservative 200,000-unit limit, then rebuild with ceil(gas_used * 1.2) while retaining a 20,000-unit minimum fallback. Explicit gasData remains authoritative and simulation is opt-in to avoid adding a network dependency to existing builds. Refs: CECHO-2022 Session-Id: 9c40532a-e51d-4a1e-a703-ccd15303c96b Task-Id: e62c1d9a-6785-4fac-a98b-400668b68cd6
ralph-bitgo
Bot
force-pushed
the
fix/cecho-2022-aptos-gas
branch
2 times, most recently
from
September 9, 2026 20:57
ab3d158 to
42f087b
Compare
Contributor
|
|
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.
Why
Aptos validators reject transactions whose max gas amount is below the chain minimum (
MAX_GAS_UNITS_BELOW_MIN_TRANSACTION_GAS_UNITS). The pinned SDK default is too low for some broadcasts, while a simulation request is not appropriate for every existing build because it adds network latency and can fail for offline or newly-created accounts.What changed
setDynamicGasEstimation()opt-in on Aptos transaction buildersceil(gas_used * 1.2)(never below 20,000)gasData()values and fall back safely when simulation failsTests
createAptosseam and verify flag-off one-build/no-simulation, high-limit simulation and buffered rebuild, rejection fallback, and explicit gas bypassVerification
aptos.transaction.simulate.simple({ transaction })returnsPromise<Array<UserTransactionResponse>>git diff --checkpassednode: command not found,yarn: command not found).Refs: CECHO-2022