Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Moria843 on December 31, 2015, 08:49:58 PM



Title: Getting rid of unneeded blkxxxxx.dat or revxxxxx.dat in core after re-indexing
Post by: Moria843 on December 31, 2015, 08:49:58 PM
After power loss and having bitcoin core re-index blocks on drive for about 15 hours, I now have a rev00000.dat ... rev00409.dat for each blk00000.dat ... blk00409.dat file.

Any easy way to have bitcoin core get rid of unneeded files or to manually do without messing things up?


Title: Re: Getting rid of unneeded blkxxxxx.dat or revxxxxx.dat in core after re-indexing
Post by: achow101 on December 31, 2015, 08:53:29 PM
You are supposed to have those. Those are the raw blocks. If you delete them then Bitcoin Core won't work.


Title: Re: Getting rid of unneeded blkxxxxx.dat or revxxxxx.dat in core after re-indexing
Post by: Moria843 on December 31, 2015, 09:24:52 PM
Been running 0.11.1 since it was released for a while and only ever had blkxxxxx.dat in the "blocks" folder. Never had any revxxxxx.dat files until forced to re-index.


Title: Re: Getting rid of unneeded blkxxxxx.dat or revxxxxx.dat in core after re-indexing
Post by: cr1776 on December 31, 2015, 09:29:10 PM
Been running 0.11.1 since it was released for a while and only ever had blkxxxxx.dat in the "blocks" folder. Never had any revxxxxx.dat files until forced to re-index.

Some references:

http://bitcoin.stackexchange.com/questions/11104/what-is-the-database-for
Quote
blocks/rev*.dat: these contain "undo" data. You can see blocks as 'patches' to the chain state (they consume some unspent outputs, and produce new ones), and see the undo data as reverse patches. They are necessary for rolling back the chainstate, which is necessary in case of reorganisations.


https://en.bitcoin.it/wiki/Data_directory
Quote
locks subdirectory
[v0.8 and above] Contains "undo" data.

rev*.dat
You can see blocks as 'patches' to the chain state (they consume some unspent outputs, and produce new ones), and see the undo data as reverse patches. They are necessary for rolling back the chainstate, which is necessary in case of reorganizations.

https://bitcoin.org/en/release/v0.11.0


Title: Re: Getting rid of unneeded blkxxxxx.dat or revxxxxx.dat in core after re-indexing
Post by: Moria843 on December 31, 2015, 10:54:49 PM
Thanks all!