feat(tests): EIP-8037 CREATE-onto-alive refunds NEW_ACCOUNT to gas_left - #3073
Merged
spencer-tb merged 2 commits intoJul 2, 2026
Conversation
chfast
force-pushed
the
eips/amsterdam/eip-8037-create-onto-alive-lifo-refund
branch
from
June 30, 2026 22:19
003f573 to
6460eb0
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #3073 +/- ##
================================================
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:
|
23 tasks
A CREATE2 onto an already-alive (pre-funded, code-less) address spills the NEW_ACCOUNT state charge from the empty reservoir into gas_left, succeeds, and refunds it. EIP-8037 source-based refunds are LIFO, so the spilled charge must return to gas_left, not the reservoir. gas_limit is sized so the refunded NEW_ACCOUNT is exactly the gas left after the create, so the following SSTORE runs only if the refund landed in gas_left. A reservoir-only refund leaves gas_left at zero, out-of-gases the SSTORE, and diverges on the state root.
spencer-tb
force-pushed
the
eips/amsterdam/eip-8037-create-onto-alive-lifo-refund
branch
from
July 2, 2026 12:02
6460eb0 to
ff6a1ce
Compare
spencer-tb
approved these changes
Jul 2, 2026
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
A CREATE2 onto an already-alive (pre-funded, code-less) address spills the NEW_ACCOUNT state charge from the empty reservoir into gas_left, succeeds, and refunds it. EIP-8037 source-based refunds are LIFO, so the spilled charge must return to gas_left, not the reservoir.
gas_limit is sized so the refunded NEW_ACCOUNT is exactly the gas left after the create, so the following SSTORE runs only if the refund landed in gas_left. A reservoir-only refund leaves gas_left at zero, out-of-gases the SSTORE, and diverges on the state root.
🔗 Related Issues or PRs
N/A.
✅ Checklist
just statictype(scope):.