Skip to content

feat(spec-specs, tests): add EIP-7954 Increase Maximum Contract Size#2850

Open
Carsons-Eels wants to merge 5 commits into
ethereum:forks/amsterdamfrom
Carsons-Eels:eips/amsterdam/eip-7954
Open

feat(spec-specs, tests): add EIP-7954 Increase Maximum Contract Size#2850
Carsons-Eels wants to merge 5 commits into
ethereum:forks/amsterdamfrom
Carsons-Eels:eips/amsterdam/eip-7954

Conversation

@Carsons-Eels
Copy link
Copy Markdown
Contributor

@Carsons-Eels Carsons-Eels commented May 13, 2026

🗒️ Description

Merge changes necessary for implementing EIP-7954 into the forks/amsterdam branch.

🔗 Related Issues or PRs

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

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->
Baby Dumpling Squid” by Saspotato, CC BY-NC-SA 2.0

raxhvl and others added 5 commits April 27, 2026 16:52
* ✨ 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>
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.
@Carsons-Eels Carsons-Eels requested review from fselmo and marioevz and removed request for fselmo May 13, 2026 16:30
@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.79%. Comparing base (93984e2) to head (9d5f65a).
⚠️ Report is 26 commits behind head on forks/amsterdam.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           forks/amsterdam    #2850      +/-   ##
===================================================
+ Coverage            88.17%   89.79%   +1.61%     
===================================================
  Files                  577      487      -90     
  Lines                35659    28885    -6774     
  Branches              3490     2621     -869     
===================================================
- Hits                 31442    25937    -5505     
+ Misses                3654     2433    -1221     
+ Partials               563      515      -48     
Flag Coverage Δ
unittests 89.79% <ø> (+1.61%) ⬆️

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.

@danceratopz danceratopz changed the title feat(spec-specs, spec-tests): add EIP-7954 Increase Maximum Contract Size feat(spec-specs, tests): add EIP-7954 Increase Maximum Contract Size May 13, 2026
@danceratopz danceratopz added A-tests Area: Consensus tests. C-feat Category: an improvement or new feature A-spec-specs Area: Specification—The Ethereum specification itself (eg. `src/ethereum/*`) labels May 13, 2026
@Carsons-Eels Carsons-Eels marked this pull request as ready for review May 14, 2026 18:23
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.

5 participants