Post
Topic
Board Development & Technical Discussion
Merits 1 from 1 user
Re: Which files are used for storing information about vouts for a block?
by
n0nce
on 16/12/2022, 21:03:06 UTC
⭐ Merited by ETFbitcoin (1)
But what kind of data is stored there? Vins, vouts or both?
A simple web search reveals your answer.

The rev*.dat files (the "undo files"), contain all UTXOs spent by the inputs of a block. It was introduced in Bitcoin Core 0.8, and contains a concatenation of records, one for each block. This mimicks the structure of the blk*.dat files which contain blocks.

Each block record consists of:
  • 4 bytes: network magic (0xf9,0xbe,0xb4,0xd9)
  • 4 bytes: size of the CBlockUndo record (LE32)
  • data_size bytes: CBlockUndo record
  • 32 bytes: double-SHA256 of the serialized CBlockUndo record
[...]