# Ethereum Blocks

> Apogee's reference workload. A revm guest that runs Ethereum blocks inside the VM, a stateless validator that matches every case of the zkEVM test release, and what a proof of a block says.

Apogee proves arbitrary RV32IMAC programs. Its reference workload, the one it is measured and tuned on, is the hardest common one: validating an Ethereum block inside the VM with revm, the Rust EVM. One library, `revm_block`, compiles both for the guest and for the host, and two binaries prove two different statements.

## Two binaries, two statements

| Binary | Advice | Journal | Says |
| --- | --- | --- | --- |
| `revm-block` | a `BlockWitness`: the pre-state the transactions read | per transaction, its status, gas and return data; a logs commitment; a post-state summary | some canonical witness makes `revm_block::run` produce this journal: a proof of an execution, not of a block's validity |
| `revm-block-stateless` | the stateless input of the zkEVM benchmark format | 43 bytes: the payload's root, the verdict, the chain id, the schema id | the payload with this root is, or is not, a valid block on this chain under this fork |

The **stateless validator** is the one that proves blocks. It implements `verify_stateless_new_payload` from Ethereum's execution specifications: it decodes the request, checks the ancestor headers and the header rules against the parent, recovers every sender, executes every transaction against a pre-state held to the parent's state root by hashes, applies withdrawals and requests, and recomputes the receipts root, bloom, gas, requests hash, block access list and post-state root. The witness needs no binding of its own: the published root fixes the payload, and the witness is held to it by hashes, so a wrong witness cannot make an invalid payload valid. A verdict of `false` means only that this input did not validate.

## Forks and conformance

The validator names the fork by the input's schema id, with no activation schedule compiled in: Osaka, BPO1, BPO2 and Amsterdam. All **67,251** pairs of the `tests-zkevm` v21.0.1 release match natively, and CI holds the library to a committed subset of 34 cases covering every rule the release reaches, in both input layouts.

## Delegations in practice

Both binaries declare `KECCAK_F`, `SHA256_COMP`, `MOD_MUL` and `EC_ADD`. Keccak reaches its circuit through `alloy-primitives`' native-keccak hook. SHA-256, secp256k1 and BN254 reach theirs through patched copies of `revm-precompile`, `k256` and `ark-ff`, each with upstream's code as its fallback path. Every sender is recovered in the guest under EIP-2's rules, with `k256` arithmetic that the patches route to `MOD_MUL` and `EC_ADD`.

The binaries are built `--release` and proved with every family whose height is a choice at `2^20`: the stateless binary's `.text` is about 1.96 MB, 96.6% of what a `2^20` table reaches.

## The measured block

Block 257,510 of `glamsterdam-devnet-8`, through `revm-block-stateless`: 60 transactions, 101.5 Mgas, 198 million cycles, cut into 207 shards. The base proof took 2,481 s on a 32-vCPU, 247.7 GiB machine and peaked at 174 GiB, recursion added about 2,620 s, and the contract accepted the result for 3,620,026 gas. [Performance](https://apogee.gweb3networks.com/docs/architecture/performance) breaks each stage down.

## What a block proof does not do

- **The validator takes its input from an external witness producer.** `eth_getProof` returns the trie nodes on each key's path, but a deletion that collapses a branch needs a sibling node that is on no changed key's path. The repository's recorder therefore cannot produce stateless inputs; they come from a `tests-zkevm` release or the zkEVM benchmark's datasets.
- **The mini-block binary proves an execution over a recorded pre-state**, usually a block's first few transactions, and makes no state-root claim. Its journal grows by a record per transaction and outgrows the public window, which is why full blocks go through the stateless validator.

The specification: [Ethereum blocks](https://apogee.gweb3networks.com/docs/auditors/spec/ethereum).
