Compressed block bodies: about half the disk, and an estimate that was wrong by a factor of two
TL;DR
On 2026-11-05 we added up the disk of a full Cinder node on mainnet. The block bodies alone came to about 1 407 GB. Our design estimate was 600 to 700 GB. That estimate was too low by a factor of about two, because Cinder stored the bodies without compression. reth keeps the same data compressed in about 664 GB. On 2026-11-07 we measured the fix through the writer and readers of the node. Each new body row of 256 bytes or more is one zstd frame, level 3, with a checksum. An old row stays as it is. The body table takes 0.481 of its pages for 300 blocks across the eras after the merge, and 0.366 for 2 000 recent blocks. On mainnet that is about 648 to 677 GB for the bodies (calculated). The writer uses about 484 µs more CPU per recent block, about 0.1% of its time. A read of a recent body takes about 90 µs more. On a Hoodi replay with an A/A control, newPayload showed no effect larger than the band of the control, about 0.3 to 0.5 ms. This is work on the development line toward 1.0, not a release.
This story starts with a number that was wrong, and it was ours.
The estimate
When we designed the history storage of a full node for 1.0, we wrote down an estimate for the block bodies after the merge: 600 to 700 GB. On 2026-11-05 we measured instead of estimating. We took a sample of 300 blocks at equal steps from the merge to now, read the size of each block, and modelled how Cinder stores it: one large value on overflow pages, as it comes. The model matched a measured body table within 1.5%.
The bodies came to about 1 407 GB. The estimate was too low by a factor of about two. It had silently assumed that the bodies would be stored the way reth stores them, compressed. Cinder did not compress them. reth keeps its transactions and bodies in about 664 GB of compressed static files.
We respect the reth engineers and their approach: their full node is the size that ours must match, and here the difference had one clear cause. So we fixed the cause.
This is work on the development line toward 1.0. It is not in a release yet.
The format: one byte decides
A body row in Cinder is the RLP list of the transactions and the rest of the body. An RLP list always starts with a byte of 0xc0 or more. That leaves the lower bytes free as a tag:
| First byte | Row |
|---|---|
| 0xc0 or more | the body as it is: each row of an older build, and a new body that stays as it is |
| 0x01 | one zstd frame of the body: level 3, the content size, a checksum, no dictionary |
| 0x00, and 0x02 to 0xbf | an error now, room for later formats |
The writer compresses a body of 256 bytes or more when the row gets smaller. Old rows stay as they are, so one database has rows of both kinds, and an old database works with the new build with no migration. We checked that on an old mainnet database: 2 000 rows read back as stored, with no copy.
A row that does not decode gives an error, never other bytes: a frame cut short, a wrong checksum, bytes after the frame, a frame of more than 16 MiB. In a sync, a damaged row means “get the body again from the peers”, never “this block is invalid”. A fuzz target feeds the decoder rows with one changed bit, and the answer must be an error or the body itself.
How much smaller
The body table takes 0.481 of its pages for 300 blocks across the eras after the merge, and 0.366 for 2 000 recent blocks. A recent row took 42.3 pages before and 15.5 after.
The ratio depends on the era, and more than I expected. Here are short runs of consecutive blocks:
| Row | Pages of the compressed body table, % of the old table |
|---|---|
| From block 15 900 000 (32 blocks) | 52.8 % |
| From block 18 000 000 (32 blocks) | 59.1 % |
| From block 20 000 000 (32 blocks) | 43.7 % |
| From block 22 000 000 (32 blocks) | 52.8 % |
| From block 24 000 000 (32 blocks) | 30.2 % |
| From block 26 070 000 (64 blocks) | 34.1 % |
| From block 26 100 000 (64 blocks) | 37.4 % |
| From block 26 130 000 (64 blocks) | 33.8 % |
| From block 26 160 000 (64 blocks) | 38.7 % |
| Run of consecutive blocks from | Blocks | Pages ratio |
|---|---|---|
| 15 900 000 | 32 | 0.528 |
| 18 000 000 | 32 | 0.591 |
| 20 000 000 | 32 | 0.437 |
| 22 000 000 | 32 | 0.528 |
| 24 000 000 | 32 | 0.302 |
| 26 070 000 | 64 | 0.341 |
| 26 100 000 | 64 | 0.374 |
| 26 130 000 | 64 | 0.338 |
| 26 160 000 | 64 | 0.387 |
From under a third to almost three fifths. A body is mostly transactions, and what they share changes with the era: the contracts that were popular, the size of calldata, the kind of traffic. This is why the mainnet number is a range and not a point.
On mainnet
| Row | Cinder, bodies as they are | Cinder, one zstd frame per body, low end | Cinder, one zstd frame per body, high end | reth --full, transactions and bodies |
|---|---|---|---|---|
| Block bodies after the merge, mainnet --full | 1 407 GB | 648 GB | 677 GB | 664 GB |
For a mainnet node with --full, the bodies after the merge go from
about 1 407 GB to about
648 to 677 GB. The two ends come
from two ways to count: the ratio of bytes, and the compressed pages
per block of the sample. With this change alone, the total disk of a
full node goes from about 2.08 TB to about
1.32 to 1.35 TB. That
is a calculation, not a measured node.
What it costs
The writer pays about 484 µs of CPU per recent block. A read of a recent body costs about 90 µs more.
| Thread CPU time, median per block | Recent (2 000 blocks) | Eras (300 blocks) |
|---|---|---|
| Write and commit, new minus old | +484.3 µs (473.6 to 493.1) | +281.7 µs (265.6 to 304.8) |
| Commit alone, new over old | 0.633 | 0.672 |
| Write and commit, A/A control | 1.009 | 0.950 |
| Read, new minus old | +90.3 µs (88.8 to 92.0) | +48.6 µs (45.5 to 52.1) |
| Read, A/A control | 1.007 | 1.002 |
Two things I like in this table. The commit gets cheaper, because there are fewer pages to write. And a read of an old row is a pointer into the memory map with no copy, about 1.1 µs, while a compressed read decodes into a buffer. That is the real price of the change, and it lands on JSON-RPC reads of whole blocks.
How large is it in context? The writer takes about
500 ms per mainnet block, so
0.5 ms is about
0.1%. An eth_getBlockByNumber with full
transactions of a block of about 25 KB took
135 µs, and decompression adds about
14 µs to it.
newPayload: inside the noise of the control
The writer runs beside block execution, so we also checked that blocks do not get slower. A replay of 500 Hoodi blocks, with bodies of about 25 KB that the writer compresses too.
| newPayload, median per-block difference | ms | 95% interval |
|---|---|---|
| a2 minus a (A/A control) | -0.23 | -0.39 to -0.11 |
| b minus a | -0.47 | -0.69 to -0.26 |
| b minus a2 | -0.08 | -0.28 to 0.07 |
Read the first row first. Two arms with the same old rows differ by -0.23 ms, and that interval excludes zero. So a difference of that size is the method, not the change. Against the first arm, the change looks faster. Against the control arm, it is -0.08 ms with an interval across zero. The honest result: no effect larger than a band of about 0.3 to 0.5 ms. I do not claim that compression makes blocks faster.
What this does not show
- No node synced mainnet with this change yet. The mainnet numbers are calculations from the pages of the samples.
- Sampling error. The 300 blocks across the eras give the ratio in bytes with a 95% interval of about 0.44 to 0.51.
- Small Hoodi blocks. The replay can show no effect larger than its band on a 12 ms block with 25 KB bodies. A smaller effect, or one on larger mainnet bodies, it cannot show.
- A loaded desktop. The CPU numbers are thread CPU times. The newPayload numbers are wall times with an A/A control.
There is more to gain. A frame that holds several bodies, or a trained dictionary, could make the table smaller again, at a cost on each read. Those are options for after 1.0, and they need their own measurement first.