Author

Topic: Missing blocks when parsing the blockchain (Read 657 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
June 14, 2016, 05:37:24 PM
#2
Bitcoin core doesn't necessarily receive blocks in order and it writes them to the disk in the order it receives them. This is probably the problem you are having.
newbie
Activity: 1
Merit: 1
Hey there.  I have been trying to solve this on my own, but I thought I would throw it out to a knowledgeable community.  I wrote/tweaked a simple blockchain parser in python, based mostly off of https://github.com/tenthirtyone/blocktools.  I am able to parse through everything find, but I noticed that there are gaps in my blocks when comparing against blockchain.info.  Case in point, when parsing the initial block (blk00000.dat), everything is going fine until the block with hash 00000000306d8ff2a054d739a88fea4d9fd453508571331ca944099ea77c3b0c.  I see it at depth 881 but blockchain.info shows it at depth 897.

The hash of the prior block in the file is:
00000000722571752a29b6e318a450d1b09181b51ca3ff498ba52d8dfcb82f19
Which corresponds to #880 on blockchain.info.  But the value in the block's previous hash field is:
00000000dabe35441efb615ad072e22ece58326cf0a43b990fc00aab808e8589
Which corresponds to #896.  So there are 16 missing blocks.  Where are they?

I see this in all the files that I have parsed to date, this is just the first example.  And I have tried a bunch of different parsers, and they all skip these blocks as well.  Am I missing something?  I haven't seen anything in my google search dealing with these skipped blocks.

Thanks for any help.
Jump to: