Ensuring sufficient gas for L1 determinism#232
Merged
Conversation
willmeister
approved these changes
Aug 26, 2020
willmeister
left a comment
There was a problem hiding this comment.
Looks good!
Will want to move away from the hard-coded max, but working > not working. Ship it 🚢
| uint gasLeft = gasleft(); | ||
| require( | ||
| gasLeft > ((_transactionData.gasLimit + MAX_EXECUTE_TRANSACTION_GAS_OVERHEAD + 10000) * 64 / 63), | ||
| "Insufficient gas supplied to ensure L1 execution will not run out of gas before OVM transaction gas limit." |
There was a problem hiding this comment.
Would change the error message or add a comment specifically saying why the 63/64 logic is in there (maybe with a link?)
2 tasks
bap2pecs
pushed a commit
to babylonlabs-io/optimism
that referenced
this pull request
Jul 31, 2024
xibao-nr
pushed a commit
to node-real/combo-optimism
that referenced
this pull request
Feb 19, 2025
theochap
pushed a commit
that referenced
this pull request
Dec 10, 2025
Implements several more hint routes in the host program
Zena-park
added a commit
to tokamak-network/optimism
that referenced
this pull request
Dec 30, 2025
Zena-park
added a commit
to tokamak-network/optimism
that referenced
this pull request
Dec 30, 2025
theochap
pushed a commit
that referenced
this pull request
Jan 15, 2026
### Description Adds an examples for transforming `Frame`s into `Batch`es and the reverse.
emhane
pushed a commit
that referenced
this pull request
Feb 3, 2026
Fixes #225 (does not track errors as these are fatal currently)
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
This ticket was originally to cover preventing max call depth inconsistency between L1 and L2. However, it turns out due to EIP 150, there is already an implicit upper bound on the call stack due to an exponential dropoff of max allottable gas per CALL.
This ticket enforces that sufficient gas is provided to the fraud proof so that EIP150 does not allow for multiple execution results based on input gas.
Note: this logic might be better off directly within
executeTransaction(would remove the need forMAX_EXECUTE_TRANSACTION_OVERHEADin STioner), but that breaks a ton of tests. We can revisit next time tests get an overhaul.Metadata
Fixes
Contributing Agreement