Skip to content

Conversation

@LouisTsai-Csie
Copy link
Collaborator

@LouisTsai-Csie LouisTsai-Csie commented Jan 15, 2026

🗒️ Description

Implement eip-7778 test cases.

  1. test_simple_gas_accounting: User should receive the refund, block accounting should exclude refund.
  2. test_multi_block_gas_accounting: Block accounting should exclude refund, and the transaction receipt should reflect the cumulative gas usage.

🔗 Related Issues or PRs

Require PR #1401

✅ 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 adding an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.
  • Tests: For PRs implementing a missed test case, update the post-mortem document to add an entry the list.
  • Ported Tests: All converted JSON/YML tests from ethereum/tests or tests/static have been assigned @ported_from marker.

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@LouisTsai-Csie LouisTsai-Csie self-assigned this Jan 15, 2026
@LouisTsai-Csie LouisTsai-Csie added C-feat Category: an improvement or new feature A-spec-tests Area: tests for specifications e.g. json_infra labels Jan 15, 2026
@LouisTsai-Csie LouisTsai-Csie changed the base branch from forks/amsterdam to eips/amsterdam/eip-7778 January 15, 2026 09:33
@LouisTsai-Csie LouisTsai-Csie changed the title feat(test-): add eip7778 simple test feat(spec-tests): add eip7778 simple test Jan 15, 2026
@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.33%. Comparing base (2c83b84) to head (e958b62).

Additional details and impacted files
@@                   Coverage Diff                    @@
##           eips/amsterdam/eip-7778    #2026   +/-   ##
========================================================
  Coverage                    86.33%   86.33%           
========================================================
  Files                          538      538           
  Lines                        34557    34557           
  Branches                      3222     3222           
========================================================
  Hits                         29835    29835           
  Misses                        4148     4148           
  Partials                       574      574           
Flag Coverage Δ
unittests 86.33% <ø> (ø)

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.

@marioevz
Copy link
Member

We need a negative test where a block is invalid due to:

  • Tx with refunds pushes the used block gas up to BLOCK_GAS_LIMIT - 20_999
  • Simple transfer transaction is included when it should have not because BLOCK_GAS_USED + 21_000 > BLOCK_GAS_LIMIT, where BLOCK_GAS_USED is the gas used without subtracting any refunds.

@LouisTsai-Csie LouisTsai-Csie merged commit d96a68b into ethereum:eips/amsterdam/eip-7778 Jan 20, 2026
15 of 16 checks passed
@LouisTsai-Csie
Copy link
Collaborator Author

I am so sorry, but i accidentally merge this PR to a wrong branch. I've recreated PR #2045 for the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-spec-tests Area: tests for specifications e.g. json_infra C-feat Category: an improvement or new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants