4

based on this answer rev files contains information for dealing with reorgs. If I think reorg longer than let's say a month are highly unlikely, could I safely delete rev*.dat files older than a month?

1
  • Why not to test deleting rev*.dat files in testnet environment and check? :)
    – amaclin
    Commented May 19, 2018 at 11:02

1 Answer 1

3

No. You need the rev*.dat files as much as you need the blk*.dat files. If Bitcoin Core cannot find the rev*.dat, it will need to regenerate them by reindexing the databases. Removing them effectively corrupts the databases.

If you want to save disk space, you can use pruning instead. This will have Bitcoin Core properly remove blk*.dat and rev*.dat files to save disk space.

4
  • I don't want to prune. I need a full node. Did you actually test what you are saying? In which occasion the node will recognize some rev files are missing? I am asking because I stopped the node, moved some old rev files and restarted the node. There is no error message in the log neither the regenerated files Commented Feb 23, 2018 at 14:32
  • A pruned node is still a full node. I have done this in the past and it resulted in a reindex. It looks like Bitcoin Core doesn't verify the undo data as much as it does for the block data, but it still does some verification. If you delete the wrong files, it will have problems.
    – Ava Chow
    Commented Feb 23, 2018 at 16:02
  • yeah sorry for the wrong terminology, anyway I want all the blockchain data. I still suppose the wrong files causing problems are only the recent rev* files. I would like to see other answer Commented Feb 24, 2018 at 18:41
  • I can now confirm after testing my node started to recreate rev files in a very long process after I deleted it. So somehow are needed also the old ones Commented May 23, 2018 at 16:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.