I’ve recently written my own blockchain parser. It works well (yay!) up to a certain block and then fails because the data read is pure nonsense.
I’ve tracked down the error away from my code to the data on the disc and I get the same result if I parse the file only using a sheet of paper and a hex editor. Even after deleting the file and executing
bitcoind -reindex I still get the same errornous results.
My question is if anybody can reproduce this or if my data is still corrupted somehow. Maybe I just need to delete all files and let bitcoind create them again?
- blk00622.dat causes the trouble
- Problem still exists after deleting blk00622.dat and running
bitcoind -reindex(according to
diffthe new file equals the old one)
- The last ok block is block #428949 (at file address 0x7B748DF). I have no problem parsing it with my hex editor, I get the same results as shown here: https://blockchain.info/de/block-index/1144703
- The errornous block begins at file address 0x7C68AB3
- It starts with
F9 BE B4 D9 41 0F 0F 00 F9 BE B4 D9*
F9 BE B4 D9 is the block’s magic number and
41 0F 0F 00 is the block size. The strange thing here is that the following version number again equals the magic number (which makes me thing that maybe my data is still corrupt). The remaining data of the block makes no sense, for example the time field points to 03/04/1948 ..