Creating my own bootstrap.dat? Since I have been tearing down and setting up bitcoin clients a lot for some experiments lately, I was wondering whether there is a simple way to speed up the synchronization with the network. One method that comes to mind is the bootstrap.dat file distributed by some people. The problem is that the last 40'000 blocks, which are the most expensive to get and verify, are not included.

Now I was wondering how to create such a bootstrap.dat myself, from a good copy I have on another machine. Any idea?
Bitcoin Core contains a tool to do this properly (filtering out any orphan blocks, putting everything in the correct order — which will work a lot better than just concatenating the block files. It's documented in its own README, here: https://github.com/bitcoin/bitcoin/tree/master/contrib/linearize

In short:


Launch Bitcoin with an rpcuser and rpcpassword set in your config file, with the correct location as per https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File
Checkout the Bitcoin source from Github and cd to contrib/linearize.
Copy example-linearize.cfg to linearize.cfg and update it with your rpcuser/rpcpassword values, along with the maximum block height you want to output (max_height), and the path to your data directory (input), as well as the path to your desired output file (output_file).
Run ./linearize-hashes.py linearize.cfg &gt; hashlist.txt followed by ./linearize-data.py linearize.cfg.