mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 05:57:59 +01:00
Make linearize scripts Python 3-compatible.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# Linearize
|
||||
Construct a linear, no-fork, best version of the Bitcoin blockchain.
|
||||
Construct a linear, no-fork, best version of the Bitcoin blockchain. The scripts
|
||||
run using Python 3 but are compatible with Python 2.
|
||||
|
||||
## Step 1: Download hash list
|
||||
|
||||
@@ -9,7 +10,8 @@ Required configuration file settings for linearize-hashes:
|
||||
* RPC: `rpcuser`, `rpcpassword`
|
||||
|
||||
Optional config file setting for linearize-hashes:
|
||||
* RPC: `host`, `port` (Default: `127.0.0.1:8332`)
|
||||
* RPC: `host` (Default: `127.0.0.1`)
|
||||
* RPC: `port` (Default: `8332`)
|
||||
* Blockchain: `min_height`, `max_height`
|
||||
* `rev_hash_bytes`: If true, the written block hash list will be
|
||||
byte-reversed. (In other words, the hash returned by getblockhash will have its
|
||||
@@ -17,6 +19,9 @@ bytes reversed.) False by default. Intended for generation of
|
||||
standalone hash lists but safe to use with linearize-data.py, which will output
|
||||
the same data no matter which byte format is chosen.
|
||||
|
||||
The `linearize-hashes` script requires a connection, local or remote, to a
|
||||
JSON-RPC server. Running `bitcoind` or `bitcoin-qt -server` will be sufficient.
|
||||
|
||||
## Step 2: Copy local block data
|
||||
|
||||
$ ./linearize-data.py linearize.cfg
|
||||
@@ -24,13 +29,13 @@ the same data no matter which byte format is chosen.
|
||||
Required configuration file settings:
|
||||
* `output_file`: The file that will contain the final blockchain.
|
||||
or
|
||||
* `output`: Output directory for linearized blocks/blkNNNNN.dat output.
|
||||
* `output`: Output directory for linearized `blocks/blkNNNNN.dat` output.
|
||||
|
||||
Optional config file setting for linearize-data:
|
||||
* `file_timestamp`: Set each file's last-modified time to that of the most
|
||||
recent block in that file.
|
||||
* `genesis`: The hash of the genesis block in the blockchain.
|
||||
* `input: bitcoind blocks/ directory containing blkNNNNN.dat
|
||||
* `input`: bitcoind blocks/ directory containing blkNNNNN.dat
|
||||
* `hashlist`: text file containing list of block hashes created by
|
||||
linearize-hashes.py.
|
||||
* `max_out_sz`: Maximum size for files created by the `output_file` option.
|
||||
|
||||
Reference in New Issue
Block a user