feat(tests): add more EIP-2780 tests#3055
Open
gurukamath wants to merge 5 commits into
Open
Conversation
- test_calldata_floor.py: a data-heavy value transfer whose EIP-7623/7976 calldata floor (built on the lowered TX_BASE) dominates the decomposed intrinsic, masking the recipient/value charges so the gas paid is identical at value 0 and 1; plus a one-below-floor rejection (INTRINSIC_GAS_BELOW_FLOOR_GAS_COST). The floor-dominating calldata size is derived from the shared EIP-7623 find_floor_cost_threshold search rather than hardcoded. - test_intrinsic_gas_boundary.py: contract-creation intrinsic boundary (gas_limit = intrinsic - 1 -> INTRINSIC_GAS_TOO_LOW), pinning the combined regular + NEW_ACCOUNT state intrinsic for creates. - test_top_frame_charges.py: a nonce-only-alive recipient (nonce=1, zero balance, no code) is not empty per EIP-161, so a value transfer does not incur the top-frame NEW_ACCOUNT charge; the gate keys on is_account_alive, not balance == 0.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## eips/amsterdam/eip-2780-8038 #3055 +/- ##
===============================================================
Coverage ? 93.21%
===============================================================
Files ? 620
Lines ? 38830
Branches ? 3348
===============================================================
Hits ? 36197
Misses ? 1773
Partials ? 860
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
13 tasks
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
Expands the EIP-2780 (Reduce Transaction Intrinsic Cost) test suite on top of the
eip-2780-8038base, pinning the decomposed-intrinsic, top-frame state-gas, and calldata-floor interactions not covered by the existing tests:TX_BASE.NEW_ACCOUNTas state gas — a block-headergas_usedassertion pins that the empty-recipient value-transfer charge is attributed to the state dimension (max(block_regular, block_state)), which balance-only state tests cannot distinguish.TRANSFER_LOG_COSTis charged (non-self value transfers), and never for self-transfers or zero-value transactions.gas_limit = intrinsic − 1rejection for both plain calls and contract creation; the EIP-7623/7976 calldata floor binding (masking the decomposed value charges) plus below-floor rejection; and a nonce-only-alive recipient confirming theNEW_ACCOUNTgate keys onis_account_alive, notbalance == 0.Test-only; no spec changes. All fixtures fill green against Amsterdam.
🔗 Related Issues or PRs
#3017
✅ Checklist
just statictype(scope):.Cute Animal Picture