Byte for byte with reth: how we check a new execution client
TL;DR
Cinder aims for the same answers as reth, byte for byte. This post describes the four layers of checks every change goes through, and the false alarms that taught us how to read them.
2026-10-07. Written against reth 2.0 on the desktop, before testing moved to a dedicated server. Against reth 2.7 the same checks later found new answer formats. The state today is in the note at the end of this post.
An execution client that disagrees with the network on a single block does not just have a bug. It is on a different chain. For Cinder we set a stricter goal than “agrees on blocks”: the same answers as reth, byte for byte, to the consensus client and to every JSON-RPC user. This post describes the four layers of checks that every change goes through, and the false alarms that taught us how to read them.
Layer 1: the Ethereum execution-spec-tests
The execution-spec-tests (EEST) are the shared conformance suite of Ethereum clients. A fixture is one test case: a start state, the input, and the result that every client must give. Version 5.4.0 has three kinds of fixtures, and Cinder runs all of them:
| fixtures | what they check | Osaka |
|---|---|---|
| state tests | one transaction on a given state: the post-state root and the logs | 19 517 |
| blockchain tests | chains of blocks, including invalid ones that must be rejected | 21 558 |
| Engine API tests | the same chains, sent as engine_newPayload and engine_forkchoiceUpdated calls |
21 577 |
Every Osaka fixture of the three kinds passes.
| Row | Passed |
|---|---|
| State tests (one transaction on a given state) | 19 517 fixtures |
| Blockchain tests (through the database and the block tree) | 21 558 fixtures |
| Engine API tests (through the Engine API handler) | 21 577 fixtures |
All pass, and the same holds for Paris, Shanghai, Cancun and Prague. That is the floor, not the goal. The suite is written for a client’s execution engine. Cinder has more than an engine between the test and the answer: a database, a tree of blocks in memory, a background writer, caches. So we run the same fixtures through every one of those paths:
- In memory: the engine alone, on a state built from the fixture.
- Through the database: the pre-state bulk-loaded into Cinder’s own database, one commit per block, the post-state read back from disk.
- Through the block tree: forks, reorgs and unwinds below the persisted head, as the node does them.
- Through JSON-RPC: the Engine API fixtures sent to the node’s real request handler.
- With the background writer: the same, with blocks written in batches on another thread while the next blocks execute.
Two runner options exist only to find bugs that the fixtures do not ask about:
--compare-batchwrites every test twice, one block per commit and in batches, and compares all 13 database tables entry by entry.--fork-stresstakes one pre-state group (3 773 tests in the largest Osaka group) and runs them as forks of one another, so every test unwinds the database below its persisted head. After each one, the history and state tables must be consistent.
Layer 2: real mainnet blocks next to reth
Fixtures are small. Mainnet blocks are not. In shadow mode, Cinder follows reth block by block on its own database. For each block it compares the state root, every receipt, the logs bloom, the gas used and the requests hash with the block header and with reth. Before the database existed, the v0.1.0 execution engine ran 1 074 consecutive mainnet blocks against reth. All were identical, with 0 differences.
The live node goes further. It runs behind a consensus client next to
reth, on mainnet, all the time. Every A/B test of a performance change runs
on that node, so every experiment is also a correctness run. Over all the
experiments so far, the count of INVALID answers to real blocks is 0.
Layer 3: every JSON-RPC answer against reth’s
Agreeing on blocks is enough for consensus. It is not enough for the people who use the node: wallets, indexers, block explorers. Their software expects reth’s exact answers, including the error codes and the error texts.
cinder-rpc-diff sends the same requests to Cinder and to reth on the same
machine and compares the answers as JSON:
- blocks, transactions, receipts and logs,
- balances, nonces, code and storage at the head and below it,
eth_call,eth_estimateGasand access lists, with state and block overrides,eth_sendRawTransactionrejections (the admission rules of the transaction pool, with the same codes and texts),eth_getProof, filters, and every tracer ofdebug_trace*andtrace_*.
A run sends some thousands of requests over live blocks. One run sent 3 544 requests on 80 blocks. Another sent 2 097 requests on the live node. The only result we accept is “0 differences”.
Two things made this harder than it sounds.
- Hash-map order. Some of reth’s answers come from a hash map, so their order changes from one call to the next. For those methods (some tracer outputs, access lists) the diff compares by content. We mark every such case in the results, so “identical” always means identical.
- Version quirks. The reth 2.0 on our machine writes the addresses in
txpool_*answers in lower case. The diff lower-cases the addresses in those answers before it compares them, and says so in the results.
Layer 4: differential fuzzing
The first three layers check cases that someone chose. Fuzzing checks the rest. Differential fuzzing means: make random inputs, give each one to two implementations, and report each input where the two disagree. With goevmlab, a fuzzing tool for EVMs, random programs run on Cinder’s EVM and on the EVM of another Ethereum client, and the traces must match step by step. One hour gave 8 348 tests. The count of differences was 0.
False alarms
A check that cries wolf trains people to ignore it. These are the false alarms we met, and what we changed so that they do not come back.
- Two runs, one database directory. Two Engine API runs that shared a database directory produced 331 and 7 066 failures. A run in its own directory passed 21 577 of 21 577. Every run now gets its own directory.
- A diff run with 1 358 differences. It came right after a restart of
the node, while a test suite loaded the machine, and the run did not keep
the requests. We reran it six times: 9 400 requests, 0 differences. We
never found the cause. What we changed is the tool:
--dumpnow keeps every request and answer that differ, so the next such run is evidence and not a mystery. - One
-32603in about five full runs of the Engine API suite. It did not come back in 600 runs of the single test or in five more full runs. We did not close it. An unexplained failure stays open as an issue until we can explain it.
Two runs in one database directory gave thousands of failures. Alone, the same run gave none.
| Row | Failures |
|---|---|
| Shared directory, first run (two Engine API runs at the same time) | 7 066 failures |
| Shared directory, second run (the other run of the pair) | 331 failures |
| Own directory (all 21 577 Engine API tests passed) | 0 failures |
What we take from it
- Run the shared test suite through every path that a real request takes, not only through the engine.
- Diff against a reference client on live traffic. Many of the bugs that matter to users are in error codes and error texts, not in the state root.
- Say “by content” when you compare by content.
- Keep a test that fails once in five runs open. Those are the bugs that cost the most once they reach production.
Updated 2026-10-23: against reth 2.7 the same checks found new
differences in the answers, and the release checks now run for one hour
on live mainnet. The story is in
113 equal answers was the wrong number.
The release check of 0.9.5 compared 68 232 JSON-RPC answers with
reth 2.7: 67 316 equal, 913 different by design, and 0 other differences. 0.9.4 fixed
the vmTrace code of a call to a contract that the same transaction
creates, one of the small differences that the note at the top named.