Stateless Ethereum block validation
  • Rust 97.3%
  • Shell 2.7%
Find a file
History 2026-05-13 06:42:43 +01:00
.config ci: increase test timeout for fixture tests 2026-04-06 01:30:40 +01:00
.github/workflows Update EF-test fixtures to official witness generation pipeline (#25) 2026-05-13 06:42:43 +01:00
crates feat(testing): add BALs as part of the run outputs (#20) 2026-04-14 18:33:23 +01:00
scripts Update EF-test fixtures to official witness generation pipeline (#25) 2026-05-13 06:42:43 +01:00
testing Update EF-test fixtures to official witness generation pipeline (#25) 2026-05-13 06:42:43 +01:00
.gitignore chore: switch to official EEST zkevm fixtures (v0.3.3) 2026-04-14 09:57:55 +01:00
Cargo.lock Update EF-test fixtures to official witness generation pipeline (#25) 2026-05-13 06:42:43 +01:00
Cargo.toml Update EF-test fixtures to official witness generation pipeline (#25) 2026-05-13 06:42:43 +01:00
clippy.toml feat: disallow non-deterministic iteration order (#3) 2026-03-30 16:29:57 +01:00
LICENSE-APACHE commit 2026-02-14 17:13:02 +00:00
LICENSE-MIT commit 2026-02-14 17:13:02 +00:00
README.md feat(testing): add BALs as part of the run outputs (#20) 2026-04-14 18:33:23 +01:00
rustfmt.toml feat: initial stateless validation crate with EF test support 2026-02-12 11:28:02 +00:00

stateless

CI status Telegram Chat

Stateless Ethereum block validation using execution witnesses.

What is stateless?

stateless provides types and functions for validating Ethereum blocks without access to a full node's persistent database. Instead, it relies on pre-generated witness data that proves the specific state accessed during block execution.

It is built on top of reth and revm, and is designed to be no_std compatible for use in constrained environments such as zkVMs.

How it works

  1. Witness verification — The execution witness is verified against the parent block's state root using a sparse Merkle Patricia trie.
  2. Block execution — The block is executed in-memory using a witness-backed database (WitnessDatabase).
  3. Consensus validation — Post-execution consensus checks are performed.
  4. State root computation — The post-state root is calculated and compared against the block header.

Usage

The primary entry point is stateless_validation:

use stateless::{stateless_validation, ExecutionWitness};

let validation = stateless_validation(
    block,
    public_keys,
    witness,
    chain_spec,
    evm_config,
)?;

let block_hash = validation.block_hash;
let output = validation.execution_output;
let block_access_list = validation.block_access_list;

no_std

The stateless crate is #![no_std] compatible and builds for RISC-V targets (riscv32imac-unknown-none-elf), making it suitable for use in zkVM environments.

Running EF tests

To run the Ethereum Foundation blockchain tests with stateless validation:

# From the repository root:
./scripts/run_ef_tests.sh default
./scripts/run_ef_tests.sh zeth

Or manually:

# From the repository root:
./scripts/setup_ef_tests.sh
EF_TEST_TRIE=default cargo test -p ef-tests --release --features "asm-keccak ef-tests"

Contributing

Contributions are welcome! Join the conversation in the Telegram group.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.