Update EIP-8141: account block execution gas before refund (EIP-7778) - #12226
Merged
eth-bot merged 1 commit intoAug 24, 2026
Merged
Conversation
Collaborator
|
✅ All reviewers have approved. |
eth-bot
enabled auto-merge (squash)
August 24, 2026 02:03
eth-bot
approved these changes
Aug 24, 2026
eth-bot
left a comment
Collaborator
There was a problem hiding this comment.
All Reviewers Have Approved; Performing Automatic Merge...
This was referenced Aug 25, 2026
gurukamath
added a commit
to ethereum/execution-specs
that referenced
this pull request
Sep 1, 2026
This implements the spec updates from this PR - ethereum/EIPs#12226 * fix(eip-8141): account block execution gas before refund * test(eip-8141): bump reference spec for EIP-7778 integration * fix(eip-8141): settle refund and floor accounting together * test(eip-8141): derive refund floor cases dynamically * style(test): format gas settlement test * fix(tests): static checks * fix(tests): pin search transaction nonce --------- Co-authored-by: Guruprasad Kamath <guru241987@gmail.com>
gurukamath
added a commit
to ethereum/execution-specs
that referenced
this pull request
Sep 2, 2026
This implements the spec updates from this PR - ethereum/EIPs#12226 * fix(eip-8141): account block execution gas before refund * test(eip-8141): bump reference spec for EIP-7778 integration * fix(eip-8141): settle refund and floor accounting together * test(eip-8141): derive refund floor cases dynamically * style(test): format gas settlement test * fix(tests): static checks * fix(tests): pin search transaction nonce --------- Co-authored-by: Guruprasad Kamath <guru241987@gmail.com>
gurukamath
added a commit
to ethereum/execution-specs
that referenced
this pull request
Sep 3, 2026
This implements the spec updates from this PR - ethereum/EIPs#12226 * fix(eip-8141): account block execution gas before refund * test(eip-8141): bump reference spec for EIP-7778 integration * fix(eip-8141): settle refund and floor accounting together * test(eip-8141): derive refund floor cases dynamically * style(test): format gas settlement test * fix(tests): static checks * fix(tests): pin search transaction nonce --------- Co-authored-by: Guruprasad Kamath <guru241987@gmail.com>
gurukamath
added a commit
to ethereum/execution-specs
that referenced
this pull request
Sep 3, 2026
This implements the spec updates from this PR - ethereum/EIPs#12226 * fix(eip-8141): account block execution gas before refund * test(eip-8141): bump reference spec for EIP-7778 integration * fix(eip-8141): settle refund and floor accounting together * test(eip-8141): derive refund floor cases dynamically * style(test): format gas settlement test * fix(tests): static checks * fix(tests): pin search transaction nonce --------- Co-authored-by: Guruprasad Kamath <guru241987@gmail.com>
11 tasks
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.
EIP-8141 adopts the two-dimensional gas model of EIP-8037 and activates on a fork that also includes EIP-7778 (Amsterdam). EIP-8037's "Integration with EIP-7778" section accounts the block execution dimension before the storage refund, so a refund lowers the payer's cost without freeing the block capacity the transaction occupied — the DoS bound EIP-7778 exists to keep.
The current EIP-8141 settlement accounts
block_execution_gas_usedfromgas_used_after_refund(post-refund), so a frame transaction re-opens the refund-based block-limit circumvention that EIP-7778 closes for every other transaction type on the same fork.This PR:
7778torequires:;gas_used_before_refund(block_execution_gas = max(gas_used_before_refund - tx_state_gas, calldata_floor_gas)), mirroring EIP-8037's EIP-7778 integration;cumulative_gas_usedon the post-refundgas_usedunchanged; the state dimension stays net, since a state-gas refill is not a refund in the EIP-7778 sense.Is the omission of the EIP-7778 integration a spec bug rather than an intended departure? EIP-8141's only documented departure from EIP-8037 is the calldata-floor payment rule; the refund/block-accounting integration appears to have been carried over from the pre-7778 form.