fix(tests): make more Prague tests fork-aware for EIP-2780#11
Merged
gurukamath merged 5 commits intoApr 21, 2026
Conversation
- Pass _fork=fork to transactions() in EIP-7002 test_withdrawal_requests to use the fork's intrinsic gas calculator instead of hardcoded fallback. - Add fork: Fork fixture parameter and pass _fork=fork in EIP-7002 test_modified_withdrawal_contract. - Add fork: Fork fixture parameter and pass _fork=fork in EIP-7251 test_modified_consolidation_contract. - Add fork: Fork fixture parameter and import Fork in EIP-7685 conftest.py blocks fixture, pass _fork=fork to transactions().
- Replace hardcoded gas_limit=21_000 with fork-aware intrinsic gas calculation in test_invalid_transaction_after_authorization. - The transaction sends value=1 to an empty account, which under EIP-2780 costs 30,000 gas instead of 21,000.
- In test_gas.py, add a comment explaining that 21,000 is a conservative overestimate since fork is unavailable at parametrization time. - In test_set_code_txs.py test_many_delegations, replace the hardcoded 21,000 with the fork's intrinsic gas calculator (fork is available).
- Add sends_value=True to intrinsic gas calculator calls in EIP-7002 and EIP-7251 contract deployment tests. - Both transactions send the system contract fee as value, which under EIP-2780 adds GAS_STATE_UPDATE (1,000) to the intrinsic cost.
- Replace hardcoded "21,000 gas for the transaction" with "Base intrinsic gas for the transaction (fork-dependent)" in the tx_data fixture docstring. - The base intrinsic gas varies by fork (e.g. 21,000 in Prague, different under EIP-2780).
2 tasks
gurukamath
approved these changes
Apr 21, 2026
ef3d40b
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
_forktotransactions()in EIP-7002, EIP-7251, and EIP-7685 system contract tests that were falling back to hardcoded gas limits.gas_limit=21_000with the fork's intrinsic gas calculator in the EIP-7702 nonce mismatch test (empty account + value costs 30,000 under EIP-2780).21_000with the intrinsic gas calculator intest_many_delegationswhereforkis available; document the overestimate intest_gas.pywhere it isn't.sends_value=Trueto EIP-7002/7251 contract deployment intrinsic gas calculations (transactions send the system contract fee as value).Test plan
uvx tox -e staticpasses after each commit.uv run fillpasses on all modified test modules.