Post
Topic
Board Bitcoin Discussion
Re: [ANN] Bitcoin blockchain data torrent
by
agent13
on 08/12/2013, 23:42:38 UTC
Forgot to mention...  the following python util, linearize.py, was checked into the bitcoin repo today:

     https://github.com/bitcoin/bitcoin/tree/master/contrib/linearize

This tool may be used to recreate bootstrap.dat byte-for-byte identical with the bootstrap.dat in this torrent.

If you are running bitcoind locally, create bootstrap.dat locally, then start seeding the torrent immediately at 100%!



The linearize python script does not appear to have a method to accept a starting block height. I was not sure if Bitcoin-QT would recognize a bootstrap file not starting at block height 1. But it seems it does. This appears to work -


Quote
def get_blocks(settings):
        rpc = BitcoinRPC(settings['host'], settings['port'],
                         settings['rpcuser'], settings['rpcpass'])

        outf = open(settings['output'], 'wb')

        for height in xrange(settings['max_height']+1):
            if height > 249999:
                sys.stdout.write(str(height) + "\n")

It generated a 3GB bootstrap between 250-270k which Bitcoin-QT accepted.