bitcoin/bitcoin — pull request #4762 by jgarzik (2014-08-24 17:57:03+00:00)
Title: [contrib] New linearize format

The new linearize format outputs one month's worth of bitcoin transactions, as determined by the timestamp inside the block. The file last-modified time is set to the highest timestamp seen thusfar in the processing:
```
-rw-rw-r-- 1 jgarzik jgarzik 512129 Sep 30 2009 blk00008.dat
-rw-rw-r-- 1 jgarzik jgarzik 522737 Oct 31 2009 blk00009.dat
-rw-rw-r-- 1 jgarzik jgarzik 521531 Nov 30 2009 blk00010.dat
-rw-rw-r-- 1 jgarzik jgarzik 992159 Dec 31 2009 blk00011.dat
-rw-rw-r-- 1 jgarzik jgarzik 1190943 Jan 31 2010 blk00012.dat
-rw-rw-r-- 1 jgarzik jgarzik 1580654 Feb 28 2010 blk00013.dat
-rw-rw-r-- 1 jgarzik jgarzik 1435103 Mar 31 2010 blk00014.dat
-rw-rw-r-- 1 jgarzik jgarzik 2646319 Apr 30 2010 blk00015.dat
-rw-rw-r-- 1 jgarzik jgarzik 2040834 May 31 2010 blk00016.dat
-rw-rw-r-- 1 jgarzik jgarzik 1911267 Jun 30 2010 blk00017.dat
-rw-rw-r-- 1 jgarzik jgarzik 7862024 Jul 31 2010 blk00018.dat
```

A check is added to verify that blocks remain in the proper order. Previously this was guaranteed by bitcoind anyway, and so is a simply a sanity check. Who knows what weird input people might feed to this.

This new format is suitable for researchers performing lots of raw block processing, and bitcoind users importing via "-reindex". The reindex import method is superior to bootstrap.dat.