Skip to content

Tracking PR for projects/zkEVM - #2268

Draft
kevaundray wants to merge 343 commits into
forks/amsterdamfrom
projects/zkevm
Draft

Tracking PR for projects/zkEVM#2268
kevaundray wants to merge 343 commits into
forks/amsterdamfrom
projects/zkevm

Conversation

@kevaundray

@kevaundray kevaundray commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds end-to-end Amsterdam stateless validation support for EIP-8025 optional proofs. It introduces the fork-level stateless input/output model, execution witness handling (state, codes, headers), SSZ serialization, host-side witness/input construction, and guest-side replay through a witness-backed pre-state.

It also extends the EEST filling and consumption pipeline so generated fixtures can assert, mutate, serialize, and consume execution witnesses. The Amsterdam test suite now covers witness generation and validation for state proofs, bytecode reads, ancestor headers, transaction public keys, chain config, and malformed stateless inputs.

Spec Changes

  • Adds Amsterdam execution-engine types and helpers around ExecutionPayload, NewPayloadRequest, typed ExecutionRequests, payload-to-header conversion, versioned-hash validation, and newPayload execution.
  • Adds ExecutionWitness, StatelessInput, ChainConfig, and StatelessValidationResult, plus an SSZ schema with a stateless input schema prefix.
  • Adds a host/guest split:
    • host builds stateless input from an executed block, execution witness, BAL, requests, chain config, and recovered transaction public keys;
    • guest decodes input, validates chain config and witness headers, builds a witness-backed pre-state, re-executes the payload, and returns the validation result.
  • Adds incremental MPT support and WitnessState so account/storage/code reads and post-state-root recomputation can be performed from witness material.
  • Refactors Amsterdam block execution to work against the PreState protocol, return BlockDiff, track code reads and ancestor header accesses, and optionally use supplied transaction public keys during stateless replay.
  • Makes execution witness validation soundness-oriented: replay requires sufficient witness material, while canonical fixture output properties such as sorting and exhaustiveness are asserted by the test framework.

Test Changes

  • Adds the Amsterdam eip8025_optional_proofs suite covering roughly 100 witness/stateless tests.
  • Bytecode witness coverage includes call variants, contract creation, EXTCODE*, SELFDESTRUCT, EIP-7702 delegation cases, EOAs/precompiles, and implicit system-contract code.
  • State witness coverage includes account/storage reads, absent accounts/slots, writes, deletes, branch compression/replay order, failed calls, and reverted execution.
  • Header witness coverage includes mandatory parent headers, BLOCKHASH offsets and boundaries, reverted paths, malformed headers, missing ancestors, and non-contiguous chains.
  • Stateless validation negative coverage includes missing state/code/header proofs, invalid public keys and y-parity cases, invalid chain config, malformed/stateless input bytes, and acceptance of complete but over-provided or unsorted witnesses.
  • Adds lower-level tests for incremental MPT behavior, witness-backed state replay, stateless guest input/output handling, RPC witness decoding, and filler witness expectations.

Testing Framework / Tooling Changes

  • t8n can now emit executionWitness, statelessInputBytes, and statelessOutputBytes, and has a --no-stateless escape hatch for cases where stateless artifacts should not be generated.
  • Blockchain fillers can declare expected_execution_witness_codes, expected_execution_witness_state, and expected_execution_witness_headers, plus witness/public-key/raw-input modifiers for negative stateless validation tests.
  • Fixtures can mark deliberately mutated witnesses with executionWitnessMutated, so consume tests can skip fixture witnesses that are intentionally not client-reproducible.
  • Adds an engine-witness consume simulator that drives payloads through engine_newPayloadWithWitnessV* or REST POST /new-payload-with-witness --ssz, then strictly diffs client-emitted witnesses against fixture witnesses.
  • Updates RPC models to decode both JSON-RPC/RLP and REST/SSZ witness responses.
  • Adds zkevm fixture release config and comparison/parity workflows for Amsterdam fixture generation.

@kevaundray kevaundray mentioned this pull request Feb 21, 2026
7 tasks
@codecov

codecov Bot commented Feb 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.27237% with 125 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.90%. Comparing base (b462ba2) to head (386250b).
⚠️ Report is 7 commits behind head on forks/amsterdam.

Files with missing lines Patch % Lines
src/ethereum/forks/amsterdam/incremental_mpt.py 86.31% 27 Missing and 25 partials ⚠️
src/ethereum/utils/ssz.py 88.76% 9 Missing and 11 partials ⚠️
...um/forks/amsterdam/execution_engine/new_payload.py 66.66% 16 Missing and 2 partials ⚠️
src/ethereum/forks/amsterdam/witness_state.py 91.72% 5 Missing and 6 partials ⚠️
...ereum/forks/amsterdam/execution_engine/requests.py 91.22% 5 Missing and 5 partials ⚠️
...eum/forks/amsterdam/stateless_host_exec_witness.py 95.83% 3 Missing and 1 partial ⚠️
src/ethereum/forks/amsterdam/state_tracker.py 82.35% 3 Missing ⚠️
src/ethereum/forks/amsterdam/fork.py 83.33% 1 Missing and 1 partial ⚠️
src/ethereum/forks/amsterdam/stateless_host.py 95.23% 2 Missing ⚠️
...ks/amsterdam/execution_engine/forkchoice_update.py 80.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@                 Coverage Diff                 @@
##           forks/amsterdam    #2268      +/-   ##
===================================================
- Coverage            94.01%   93.90%   -0.12%     
===================================================
  Files                  624      638      +14     
  Lines                36905    38168    +1263     
  Branches              3326     3546     +220     
===================================================
+ Hits                 34695    35840    +1145     
- Misses                1533     1603      +70     
- Partials               677      725      +48     
Flag Coverage Δ
unittests 93.89% <90.19%> (-0.12%) ⬇️

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.

@jsign jsign added the zkEVM zkEVM project related issues/PRs label Feb 23, 2026
@kevaundray kevaundray changed the title chore(do not merge): Tracking PR for projects/zkEVM Tracking PR for projects/zkEVM Mar 7, 2026
jsign and others added 25 commits March 9, 2026 11:05
fix(zkevm): Cache RLP and hash in `_encode_mutable_node_to_extended`
chore(zkevm): Document HashedNode collapse behaviour with test
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
feat(zkevm): Add execution witness bytecode assertions and mutation support
… system contracts inclusion

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
…variants

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
…act creations

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
feat(zkevm): add test for execution witness bytecodes for contract creation, CALL-variants and empty block
Signed-off-by: jsign <jsign.uy@gmail.com>
fix(zkevm): optimize further bytecode in witness
feat(zkevm): add execution witness bytecode test coverage for EXTCODE* opcodes, 7702 and eoa/precompile targets
jsign added 22 commits August 3, 2026 17:15
feat: update stateless validation to include schema fork index and refactor chain config handling
fix(zkevm): preserve extra data in environment and update block artifact construction
…te and codes in SszExecutionWitness and SszStatelessInput
feat(zkevm): replace SszList with ProgressiveList for state, codes, and public keys
Signed-off-by: jsign <jsign.uy@gmail.com>
feat(zkevm): update geth branch for bench filling comparison
refactor(zkevm): align SSZ capitalization
feat(zkevm): automate zkevm benchmark filling releases
feat(zkevm): use annotated ssz to avoid type duplication
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

zkEVM zkEVM project related issues/PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants