I am running a full
geth node and was interested in the blockchain size.
Therefore, I compared the sum of all blocks' sizes with the actual disk size the blockchain copy consumes.
chaindata folder is 136 GiB large, the sum over all block sizes is just under 5 GiB. Where does this difference come from?
Obtaining Disk Size
$ du -hs geth/chaindata/ 136G geth/chaindata/
Obtaining Block Sizes
Here, I use the JSON-RPC interface and query each block (
eth_getBlockByHash), going backwards from the best block I know (using the
eth_getBlockByNumber API call).
From each block, I get the
size value (which is in bytes according to the wiki).
However, the sum of all
size attributes is only roughly 4.76 GiB.
What am I missing here?
(I know I could just fetch each block by its number, but this is irrelevant for the question.)