refactor(tests): enhance EIP-8037 test coverage part 2 - #3449
Merged
marioevz merged 7 commits intoAug 28, 2026
Conversation
LouisTsai-Csie
force-pushed
the
enhance-8037-pt2
branch
from
August 26, 2026 07:09
0dec15c to
278b547
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #3449 +/- ##
===================================================
+ Coverage 93.77% 93.90% +0.13%
===================================================
Files 624 624
Lines 36905 36905
Branches 3326 3326
===================================================
+ Hits 34606 34655 +49
+ Misses 1597 1569 -28
+ Partials 702 681 -21
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:
|
LouisTsai-Csie
force-pushed
the
enhance-8037-pt2
branch
from
August 28, 2026 08:17
22c75ec to
e225e64
Compare
LouisTsai-Csie
marked this pull request as ready for review
August 28, 2026 08:17
LouisTsai-Csie
force-pushed
the
enhance-8037-pt2
branch
from
August 28, 2026 08:25
e225e64 to
65c094f
Compare
marioevz
self-requested a review
August 28, 2026 22:46
marioevz
approved these changes
Aug 28, 2026
marioevz
left a comment
Member
There was a problem hiding this comment.
Amazing improvements overall!
I added a few more parametrizations and checks in some of the tests.
Thanks for all the changes!
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
Strengthens the EIP-8037 state-gas tests. No spec changes and no new behavior under test, every edit either adds an assertion that was missing, corrects opcode metadata the framework needs to price gas, or removes a test whose premise cannot hold.
The same three problems recur across the suite, so the diff repeats the same three fixes. Reading one instance of each is enough to review the rest.
header_verify, noexpected_receipt, nopoststate, so they passed whether or not the property held. Each now pinsHeader(gas_used=...)and/orTransactionReceipt(cumulative_gas_used=...)derived from the fork model, with anassertnaming which gas dimension is expected to dominate.execution_costandstate_costare derived from opcode metadata, so a missing annotation silently mis-prices the budget a test builds around it.SSTOREs that consumed the budget under test: Tests that recorded a sub-call result into a fresh slot paidSTORAGE_SETstate gas for the recording itself, so the reservoir no longer covered only the operation being measured. The slot is now pre-seeded, making the write a nonzero-to-nonzero modify that costs no state gas.Moreover, where a test needs to prove state gas came from the reservoir rather than spilling out of
gas_left, the operation now runs in a sub-call forwarded exactly its execution cost. With nogas_leftleft to spill from, it completes only if the reservoir funded it.CALLgas arguments are derived from the callee'sexecution_costinstead of round magic numbers.Related Issues or PRs
Scope
Followup Idea
test_calldata_floor_with_sstoreandtest_calldata_floor_higher_than_execution_with_state_opstest_sstore_restoration_reservoir_spillover,test_sstore_oog_reservoir_inflation_detection,test_call_oog_reservoir_inflation_detection,test_selfdestruct_oog_reservoir_inflation_detectionandtest_create_oog_reservoir_inflation_detection: these cases no longer follows the latest glamsterdam spec.Checklist
just static<type>(<area>): <title>, where<type>and<area>come from an appropriateC-<type>, respectivelyA-<area>, label. The title should match the target squash commit message.Cute Animal Picture