Alright, so I’ve been trying to learn a little more about the blockchain and blockchain-development lately. For every other altcoin, I’ve noticed that there’s such a thing as a bootstrap.dat-file which, as I understood it, essentially is a file containing the “correct” blockchain which simply get imported to the computer in order to speed up the synchronisation of the blockchain of a certain coin. I would like to learn how to create one of these bootstrap.dat-files by myself (or at least learn the theory behind it).
I found this post. I followed the instructions in the second answer, running this cat blk000*.dat > bootstrap.dat
code in Terminal which did create a bootstrap-file. I imported this to my second computer, started the client (Fastcoin 0.8.7.2) and while this worked I was unable to restart the client as it almost immediately freezes while it keeps reading data from the disk. I have to force quit the client to get out of this. I emailed the support and while I wait for their answer I figured I’d try to make some research by myself.
According to this thread on Bitcointalk, a valid bootstrap.dat-file does not contain orphan blocks (which I know mine does) and have the blocks in the correct order (which I’m not sure how to check). I read that Bitcoin uses a linearize.py-script to resolve these issues, but as I understood it it doesn’t use the data on disk to do this but rather from a server which is not what I’m trying to do.
Since the code in my third paragraph actually did create a bootstrap-file, I figure I might be on to something that way. But how do I avoid the orphan-blocks/sort them out as well as getting the “valid” blocks in the correct order? All help will be greatly appreciated!