Author

Topic: Which files are used for storing information about vouts for a block? (Read 75 times)

hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
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
[...]

The block structure is explained here, by the way.
jr. member
Activity: 33
Merit: 22
But what kind of data is stored there? Vins, vouts or both?
staff
Activity: 3458
Merit: 6793
Just writing some code
The undo data is stored in rev*.dat files.
jr. member
Activity: 33
Merit: 22
I remember that I somewhere saw an article that not only files of blocks are stored, but also the information about vouts in these blocks. I mean file blk_n.dat and a file for blk_n.dat that stores all vouts for this block. It's used for situations when you got bigger chain, but your last block isn't in it and you have to restore your leveldb whic stores vouts with the help of this file.
And I can't find any information for this topic and that article I said about before
Jump to: