This question is about Bitcoin SV, but since it uses a fork of
bitcoind, it should be the same. I’m about to turn on pruning on other daemons, like Bitcoin itself, but I don’t understand some issues related with it.
So I’m trying to reindex the blockchain in pruning mode (
prune=5120) because the full blockchain is 1 TB+. Yes, I understand that it has to download the whole blockchain to build the index, this is not what I’m asking.
Some blocks are indeed removed during synchronization:
[msghand] Prune: UnlinkPrunedFiles deleted blk/rev (00791)
However, halfway through the process there’s already 44 GB of block data. But shouldn’t it be capped by 5 GB?
/mnt/bitcoin_sv$ sudo du -h 222M ./data/blocks/index 44G ./data/blocks 4.0K ./data/dstxns 2.4G ./data/chainstate 648K ./data/database 12K ./data/mempoolTxDB 16K ./data/merkle/index 20K ./data/merkle 46G ./data 16K ./lost+found 46G .
This is not the first time I try to reindex the BSV blockchain. The daemon crashes and can’t recover because it tries to load a file that is already pruned. So before I restarted the reindexing process, it was like that:
/mnt/bitcoin_sv$ sudo du -h 220M ./blocks/index 315G ./blocks 2.6G ./chainstate
315 GB of blocks when the cap is 5 GB.
So how does the pruning work? It has to store (not just download) the whole blockchain before pruning? So it’s mandatory to have 1 TB of SSD to sync even in pruned mode?