fix(tests): replace hardcoded 21000 gas constants for EIP-2780 compatibility (tests/osaka)#10
Merged
gurukamath merged 4 commits intoApr 21, 2026
Conversation
- Replace hardcoded 21,000 gas with fork-aware calculator. - Use RecipientType.EMPTY_ACCOUNT and conditional sends_value. - Under EIP-2780 the intrinsic cost for value-to-empty-account is 30,000; the old constant made every blob transaction invalid.
…ransition tests - Replace hardcoded 21,000 tx_gas fixture with fork-aware calculator targeting RecipientType.CONTRACT, plus a 1,000 gas buffer. - Replace hardcoded 21,000 assertion with calculator-derived intrinsic gas for the gas-spender contract destination.
- Remove dead `or 21000` fallback in gas summation. - All transactions in this test set gas_limit explicitly.
- Replace hardcoded "21000 + 16 * non-zero + 4 * zero" with fork-independent "intrinsic gas base cost + calldata cost".
Collaborator
Author
|
No guarantee of correctness, of course, but the modified modules do fill: |
2 tasks
gurukamath
approved these changes
Apr 21, 2026
3ca1df3
into
gurukamath:eip-2780/implement-eip-final
6 of 11 checks passed
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.
Summary
test_get_blobs— the hardcoded21_000was below the EIP-2780 intrinsic cost of 30,000 for value-to-empty-account, making every blob transaction invalid.21_000in blob reserve price transition tests (tx_gasfixture and assertion) with calculator-derived values.or 21000fallback in block RLP limit test gas summation.Test plan
uvx tox -e staticpasses after each commit.fillthe affected test modules to verify fixture generation succeeds.