Updated the example-linearize.cfg file to include support for the regtest chain network config which is used by the ./linearize-data.py Problem: Without the regtest magic, genesis hash and path config, the `linearize-data.py` script cannot generate a bootstrap.dat file. Example of error: ./linearize-data.py ./linearize.cfg Read 102 hashes Genesis block not found in hashlist Solution: Added netmagic, genesis and input example parameters to file. Resolution 1. Starting bitcoind in regtest mode 2. bitcoin-cli generatetoaddress 101 $(bitcoin-cli getnewaddress) 3. ./linearize-hashes.py ./linearize.cfg > ./hashlist.txt 4. ./linearize-data.py ./linearize.cfg Example after fix: $ ./linearize-data.py ./linearize.cfg Read 102 hashes Input file /Users/gr0kchain/.bitcoin/regtest/blocks/blk00000.dat Output file /Users/gr0kchain/Downloads/bootstrap.dat Done (102 blocks written)
55 lines
1.5 KiB
INI
55 lines
1.5 KiB
INI
# bitcoind RPC settings (linearize-hashes)
|
|
rpcuser=someuser
|
|
rpcpassword=somepassword
|
|
#datadir=~/.bitcoin
|
|
host=127.0.0.1
|
|
|
|
#mainnet default
|
|
port=8332
|
|
|
|
#testnet default
|
|
#port=18332
|
|
|
|
#regtest default
|
|
#port=18443
|
|
|
|
# bootstrap.dat hashlist settings (linearize-hashes)
|
|
max_height=313000
|
|
|
|
# bootstrap.dat input/output settings (linearize-data)
|
|
|
|
# mainnet
|
|
netmagic=f9beb4d9
|
|
genesis=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
|
|
input=/home/example/.bitcoin/blocks
|
|
|
|
# testnet
|
|
#netmagic=0b110907
|
|
#genesis=000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943
|
|
#input=/home/example/.bitcoin/testnet3/blocks
|
|
|
|
# regtest
|
|
#netmagic=fabfb5da
|
|
#genesis=0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206
|
|
#input=/home/example/.bitcoin/regtest/blocks
|
|
|
|
# "output" option causes blockchain files to be written to the given location,
|
|
# with "output_file" ignored. If not used, "output_file" is used instead.
|
|
# output=/home/example/blockchain_directory
|
|
output_file=/home/example/Downloads/bootstrap.dat
|
|
hashlist=hashlist.txt
|
|
|
|
# Maximum size in bytes of out-of-order blocks cache in memory
|
|
out_of_order_cache_sz = 100000000
|
|
|
|
# Do we want the reverse the hash bytes coming from getblockhash?
|
|
rev_hash_bytes = False
|
|
|
|
# On a new month, do we want to set the access and modify times of the new
|
|
# blockchain file?
|
|
file_timestamp = 0
|
|
# Do we want to split the blockchain files given a new month or specific height?
|
|
split_timestamp = 0
|
|
|
|
# Do we want debug printouts?
|
|
debug_output = False
|