Skip to content

feat(spec-specs, spec-tests): add EIP-7843 SLOTNUM opcode#2853

Open
kclowes wants to merge 6 commits into
ethereum:forks/amsterdamfrom
kclowes:eips/amsterdam/eip-7843
Open

feat(spec-specs, spec-tests): add EIP-7843 SLOTNUM opcode#2853
kclowes wants to merge 6 commits into
ethereum:forks/amsterdamfrom
kclowes:eips/amsterdam/eip-7843

Conversation

@kclowes
Copy link
Copy Markdown
Contributor

@kclowes kclowes commented May 13, 2026

🗒️ Description

Merge EIP-7843 into forks/amsterdam.

🔗 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-->

felix314159 and others added 6 commits May 13, 2026 14:53
* feat(amsterdam): Implement EIP-7843 SLOTNUM opcode

* mario feedback
* fix(tests): minor updates to eip-7843 following ethereum#2007

* fix: account for slotnum in genesis creation

* fix: append slot_number in fixture_loader.py
Replace stale GAS_BASE reference with GasCosts.OPCODE_SLOTNUM (= BASE)
to match the opcode gas naming convention used across block
instructions on forks/amsterdam. Also update the test-fork mixin to use
gas_costs.BASE instead of the retired gas_costs.GAS_BASE.
@kclowes kclowes changed the title Eips/amsterdam/eip 7843 feat(spec-specs, spec-tests): add EIP-7843 SLOTNUM opcode May 13, 2026
@kclowes kclowes added A-spec-specs Area: Specification—The Ethereum specification itself (eg. `src/ethereum/*`) C-feat Category: an improvement or new feature A-spec-tests Area: tests for specifications e.g. json_infra labels May 13, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.94%. Comparing base (b087114) to head (409d33f).
⚠️ Report is 1 commits behind head on forks/amsterdam.

Files with missing lines Patch % Lines
src/ethereum/genesis.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           forks/amsterdam    #2853      +/-   ##
===================================================
- Coverage            86.94%   86.94%   -0.01%     
===================================================
  Files                  586      586              
  Lines                35767    35777      +10     
  Branches              3362     3363       +1     
===================================================
+ Hits                 31098    31106       +8     
- Misses                4010     4012       +2     
  Partials               659      659              
Flag Coverage Δ
unittests 86.94% <80.00%> (-0.01%) ⬇️

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.

@kclowes kclowes marked this pull request as ready for review May 13, 2026 21:31
@kclowes kclowes requested a review from marioevz May 13, 2026 21:31
Copy link
Copy Markdown
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

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

LGTM. cc @fselmo to sign off the two BAL changes included, thanks!

Comment on lines +706 to +708
# Clear block_access_list_hash if the fork doesn't require it
if not fork.header_bal_hash_required():
header.block_access_list_hash = None
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

cc @fselmo: is this change correct? It comes from the EIP-7843 so I wonder why it's only causing issues there and not in forks/amsterdam?

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.

Hmm I'm not sure what the state of the code was when this was added but neither of these are necessary anymore. I removed them locally and everything seems to pass. I'm kind of confused on this check tbh, as well as the one below.

)
if bal != t8n_bal:
# If the BAL was modified, update the header hash
if bal != t8n_bal and fork.header_bal_hash_required():
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

cc @fselmo same with this added check here.

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.

see previous comment

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

5 participants