ladimolnar / BitcoinDatabaseGenerator

A high performance data transfer tool that can be used to transfer data from Bitcoin Core blockchain files to a SQL Server database
Apache License 2.0
122 stars 53 forks source link

Blocks with an unknown version. #4

Closed melted349 closed 9 years ago

melted349 commented 9 years ago

From the log:

File: blk00318.dat. Transferring data completed in  24.511 seconds.
File: blk00319.dat. Transferring data completed in  20.182 seconds.
File: blk00320.dat. Transferring data completed in  26.298 seconds.
File: blk00321.dat. Transferring data:  58%

ERROR: The blockchain contains blocks with an unknown version. Unknown block version: 536870919.

melted349 commented 9 years ago

So I wiped out blk00321.dat and let Bitcoin Core rebuild the blockchain; started a new database and re-ran the BitcoinDatabaseGenerator. Still getting the same error, but different blk file now. Not sure how to troubleshoot this further, other than wiping out the blockchain completely and rebuilding from scratch.

From the log:

File: blk00317.dat. Transferring data completed in  10.853 seconds.
File: blk00318.dat. Transferring data completed in   9.381 seconds.
File: blk00319.dat. Transferring data:  93%

ERROR: The blockchain contains blocks with an unknown version. Unknown block ver sion: 3652501241.

ladimolnar commented 9 years ago

I can confirm the first error you see. It is caused by the fact that the blockchain blocks now accept special versions. Until recently the blockchain blocks had a version of 1, 2 or 3. More recently there was a change that allowed for a new version format to be used. The value 536870919 you see in the error message is 0x20000007 hex. See the following links that explain why blocks with this version may be encountered: https://github.com/bitcoin/bips/blob/master/bip-0101.mediawiki https://gist.github.com/sipa/bf69659f43e763540550.

Tomorrow I am going to continue my investigation into this change and I am going to release a fixed version soon.

Regarding the second error "Unknown block version: 3652501241" - that is something I do not have an explanation for. Are you sure you did not cause some blockchain corruption at some point after you deleted blk00321.dat? You may have to rebuild the whole blockchain completely and run a version of the generator containing the upcoming fix.

plimxx commented 9 years ago

Thank you both, I follow this project closely. I'm sorry not to be so good as to help!

melted349 commented 9 years ago

I'm pretty sure I did corrupt my blockchain when I deleted blk00321.dat. I wiped it and let it rebuild from scratch.

Thank you for looking into this and working on this project again. It's always a relief to see a project's owner is still around and involved in their projects. I'll keep an eye out for that fixed version release.

ladimolnar commented 9 years ago

I just released V 1.2 that fixes this issue.