feat(tests): EIP-8037 reject tx when gas_limit covers regular but not state intrinsic#2876
Draft
chfast wants to merge 1 commit into
Draft
Conversation
… state intrinsic EIP-8037 splits a transaction's intrinsic gas into a regular component and a state component (NEW_ACCOUNT for CREATE, NEW_ACCOUNT + AUTH_BASE per authorization for set_code). The sender must cover both: any `gas_limit < regular + state` is invalid with `INTRINSIC_GAS_TOO_LOW`. The existing `test_create_tx_intrinsic_gas_boundary` pins gas_limit at the upper boundary (`total - 1`). This change adds two functions that pin gas_limit at the lower end of the rejected interval — `regular` and `regular + 1` — where an implementation that omits the state component from its pre-validate intrinsic check would erroneously accept the transaction: - `test_create_tx_below_total_intrinsic` (CREATE) - `test_set_code_tx_below_total_intrinsic` (set_code, N = 1, 2, 3 auths)
Member
Author
|
Don't merge. |
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
EIP-8037 splits a transaction's intrinsic gas into a regular component and a state component (NEW_ACCOUNT for CREATE, NEW_ACCOUNT + AUTH_BASE per authorization for set_code). The sender must cover both: any
gas_limit < regular + stateis invalid withINTRINSIC_GAS_TOO_LOW.The existing
test_create_tx_intrinsic_gas_boundarypins gas_limit at the upper boundary (total - 1). This change adds two functions that pin gas_limit at the lower end of the rejected interval—regularandregular + 1—where an implementation that omits the state component from its pre-validate intrinsic check would erroneously accept the transaction:test_create_tx_below_total_intrinsic(CREATE)test_set_code_tx_below_total_intrinsic(set_code, N = 1, 2, 3 auths)🔗 Related Issues or PRs
N/A.
✅ Checklist
just statictype(scope):.mkdocs servelocally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.@ported_frommarker.