feat(tests): EIP-8037 spilled NEW_ACCOUNT gas consumed on caller halt#3061
Merged
spencer-tb merged 2 commits intoJul 2, 2026
Conversation
23 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #3061 +/- ##
================================================
Coverage 93.23% 93.23%
================================================
Files 624 624
Lines 36924 36924
Branches 3373 3373
================================================
Hits 34427 34427
Misses 1704 1704
Partials 793 793
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:
|
Cover EIP-8037's handling of a spilled NEW_ACCOUNT state-gas charge when the calling frame fails, a gap with no prior hand-written fixture. - consumed_on_caller_halt: a value CALL charges NEW_ACCOUNT in the caller frame (spilling into gas_left with an empty reservoir), then the caller hits INVALID. Parametrized over in-cap/over-cap reservoir and two child outcomes: a new account (CALL succeeds) and a gas-starved precompile (CALL fails, exercising the child-failure refund path). gas_used equals gas_limit (in-cap) or the EIP-7825 cap (over-cap). - returned_on_caller_revert: same setup ending in REVERT; the charge is refilled LIFO and refunded, so gas_used is the regular-execution cost, the same in-cap and over-cap. Also correct the module docstring: on an exceptional halt the spilled portion stays consumed as regular gas (only the reservoir-funded portion is restored to the reservoir).
67fe685 to
ee04805
Compare
spencer-tb
approved these changes
Jul 2, 2026
spencer-tb
left a comment
Contributor
There was a problem hiding this comment.
Approving!
Rebased on forks/amsterdam.
The "over-cap" parts are already covered by test_top_level_failure_spilled_state_gas & est_top_level_halt_burns_spilled_state_gas, but the "in-cap" full spill cases and the value CALL`NEW_ACCOUNT`` charge source are def new!
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
Cover EIP-8037's handling of a spilled NEW_ACCOUNT state-gas charge when the calling frame fails, a gap with no prior hand-written fixture.
Also correct the module docstring: on an exceptional halt the spilled portion stays consumed as regular gas (only the reservoir-funded portion is restored to the reservoir).
🔗 Related Issues or PRs
N/A.
✅ Checklist
just statictype(scope):.