Update EIP-8037: clarify spillover state gas still increments execution_state_gas_used#11522
Merged
eth-bot merged 1 commit intoApr 14, 2026
Merged
Conversation
…on_state_gas_used
Collaborator
|
✅ All reviewers have approved. |
5 tasks
spencer-tb
approved these changes
Apr 14, 2026
flcl42
approved these changes
Apr 14, 2026
misilva73
approved these changes
Apr 14, 2026
eth-bot
approved these changes
Apr 14, 2026
eth-bot
left a comment
Collaborator
There was a problem hiding this comment.
All Reviewers Have Approved; Performing Automatic Merge...
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.
Summary
Clarify that when a state gas charge exceeds
state_gas_reservoirand spills intogas_left, the charge still incrementsexecution_state_gas_usedin full — it does not incrementexecution_regular_gas_used. Counter classification is by cost type, not funding source.Motivation
Discovered during bal-devnet-3 debugging. Three EL clients diverged on the same block because they disagreed on which counter a spilled state-gas charge increments:
execution_state_gas_used(matches EELScharge_state_gasinforks/amsterdam/vm/gas.py).execution_regular_gas_used(read line 117 as "costs that were paid from the regular budget count toward regular gas").Since
block_gas_used = max(cum_regular_gas_used, cum_state_gas_used), the two interpretations produce block totals that differ by exactly the spilled amount (e.g.131,488=112 × cpsbfor a singleGAS_NEW_ACCOUNTat 100M gas limit), splitting the chain.The current paragraph at line 117 already implies the EELS / geth behaviour but does not state it explicitly. Adding one sentence at line 111, where spillover is introduced, removes the ambiguity at the point readers are most likely to lose the invariant.
Scope
Purely a clarification — no semantic change. Disjoint from:
EELS already implements this behaviour in
charge_state_gas(src/ethereum/forks/amsterdam/vm/gas.py):This PR brings the EIP text in line with the reference implementation.