Cinder

A ten-minute cycle fooled our A/B tests

TL;DR

On one day, A/B tests rejected three changes to the block writer, and all three verdicts were wrong. This post explains how that happened and how Cinder measures now.

2026-10-07. Measured on the desktop against reth 2.0, before testing moved to a dedicated server. The numbers are kept as they were measured.

Cinder is an Ethereum execution client in C. We measure every change on a live mainnet node that runs next to reth on the same machine. On one day in October we rejected three changes to the block writer because the A/B tests said they made blocks slower. All three verdicts were wrong. This post explains how that happened and how we measure now.

How we measured

A change to Cinder goes through two kinds of measurement.

For a change inside block execution, the switch alternates on every block: odd blocks take one path, even blocks the other. Nothing slower than two blocks can line up with that.

The writer is different. It is a background thread that writes finished blocks to the database in batches. A batch is a group of blocks that the writer writes in one database transaction. The writer’s behavior carries over from one block to the next: a slow write delays the next batch, which competes with the next block. A switch on every block does not work for it. So we switched the variant in slices of 25 blocks: 25 blocks as built, 25 blocks with the variant, and so on, for two hours.

Three experiments, three “worse”

We tested three ideas to make the writer disturb execution less. The prewarm in the first row is the set of threads that read the state of the transactions in the pool ahead of the block, so that execution finds it in memory.

variant as built (mean) variant (mean) verdict
the writer does not hold the “busy” flag, so the transaction-pool prewarm keeps running 97 ms 123 ms worse
the writer waits until no block is executing 98 ms 136 ms worse
the writer runs at full priority with its own 32-thread pool 107 ms 127 ms worse

Each run had 282 to 300 blocks per arm. The differences were far outside the noise of a single arm. Each result also had a plausible story. The prewarm competes for the disk. Waiting only moves the write into the next block. A faster write takes more CPU from execution. We wrote the stories down and rejected all three.

The pattern in the data

Something was too consistent. Three different ideas, three times the same result, and always by a large margin. We sorted all 2 778 blocks of the runs by block number modulo 50, that is, by the position of the block in a cycle of 50 blocks:

block number mod 50 newPayload mean execution read wait root
5 to 14 76 to 79 ms 55 to 56 ms 21 to 23 ms 12 to 14 ms
20 to 29 147 to 150 ms 101 to 102 ms 44 to 48 ms 32 to 34 ms

Read wait is the time that execution waits for the database. Root is the state root: the hash of the whole state after the block, which the client computes after execution.

Blocks in one half of a 50-block cycle took twice as long as blocks in the other half. Fifty blocks at 12 seconds are 10 minutes. Other jobs share the development machine, and some of them run every 10 minutes. While they run, every block is slower.

Now count the slices. A slice is 25 blocks, half of the cycle. The variant always ran in the odd slices. So the variant always ran in the same half of the 10-minute cycle: the slow half. The A/B did not measure the variants. It measured the machine’s schedule.

The A/A test that settles it

An A/A test is an A/B test with the same build in both arms. Any difference between the arms is then bias or noise. The check is cheap. We had 769 blocks of the unchanged build from the same day and split them by the same slice rule. “Even” slices: 98 ms. “Odd” slices: 122 ms. Two identical arms, with a gap as large as the ones we had measured.

The same build gave a gap as large as each “worse” verdict.

Roweven slices (as built)odd slices (the variant, or the same build in the A/A)
Writer leaves the busy flag (A/B)97 ms123 ms
Writer waits for the executing block (A/B)98 ms136 ms
Writer at full priority (A/B)107 ms127 ms
Same build in both arms (A/A, no variant)98 ms122 ms
Mean engine_newPayload time in ms by slice of 25 blocks, desktop, reth 2.0, 2026-10-05. The variant always ran in the odd slices. The last row has no variant at all, and the odd slices are still slower. The gap comes from a 10-minute cycle of other jobs on the machine, not from the variants. Record: docs/results/2026-09-latency.md.

We marked all three verdicts as inconclusive in the measurement record and kept the history: the wrong tables stay, with a correction section under them.

The method now

We wrote the method down so that a periodic load cannot bias it again. We call it method v2.

  1. A/A first. On a new machine, or after any change on the machine, the same build runs in both arms for two hours. The difference must be under 3 ms on the mean before any A/B starts.
  2. A switch on every block when the variant only affects the block that runs with it.
  3. Hashed slices with a phase-matched analysis when the variant carries state between blocks. The arm of a slice comes from a hash of the slice number, not from its parity, so no cycle can follow it. The analysis compares the arms inside each phase of the cycle (ten buckets of five blocks by block number modulo 50) and weighs the buckets equally. Thus a slow phase adds the same time to both arms, and the difference stays clean.
  4. Length. At least two hours and 250 blocks per arm, with the mean, the median and a 95% bootstrap interval of the difference. The interval comes from many resamples of the blocks: it shows how much the result can move by chance.
  5. A record of the machine. Each result names the build, the load range and whether other jobs ran.
  6. Windows against reth, at least three per build on different hours, with the median of the ratios.

The first run with the new method tested a different idea: keep the two newest blocks unwritten so that the writer makes batches. The phase-matched difference was +6.4 ms (desktop), and this time the cost was real. But the run also showed that the idea itself was never tested. A forkchoice update is the call in which the consensus client tells the execution client which block is the head. Each forkchoice update still made only one block due, so the writer never built a batch. That test needs a minimum batch size, and it goes to a dedicated machine next.

Update 2026-10-11: that test ran on the dedicated server. The batches formed, but the blocks were slower (+7.0 ms median per block). We rejected it.

What we take from it

A summary is on the page Mistakes in the method, and what changed. The three writer variants will be measured again with the new method on a dedicated machine.

Update 2026-10-11: one variant ran again on the dedicated server: the writer waits until no block executes. The result was inconclusive (median +1.1 ms). The other two variants are not measured again yet.

Updated 2026-10-23: the +6.4 ms above is a desktop result: the phase-matched cost of two more unwritten blocks. It is not the gap to reth of the same size that other posts give for the dedicated server on 2026-10-11. The A/A rule of method v2 asks for less than 3 ms between the arms. On the dedicated server, the same code on two instances later differed by 3.1 ms by median (2026-10-11) and by about 4 ms per block (2026-10-13). The cause was the disk: the two instances have different SSD models. Since then, the comparison with reth uses the reference instance, which has the same SSD model as reth. The second instance is the control in interleaved A/B tests, where the difference between the two instances cancels.