zcashd/contrib/linearize
Wladimir J. van der Laan aedc74dfa6 contrib: make linearize-data.py cope with out-of-order blocks
Make it possible to read blocks in any order. This will be required
after headers-first (#4468), so should be merged before that.

- Read block header. For expected blocks, continue, else skip.
- For in-order blocks: copy block contents directly. Write prior
  out-of-order blocks if this connects a consecutive span.
- For out-of-order blocks, store extents of block data for later
  retrieval. Cache out-of-order blocks in memory up to 100MB
  (configurable).
2014-10-06 18:30:12 +02:00
..
README.md contrib/linearize: Add feature to set file's timestamp based on block header time. 2014-09-04 15:13:37 +02:00
example-linearize.cfg contrib: make linearize-data.py cope with out-of-order blocks 2014-10-06 18:30:12 +02:00
linearize-data.py contrib: make linearize-data.py cope with out-of-order blocks 2014-10-06 18:30:12 +02:00
linearize-hashes.py Update linearize scripts. 2014-08-23 21:46:12 -04:00

README.md

Linearize

Construct a linear, no-fork, best version of the blockchain.

Step 1: Download hash list

$ ./linearize-hashes.py linearize.cfg > hashlist.txt

Required configuration file settings for linearize-hashes:

  • RPC: rpcuser, rpcpassword

Optional config file setting for linearize-hashes:

  • RPC: host, port
  • Block chain: min_height, max_height

Step 2: Copy local block data

$ ./linearize-data.py linearize.cfg

Required configuration file settings:

  • "input": bitcoind blocks/ directory containing blkNNNNN.dat
  • "hashlist": text file containing list of block hashes, linearized-hashes.py output.
  • "output_file": bootstrap.dat or
  • "output": output directory for linearized blocks/blkNNNNN.dat output

Optional config file setting for linearize-data:

  • "netmagic": network magic number
  • "max_out_sz": maximum output file size (default 100010001000)
  • "split_timestamp": Split files when a new month is first seen, in addition to reaching a maximum file size.
  • "file_timestamp": Set each file's last-modified time to that of the most recent block in that file.