Skip to content

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

Merged
marioevz merged 8 commits into
ethereum:forks/amsterdamfrom
kclowes:eips/amsterdam/eip-7843
May 14, 2026
Merged

feat(spec-specs, spec-tests): add EIP-7843 SLOTNUM opcode#2853
marioevz merged 8 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 (08a7dac).
⚠️ Report is 4 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 thread packages/testing/src/execution_testing/specs/blockchain.py Outdated
Comment thread packages/testing/src/execution_testing/specs/blockchain.py Outdated
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.

Some extra cases, feel free to add to this PR or the testing tracker.

  1. Multi block case, where we have two blocks ("within the same slot") where block 1 and 2 do not have the same slot number.
  2. Fork transition test. Check not enabled before fork and enabled after fork.

We should add a mainnet test for execute here too I think!

Comment thread src/ethereum/forks/amsterdam/blocks.py
Comment thread tests/amsterdam/eip7843_slotnum/spec.py Outdated
@kclowes
Copy link
Copy Markdown
Contributor Author

kclowes commented May 14, 2026

@spencer-tb I don't want to block this process, so added an issue here: #2856 ! Will pick up shortly.

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, thanks!

@marioevz marioevz dismissed spencer-tb’s stale review May 14, 2026 17:15

Comments were addressed and new requested tests are tracked in a new issue.

@marioevz marioevz merged commit b3f5df5 into ethereum:forks/amsterdam May 14, 2026
33 of 34 checks passed
@kclowes kclowes deleted the eips/amsterdam/eip-7843 branch May 14, 2026 17:15
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