Skip to content

feat(spec-specs): (EIP-7778) revert to post refund gas in receipts#2073

Merged
gurukamath merged 1 commit intoethereum:eips/amsterdam/eip-7778from
gurukamath:eip-7778/use-post-refund-in-receipt
Jan 26, 2026
Merged

feat(spec-specs): (EIP-7778) revert to post refund gas in receipts#2073
gurukamath merged 1 commit intoethereum:eips/amsterdam/eip-7778from
gurukamath:eip-7778/use-post-refund-in-receipt

Conversation

@gurukamath
Copy link
Contributor

🗒️ Description

Based on recent discussions the receipt should go back to containing the cumulative gas post refunds (something that the users actually pay)

🔗 Related Issues or PRs

#1874

✅ Checklist

  • All: Ran fast tox checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    uvx tox -e static
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered updating the online docs in the ./docs/ directory.

Cute Animal Picture

TBD

@gurukamath gurukamath force-pushed the eip-7778/use-post-refund-in-receipt branch from 87e2b2c to 7157947 Compare January 24, 2026 20:31
@gurukamath
Copy link
Contributor Author

@nerolation draft implementation of the discussed changes so we have something ready to go once a decision is made

@gurukamath gurukamath force-pushed the eip-7778/use-post-refund-in-receipt branch from 7157947 to 3813ca6 Compare January 24, 2026 20:36
@gurukamath gurukamath force-pushed the eip-7778/use-post-refund-in-receipt branch from 3813ca6 to 5879a7d Compare January 24, 2026 20:54
@codecov
Copy link

codecov bot commented Jan 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.14%. Comparing base (e958b62) to head (5879a7d).
⚠️ Report is 98 commits behind head on eips/amsterdam/eip-7778.

Additional details and impacted files
@@                     Coverage Diff                     @@
##           eips/amsterdam/eip-7778    #2073      +/-   ##
===========================================================
- Coverage                    86.33%   86.14%   -0.20%     
===========================================================
  Files                          538      599      +61     
  Lines                        34557    39475    +4918     
  Branches                      3222     3780     +558     
===========================================================
+ Hits                         29835    34005    +4170     
- Misses                        4148     4848     +700     
- Partials                       574      622      +48     
Flag Coverage Δ
unittests 86.14% <100.00%> (-0.20%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@nerolation nerolation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@LouisTsai-Csie LouisTsai-Csie self-requested a review January 26, 2026 07:23
@gurukamath gurukamath marked this pull request as ready for review January 26, 2026 14:20
@gurukamath gurukamath requested a review from marioevz January 26, 2026 14:20
Copy link
Collaborator

@LouisTsai-Csie LouisTsai-Csie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

"""
Total gas used in the block up to and including this transaction.
This is the gas used before refunds, used for block gas accounting.
This is the gas used after refunds, paid by the user.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to clarify, this field now contains this:

sum(tx.gas_used_before_refunds for tx in txs[:i]) + txs[i].gas_used_after_refunds

Copy link
Contributor Author

@gurukamath gurukamath Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. This is going to be

sum(tx.gas_used_after_refunds for tx in txs[:i]))

This is exactly how it was before EIP-7778. So essentially, EIP-7778 does not change the receipts themselves. (except the fact that block gas accounting will no longer be possible using just receipts)

@gurukamath gurukamath merged commit 80b55b0 into ethereum:eips/amsterdam/eip-7778 Jan 26, 2026
17 of 20 checks passed
felix314159 pushed a commit to felix314159/execution-specs that referenced this pull request Feb 4, 2026
fselmo pushed a commit to fselmo/execution-specs that referenced this pull request Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants