chore: check for gas used at boundary#331
Merged
Merged
Conversation
Rimeeeeee
commented
Apr 6, 2026
Contributor
Author
There was a problem hiding this comment.
do we need to do min( tx.tx().gas_limit() ,MAX_TX_LIMIT) here? @rakita
Contributor
Author
There was a problem hiding this comment.
Gas limit on line 174???
Collaborator
There was a problem hiding this comment.
hm, gas_limit for pre amsteram can't be more than MAX_TX_LIMIT so technically it is okay to do min (tx.tx().gas_limit() ,MAX_TX_LIMIT) but i would saparate this, and be explicit about it
Collaborator
There was a problem hiding this comment.
Collaborator
There was a problem hiding this comment.
And check if you can access revm cfg.tx_gas_limit_cap() function
rakita
reviewed
Apr 6, 2026
rakita
reviewed
Apr 6, 2026
| // EIP-8037. | ||
| if amsterdam_active && self.max_block_gas_used() > self.evm.block().gas_limit() { | ||
| return Err(BlockValidationError::BlockGasExceeded.into()); | ||
| } |
Collaborator
There was a problem hiding this comment.
@klkvr is this a good place for this check? After state gas this got moved at after tx exec
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.
block_regular_gas_usedfromblock_available_gasif amsterdam is enabled.max(block_regular_gas_used, block_state_gas_used)donot exceedblock gas limit.cc: @rakita