Skip to content

feat(spec): EIP-8237 partial header hash#2770

Draft
nerolation wants to merge 7 commits into
ethereum:forks/amsterdamfrom
nerolation:toni/eip-8237
Draft

feat(spec): EIP-8237 partial header hash#2770
nerolation wants to merge 7 commits into
ethereum:forks/amsterdamfrom
nerolation:toni/eip-8237

Conversation

@nerolation
Copy link
Copy Markdown
Contributor

🗒️ Description

EIP-8237: Partial Header Hash implementation

  • Add Header.partial_header_hash (last RLP field, included in block_hash)
  • compute_partial_header_hash: SHA2-256 over (parent_hash || prev_randao || gas_limit_LE || timestamp_LE || withdrawals(44B) || slot_LE || requests)
  • Minimal ExecutionPayload; STF checks payload == expected == header
  • Add engine_getPartialHeaderHashByBlockHashV1 for debugging
  • 15 unit tests: encoding, mismatches, header tampering, multi-block linkage, empty withdrawals/requests, fork boundary, empty-slot gaps, engine API roundtrip

🔗 Related Issues or PRs

N/A.

✅ Checklist

felix314159 and others added 6 commits April 27, 2026 17:06
* 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.
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.82%. Comparing base (93984e2) to head (6d7cae9).
⚠️ 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    #2770      +/-   ##
===================================================
- Coverage            88.17%   87.82%   -0.36%     
===================================================
  Files                  577      525      -52     
  Lines                35659    31930    -3729     
  Branches              3490     3082     -408     
===================================================
- Hits                 31442    28042    -3400     
+ Misses                3654     3373     -281     
+ Partials               563      515      -48     
Flag Coverage Δ
unittests 87.82% <0.00%> (-0.36%) ⬇️

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.

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.

5 participants