Cinder

The mainnet workload that took our lead, and two caches that gave it back

TL;DR

In the last 551 blocks of the 0.9.3 window, Cinder's median lead over reth 2.7 fell from 33.2 to 3.8 ms per block. The block gas did not change. The cause was one mainnet workload that computes the same hashes and reads the same block hashes thousands of times in each transaction. Cinder did that work again each time. 0.9.4 keeps the keccak results of short inputs in a cache for the process, and keeps each BLOCKHASH answer for the rest of its block. Then we measured the blocks where the workload used 40% of the gas or more. On them, Cinder 0.9.4 took 60.0 ms by median, against 82.7 ms for reth and 106.9 ms for 0.9.3. 0.9.5 also caches the 96-byte inputs of the workload: 97% of them now come from the cache.

For most of 2026-10-19, Cinder 0.9.3 was far ahead of reth 2.7 on the measurement server: -33.2 ms per block by median, and faster on 96% of the blocks. Then, in the last 551 blocks of the 24-hour window, the lead fell to -3.8 ms. Cinder was faster on only 63% of those blocks.

The blocks were not bigger. The median block gas in that hour was 28.9 Mgas (millions of gas), as in the other hours. Cinder’s own time went up, and reth’s time went down. This post tells how we found the cause, what Cinder did wrong, the two caches of 0.9.4 that fixed it, and one more cache that 0.9.5 added.

The drop, block by block

The strip is reth’s time minus Cinder’s time for each block, in block order. Up means that Cinder took less time. At the right end, the bars go down.

Every block: who was faster

Cinder faster on 6,748 blocks, reth faster on 441 blocks, equal on 2.

Each thin bar is one block, reth time minus Cinder time, 7,191 blocks in order over 24 hours. Bars over +200 ms are cut and get a dot (112 blocks).

Blocks per 10 ms of difference. The 2 equal blocks are not in a bin. 7,191 blocks, 2026-10-18 to 2026-10-19.

Before 18:30, reth took almost twice Cinder’s time by median. After 18:30, the two medians were almost level.

RowCinder 0.9.3reth 2.7
Before 18:30 (6 640 blocks)45.7 ms84.6 ms
From 18:30 to the end of the window (551 blocks)61.7 ms63.5 ms
Median engine_newPayload time, in ms, bars from zero. The 0.9.3 window, 2026-10-18 to 2026-10-19 (server time for 18:30), the reference instance and reth 2.7 on the same blocks, the measurement server, live mainnet. Record: docs/results/2026-10-v093-window.md.
engine_newPayload, median blocks Cinder 0.9.3 reth 2.7 Cinder minus reth, per block Cinder faster
before 18:30 6 640 45.7 ms 84.6 ms -33.2 ms 96%
from 18:30 551 61.7 ms 63.5 ms -3.8 ms 63%

“Cinder minus reth, per block” is the median of the per-block differences, not the difference of the two medians. The engine log of Cinder showed where the time went: from 18:30 to 19:30, the execution step took 64 ms per block by median, against 35 to 39 ms before 14:00. The database reads of the executing thread went down in the same hour. So the node did more work in the EVM, not more work on disk.

What we checked first, and why it was not that

A drop in the evening can have many causes on a shared server. We checked each one against the logs before we looked at the blocks:

Later that evening the consensus client of the server restarted for an upgrade. The window ends at the last block before that restart, so the setup changes after it are not in these numbers.

The cause: one workload, the same work again and again

The blocks had the same gas, but not the same contents. From the afternoon on, one workload filled a larger and larger part of each block with compute-only transactions: few storage reads, millions of EVM steps, and two operations repeated thousands of times:

On 30 blocks with this workload, the EVM ran 25 759 KECCAK256 operations per block. On the usual set of 1 074 mainnet blocks that we use for tests, it ran 4 292 per block.

Cinder computed each hash again, and read each block hash from the database again: one database lookup per BLOCKHASH, each time. A profile of both clients on the same blocks showed much more time in keccak on Cinder than on reth. So the gas of this workload cost Cinder more than other gas, and cost reth less. When the workload replaced other transactions in the blocks, reth got faster and Cinder got slower, with the same gas.

Two caches in 0.9.4

A keccak cache by input. Inputs of 20, 32 and 64 bytes go through a table of the process: addresses, storage keys, log topics, Solidity mapping keys in KECCAK256, public keys. An entry holds the whole input and its hash, so a hit gives the exact hash, never a near match. Two inputs on the same entry only replace each other. Readers take no lock: each entry has a sequence number that a writer changes before and after its write, and a reader uses the entry only when the number did not change. The table stays for the life of the process, so the hashes of one block help the next. We also gave keccak a direct path for an input that fits in one block of the hash function, which all hashes use.

A hit costs a few nanoseconds. The hash costs about 470.

RowBefore: byte by byteOne-block pathCache hit
20-byte input (an address)476 ns471 ns12 ns
32-byte input (a storage key)473 ns460 ns14 ns
64-byte input (a mapping key)511 ns461 ns21 ns
Time of one keccak-256 hash, in ns, log axis. Minimum of 5 runs of 200 000 hashes on one core of a desktop computer, 2026-10-19. The hits come from a small set of inputs, so they are in the CPU caches. Record: docs/results/2026-10-keccak-cache.md.
One hash before one-block path cache hit
20 bytes 476 ns 471 ns 12 ns
32 bytes 473 ns 460 ns 14 ns
64 bytes 511 ns 461 ns 21 ns

A hit in a test loop is the best case. On real blocks, most of the table is not in the CPU caches. So we also did a cold run of the 1 074 usual blocks, each block one time. Keccak went from 11.9% of the block execution time to 8.3%. Block execution took 0.949 of the time before (95% interval 0.931 to 0.966). The one-block path alone gave 0.986. The cache gave the rest. The state root did not change (0.995): its inputs are trie nodes of hundreds of bytes, and the cache does not take them. Record: docs/results/2026-10-keccak-cache.md.

A BLOCKHASH cache for each block. The first BLOCKHASH of a number in a block reads the hash as before and keeps it. The next ones in the same block use the kept hash. A failed read is not kept. A new block, or another branch of the chain, starts with an empty cache.

On one mainnet block with 79% of its gas from the workload, the EVM ran 73 920 BLOCKHASH operations. With the cache, the node read the block hashes from its backend 10 times.

What we decided not to do. The first plan was to fill all 256 block hashes before each block. We did not do that. An execution witness (the data that lets another node check a block without the full state) lists the block headers that BLOCKHASH read. A fill before the block would read all 256 and change the witness. The cache fills at the first read of each number, so the witness stays the same. We also did not make the keccak cache a table for each block: a node sees the same addresses and storage keys block after block, and a table for the process keeps them.

The result on the blocks of the workload

On blocks where the workload used 40% of the gas or more, Cinder with the caches took 60.0 ms by median. reth took 82.7 ms, and 0.9.3 took 106.9 ms.

RowCinder 0.9.3reth 2.7Cinder 0.9.4 (both caches)
Blocks with 40% or more of the gas from the workload106.9 ms82.7 ms60 ms
Median engine_newPayload time, in ms, bars from zero. The same blocks on all three nodes: 0.9.3 on the reference instance, the build with both caches on a test instance, reth 2.7. The measurement server, live mainnet, the night of 2026-10-19 to 2026-10-20. Record: docs/results/2026-10-blockhash-cache.md.
Blocks with 40% or more of the gas from the workload median engine_newPayload
Cinder 0.9.3 106.9 ms
reth 2.7 82.7 ms
Cinder 0.9.4 (both caches) 60.0 ms

The block mix changed over the night, so the record also fits the cost of each kind of gas over all blocks of each part of the run. On the test instance, the gas of the workload cost 1.76 ms per Mgas without the BLOCKHASH cache (95% interval 1.62 to 1.99) and 1.29 ms with it (1.20 to 1.36). The reference instance with 0.9.3 stayed at 3.0 to 3.1 ms per Mgas in both parts. Other gas did not change.

A benchmark that could not see the fix. We also replayed six mainnet blocks on a desktop, four of them with the workload, with and without the BLOCKHASH cache. The two builds were equal within the noise. The replay was not wrong. It was blind. A replay takes its block hashes from the witness, a short list of about 10 headers, and that lookup is fast. On the node, each BLOCKHASH searched the blocks not yet written and then did a database lookup. Only the live node had the cost, so only the live node could show the gain.

The 0.9.4 release check then ran for one hour on live mainnet: 298 of 298 blocks VALID, Cinder faster than reth on 90.8% of them (median 47.3 against 57.9 ms).

The 96 bytes that still missed

The counts on the workload blocks showed one more gap. The keccak cache took inputs of 20, 32 and 64 bytes. The workload also hashes 96-byte inputs. On the 30 workload blocks, 96-byte inputs were 6.3% of the KECCAK256 operations, against 0.7% on the 1 074 usual blocks. Each of them missed the cache.

0.9.5 adds a second table for 96-byte inputs. A 96-byte hit takes 25 to 29 ns. The hash without the cache takes about 300 ns. A miss costs about 125 ns more than the hash alone, because the lookup and the store go to memory that is not in the CPU caches. So a size is worth a table only when about 30% of its inputs come again.

96-byte inputs come again often. 128-byte inputs do not.

Row1 074 usual mainnet blocks30 blocks of the workload
96-byte inputs (kept)61 %97.3 %
128-byte inputs (a test build, rejected)8.8 %4.6 %
Share of KECCAK256 inputs of each size that came from the cache, in %, bars from zero. Each block executed once, in order, in one process. Desktop computer, 2026-10-20. Record: docs/results/2026-10-keccak96.md.

The gain is small on most blocks and real on the blocks of the workload. On one block with 79% of its gas from the workload, 0.9.5 was 4.0 ms faster by mean of 4 rounds. Over the 30 workload blocks it took 0.993 of the time before. Over the 1 074 usual blocks: 1.000, no change. The two tables use 44 MiB of address space, and only the pages with written entries use memory.

What this does not show

What we take from it

The size of a block in gas says little about its cost. A block of the same gas can be twice as expensive for one client and half as expensive for the other, because of what its transactions repeat. A 24-hour window shows that only if you read it block by block. This is why we publish the per-block files, and why one median per day is not enough for us.

The method and every window are on the performance pages. To run Cinder on your own blocks, ask for access at getcinder.dev/access.

Update, 2026-10-24: I added the numbers of the keccak cache record and the BLOCKHASH cache record, which are now published on their own. No number of the first version changed.