feat(spec-specs): EIP-8037 spec changes for bal-devnet-4#2697
Closed
spencer-tb wants to merge 4 commits intoethereum:eips/amsterdam/eip-8037from
Closed
feat(spec-specs): EIP-8037 spec changes for bal-devnet-4#2697spencer-tb wants to merge 4 commits intoethereum:eips/amsterdam/eip-8037from
bal-devnet-4#2697spencer-tb wants to merge 4 commits intoethereum:eips/amsterdam/eip-8037from
Conversation
db7d367 to
5e3cab2
Compare
5e3cab2 to
4b22798
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## eips/amsterdam/eip-8037 #2697 +/- ##
==========================================================
Coverage ? 88.18%
==========================================================
Files ? 524
Lines ? 31120
Branches ? 3036
==========================================================
Hits ? 27444
Misses ? 3161
Partials ? 515
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Merged
4 tasks
43961b6 to
928b819
Compare
4 tasks
3e1d7c4 to
44b47cc
Compare
This was referenced Apr 17, 2026
928b819 to
d44d011
Compare
Contributor
Author
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
Stale PR as only used for reference initially, PTAL at seperate PRs for each spec change:
1) Top-level failure zeros execution state gas: 57a6385
On top-level revert or exceptional halt, all state changes are rolled back. Return consumed execution state gas to the reservoir (
state_gas_left += state_gas_used) and zerostate_gas_usedfor block accounting. Intrinsic state gas remains unchanged (immutable).2) SSTORE 0 to x to 0 refunds state gas to reservoir: 3feb782
When a storage slot is restored to its original zero value (0 to x to 0), the net state growth is zero. Refund
32 * cost_per_state_bytedirectly to the reservoir instead of through therefund_counter. The regular gas write cost refund still goes throughrefund_counter. The refund happens immediately after the x to 0 change.3) CREATE failure refunds account state gas to reservoir: 6b6f3c8
CREATE/CREATE2 charges
112 * cost_per_state_byteupfront. On a silent failure (insufficient balance, nonce overflow, stack depth, address collision) or child revert/halt, no account is created. Refund the account creation state gas to the reservoir.4) SELFDESTRUCT same-tx refunds state gas at end of tx: 9ca780d
When an account is created and self-destructed in the same transaction, the state doesn't persist. At the end of tx, refund all state gas for:
112 * cost_per_state_byte32 * cost_per_state_byteper non-zero slotlen(code) * cost_per_state_byteNo double refund with point 2: slots that went 0 to x to 0 have a final value of 0 and are not counted.
5) CALL to self-destructed account, no change: e6beb15
After a same-tx
CREATE+SELFDESTRUCT, the account still hasnonce=1from the CREATE, sois_account_alivereturns true and a subsequentCALLwith value does not chargeGAS_NEW_ACCOUNTstate gas. The account is destroyed at end of tx regardless, and any value transferred via the CALL is burned with it, so no persisted state results from the CALL. Combined with 4)'s refund, the net state gas across the CREATE+SELFDESTRUCT+CALL lifecycle is zero, matching the zero persisted state. No spec change.6) Immutable
intrinsic_state_gasfor EIP-7702: fd76b10Stop mutating
intrinsic_state_gasduring execution. The worst case charge is kept. When an authorization targets an existing account, refundSTATE_BYTES_PER_NEW_ACCOUNT * cost_per_state_byteto the reservoir only. Block accounting uses the original immutableintrinsic_state_gas.7) 2D transaction inclusion check: 928b819
Both regular gas and state gas are validated before executing a transaction using intrinsic-aware worst-case per-dimension contributions.
🔗 Related Issues or PRs
✅ Checklist
just statictype(scope):.