The rev*.dat files contain data needed to put the Bitcoin blockchain back to an earlier state. This is important for reorganizations.
Questions tagged [undofiles]
8 questions
13
votes
1 answer
File format -- rev*.dat
Can anyone help me to find out the format of rev*.dat file?
There is an array with [F9BEB4D9 + 32byte number + variable raw data] for each element.
What is that 32b number? And may be how to understand what is the other variable data?
Denis Leonov
- 915
- 12
- 26
5
votes
1 answer
What exactly are the rev00000.dat files?
I've been looking at the on disk structured generated by the standard bitcoin-qt client. It looks to me that the rev?????.dat files are reverse application for blocks? So I imagine every single spent output is added to the reverse dat, so that they…
Matt
- 520
- 3
- 10
4
votes
1 answer
Is the ordering of blocks in the rev*.dat files same as the blk*.dat files?
I understand that blk*.dat files save the blocks in the order it gets them from it's peers. Is the rev*.dat files in the same order as the blk*.dat files?
For example, would the 400th magicbyte in the blk00000.dat file be representative of the same…
kcalvinalvin
- 504
- 3
- 9
4
votes
1 answer
Are old rev*.dat file safely deletable?
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?
Riccardo Casatta
- 528
- 3
- 8
2
votes
1 answer
Why undo files are needed in the Bitcoin Core?
Undo files contain data needed to disconnect a block from the blockchain. It basically contains instances of CBlockUndo:
/** Undo information for a CBlock */
class CBlockUndo
{
public:
std::vector vtxundo; // for all but the coinbase
…
Amir reza Riahi
- 1,133
- 7
- 22
2
votes
1 answer
What are the use cases where very old rev*.dat files are needed?
There have been multiple questions on this but none, IMO, really get to the issue:
Given:
The rev*.dat files hold "undo" data for rolling back the UTXO state, block by block,
and they're 1::1 with block files (i.e., for a given NNNNN the files…
davidbak
- 261
- 1
- 7
1
vote
0 answers
How can I collate blocks in blk*.dat files and rev*.dat files?
According to this answer, blocks in blk*.dat files and rev*.dat files don't necessarily appear in the same order, nor are either files necessarily in monotonic order, and blocks not part of the active chain may or may not have undo data available.…
Vojtěch Strnad
- 5,623
- 1
- 8
- 31
0
votes
1 answer
Undo files format change and reorg process question for v0.19
This is a follow-up question for rev.dat file format
Pieter Wuille gave a great explanation that is easy to follow. Since that posting there was a replacement of CTxInUndo with Coin, does the format still stands for the CBlockUndo record?
4 bytes:…
Vlad Proskurin
- 1
- 3