Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: jgarzik on November 29, 2010, 09:08:07 AM



Title: [PATCH] -initblocks: import local block data from static file
Post by: jgarzik on November 29, 2010, 09:08:07 AM

URL: http://yyz.us/bitcoin/patch.bitcoin-initblocks

This patch adds "-initblocks=FILE" parameter to bitcoin, where FILE is the path to a blk0001.dat file downloaded off the Internet somewhere.

With -initblocks, bitcoin will import, verify, index and store each block in this file, thus making it acceptable to obtain from untrusted sources.

The import stops upon any error, preventing re-loads of the same data.

If nothing else, this patch permits the benchmarking and comparison between local disk import and P2P network download.


Title: Re: [PATCH] -initblocks: import local block data from static file
Post by: jgarzik on November 29, 2010, 10:18:13 AM
Patch updated to fix minor bug.


Title: Re: [PATCH] -initblocks: import local block data from static file
Post by: RHorning on November 29, 2010, 02:07:33 PM
Thank you for making this patch.  You've been trying to get this to work by providing the data and working with the people who are struggling with downloading data over the network.  It will be interesting to see how this works out in terms of building the index.


Title: Re: [PATCH] -initblocks: import local block data from static file
Post by: jgarzik on December 02, 2010, 05:51:06 AM
Patch updated for latest SVN.


Title: Re: [PATCH] -initblocks: import local block data from static file
Post by: jgarzik on February 24, 2011, 12:49:04 AM
Patch updated for latest git.  See top of thread for URL.

Note:  there remains an undiagnosed crashing problem, so this is not considered reliable or stable yet.