Skip to content

fix(tests): Failing initcode test#2355

Merged
marioevz merged 1 commit into
ethereum:eips/amsterdam/eip-7954from
marioevz:eips/amsterdam/eip-7954
Feb 27, 2026
Merged

fix(tests): Failing initcode test#2355
marioevz merged 1 commit into
ethereum:eips/amsterdam/eip-7954from
marioevz:eips/amsterdam/eip-7954

Conversation

@marioevz
Copy link
Copy Markdown
Member

🗒️ Description

Fixes initcode tests by increasing the number of access-list items so that the datafloor cost does not exceed the intrinsic transaction cost and invalidates the test.

I did a (manual) binary search to find this value, but this can definitely be automated in the python method, even in forks/amsterdam.

🔗 Related Issues or PRs

N/A.

✅ 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.
  • 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-->

@marioevz marioevz requested a review from spencer-tb February 27, 2026 16:17
Copy link
Copy Markdown
Contributor

@spencer-tb spencer-tb left a comment

Choose a reason for hiding this comment

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

LGTM!

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (eips/amsterdam/eip-7954@e106006). Learn more about missing BASE report.

Additional details and impacted files
@@                    Coverage Diff                     @@
##             eips/amsterdam/eip-7954    #2355   +/-   ##
==========================================================
  Coverage                           ?   82.95%           
==========================================================
  Files                              ?      642           
  Lines                              ?    39414           
  Branches                           ?     4059           
==========================================================
  Hits                               ?    32697           
  Misses                             ?     5997           
  Partials                           ?      720           
Flag Coverage Δ
unittests 82.95% <ø> (?)

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 marioevz merged commit b709715 into ethereum:eips/amsterdam/eip-7954 Feb 27, 2026
14 checks passed
marioevz added a commit that referenced this pull request Mar 24, 2026
marioevz added a commit that referenced this pull request Apr 8, 2026
github-actions Bot pushed a commit that referenced this pull request Apr 10, 2026
spencer-tb pushed a commit to spencer-tb/execution-specs that referenced this pull request Apr 20, 2026
Carsons-Eels pushed a commit that referenced this pull request Apr 27, 2026
marioevz added a commit that referenced this pull request May 15, 2026
…2850)

* ✨ feat(specs,tests): Implement EIP-7954 (#2276)

* ✨ feat: Tests for new contract size

* ✨ feat: Gas metering of initcode

* ✨ feat: Transition, Mainnet tests

* 🧹 chore: Names

* fix: use gas constant instead of hard-coded number

* fix: remove references to old_max that are not in tests

* fix: align with other forks; use 2*code_size for initcode size

* chore: fix lint

* refactor: simplify gas calculation with gas cost API; add post check

* refactor: use opcode metadata for gas calc

* feat(test): add max_code with max_init_code in same test

* refactor: simplify calls to compute_create_address; no conditional necessary

* 🧹 chore: Simplify docstring

* 🧹 chore: Simplify opcode based testing

* 🧹 chore: Better names

* 🧹 chore: types

* version

Co-authored-by: felipe <fselmo2@gmail.com>

* feat(test): use deterministic deploy for similar contracts

* refactor: use same max-size self-checking contract for tests

- DRY max size contract for mainnet by including the superset in one
  and removing subset tests

---------

Co-authored-by: raxhvl <raxhvl@users.noreply.github.com>
Co-authored-by: fselmo <fselmo2@gmail.com>

* fix(tests): Failing initcode test (#2355)

* refactor(tests): remove gas metering test moved to EIP-8037

The 2D gas metering test for max initcode size via CREATE is an
EIP-8037 concern and now lives in the 8037 test suite. The 7954 max
initcode enforcement is covered by test_max_initcode_size_via_create.

* fix(tests): Merge issues

* refactor(tests): Condition EIP-7954 to EIP Inclusion

* refactor(tests): gate pre-EIP-7954 code size tests before EIP7954

These ported_static tests hardcode sizes around the pre-EIP-7954
24 KiB MAX_CODE_SIZE / 48 KiB MAX_INITCODE_SIZE limits, so paths
that previously failed now succeed on Amsterdam and break their
Account.NONEXISTENT expectations. I marked them valid_before(EIP7954).
The remaining 22 params still cover EIP-2929 warming on Amsterdam.
Equivalent Amsterdam-side coverage is provided by
eip7954_increase_max_contract_size/test_max_code_size.py and
test_max_initcode_size.py, which size against fork.max_code_size() /
fork.max_initcode_size() and follow the same creation-tx, CREATE,
and CREATE2 paths with the new limits.

* fix(tests): cover warm-after-failed-create over max code size

---------

Co-authored-by: raxhvl <10168946+raxhvl@users.noreply.github.com>
Co-authored-by: raxhvl <raxhvl@users.noreply.github.com>
Co-authored-by: fselmo <fselmo2@gmail.com>
Co-authored-by: Mario Vega <marioevz@gmail.com>
Co-authored-by: spencer-tb <spencer.tb@ethereum.org>
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.

2 participants