Skip to content

feat(spec-specs): EIP-8037 - check static context upfront in CREATE opcodes - #2978

Merged
SamWilsn merged 1 commit into
ethereum:forks/amsterdamfrom
spencer-tb:fix/create-static-check-upfront
Jun 11, 2026
Merged

SamWilsn merged 1 commit into
ethereum:forks/amsterdamfrom
spencer-tb:fix/create-static-check-upfront

Conversation

@spencer-tb

@spencer-tb spencer-tb commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🗒️ Description

Restores the upfront static context check in CREATE/CREATE2, reverted during #2901 review (thread).

Already pushed to devnets/bal/7 as cd19a9addc.

Details

Before EIP-8037 the check position didn't matter: the static violation burns all the frame's gas either way. With EIP-8037 it does:

  • CREATE/CREATE2 charge NEW_ACCOUNT state gas before the static check.
  • If the frame's reservoir can't cover it, the rest is taken from gas_left.
  • The static check then halts the frame, and the caller gets all charged state gas back as reservoir
  • The caller now has more reservoir than it sent, so it can pay for state it otherwise couldn't, so get different state root.

🔗 Related Issues or PRs

Reverts part of ac39618.

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

Cute Animal Picture

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

@spencer-tb spencer-tb added A-spec-specs Area: Specification—The Ethereum specification itself (eg. `src/ethereum/*`) C-feat Category: an improvement or new feature P-high labels Jun 11, 2026
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.53%. Comparing base (26ff8a6) to head (e981b8b).

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #2978   +/-   ##
================================================
  Coverage            90.53%   90.53%           
================================================
  Files                  535      535           
  Lines                32893    32895    +2     
  Branches              3021     3022    +1     
================================================
+ Hits                 29780    29782    +2     
  Misses                2595     2595           
  Partials               518      518           
Flag Coverage Δ
unittests 90.53% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@gurukamath gurukamath 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.

Before

@SamWilsn
SamWilsn merged commit 49f4697 into ethereum:forks/amsterdam Jun 11, 2026
26 checks passed
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/*`) C-feat Category: an improvement or new feature P-high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants