StratisBitcoinFullNode
StratisBitcoinFullNode copied to clipboard
Cleaning old rewind data
Rewind data need to be cleaned. At block 330000, my hard drive took 20GB of space when the UTXO was only 2GB.
2 observations:
- We do not need rewind data if we are synching old blocks. (what about not saving them at all?)
- We do not need more than 1 days worth of block as it is unlikely there is such big reorg.
If we need to rewind past the last rewind data, the UTXO is completely wiped out, and reperform a full indexing. (we can save time here by disabling checks on block that were validated previously)
I am not sure I follow, are you referring to the BlockRepository?
no, DBreezeCoinView.
So basically the CoinView keep track of information to rewind in case of fork. If no information is found, then the CoinView is wiped out back to genesis.
Thing is that we probably do not need Rewind data older than 100 blocks, as such rewind is unexpected.
Ah I see it's rewind data that is bulking up your disk. Did you consider keeping rewind data only till last checkpoint? Though , we don't have checkpoints implemented yet I believe.
checkpoint is a different concept from rewind data.
Each rewind data can cover several block, except when your node is fully sync, you have one rewind data for every block (basically I do it as every flush on the coinview)
I will make a checkpoint system that users can customer to sync fast without verifying a bunch of old blocks.