Skip to content

feat(spec-specs, tests): 8037 more 2d edge cases#2735

Merged
fselmo merged 3 commits into
ethereum:devnets/bal/7from
kclowes:feat/8037-2d-edge-cases
May 8, 2026
Merged

feat(spec-specs, tests): 8037 more 2d edge cases#2735
fselmo merged 3 commits into
ethereum:devnets/bal/7from
kclowes:feat/8037-2d-edge-cases

Conversation

@kclowes

@kclowes kclowes commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

🗒️ Description

A couple more edge cases for the 2d gas calculation:

  • test_tx_accepted_when_regular_gas_exactly_fits_block_limit_small: Regular gas inclusion boundary: accept a tx whose regular gas exactly equals remaining block budget (counterpart to existing rejection test; catches > vs >= off-by-one)
  • updates test_failed_create_tx_refunds_intrinsic_new_account with an expectation around gas used in tx receipt

🔗 Related Issues or PRs

N/A.

✅ Checklist

  • All: Ran fast static checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    just 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.
  • 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-->

@kclowes kclowes added A-spec-specs Area: Specification—The Ethereum specification itself (eg. `src/ethereum/*`) C-feat Category: an improvement or new feature A-tests Area: Consensus tests. labels Apr 20, 2026
@kclowes kclowes requested a review from spencer-tb April 20, 2026 21:00
@codecov

codecov Bot commented Apr 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (devnets/bal/7@eb80b43). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             devnets/bal/7    #2735   +/-   ##
================================================
  Coverage                 ?   85.58%           
================================================
  Files                    ?      630           
  Lines                    ?    39600           
  Branches                 ?     3936           
================================================
  Hits                     ?    33891           
  Misses                   ?     5084           
  Partials                 ?      625           
Flag Coverage Δ
unittests 85.58% <ø> (?)

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.

@spencer-tb spencer-tb force-pushed the eips/amsterdam/eip-8037 branch 3 times, most recently from de71eca to f2049fb Compare April 21, 2026 01:25
@fselmo fselmo force-pushed the eips/amsterdam/eip-8037 branch from 638baf0 to 4dab63c Compare May 5, 2026 21:19
@kclowes kclowes changed the base branch from eips/amsterdam/eip-8037 to devnets/bal/7 May 7, 2026 20:49
@kclowes kclowes force-pushed the feat/8037-2d-edge-cases branch from 1b0780a to 6ac8e40 Compare May 7, 2026 20:50
@kclowes kclowes marked this pull request as ready for review May 7, 2026 20:58
@kclowes kclowes requested a review from fselmo May 7, 2026 20:58

@fselmo fselmo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we can combine the blockchain_test and state_test variants into one, which might be nicer. Lmk what you think? [mixed up my comments here, see my comment below!]

Comment thread tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_create.py Outdated
@kclowes kclowes force-pushed the feat/8037-2d-edge-cases branch from 6ac8e40 to 1bcbc8d Compare May 8, 2026 17:11
@kclowes

kclowes commented May 8, 2026

Copy link
Copy Markdown
Contributor Author

@fselmo thank you! Rebased and combined. I'm not sure how much value the second test really adds any more, so happy to get rid of it, just lmk. Also switched one of the blockchain_tests to a state_test.

@fselmo fselmo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm, just pushed the DRY refactor we chatted about 🚀

@kclowes

kclowes commented May 8, 2026

Copy link
Copy Markdown
Contributor Author

Changes LGTM! Thanks!

@fselmo fselmo merged commit 9d3906e into ethereum:devnets/bal/7 May 8, 2026
18 checks passed
spencer-tb pushed a commit to spencer-tb/execution-specs that referenced this pull request May 22, 2026
* feat(spec-specs, tests): 8037 2d edge cases

* refactor(tests): Combine almost duplicated tests

* refactor(test): DRY - merge boundary tests together and parametrize

---------

Co-authored-by: fselmo <fselmo2@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-spec-specs Area: Specification—The Ethereum specification itself (eg. `src/ethereum/*`) A-tests Area: Consensus tests. C-feat Category: an improvement or new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants