Jump to content

How to Make a bootstrap.dat - Devault [DVT]


Recommended Posts

How to make a bootstrap for Devault using python linearize tool.

Bitcoin reference: https://bitcoin.stackexchange.com/a/42916

Linearize is located in https://github.com/devaultcrypto/devault/tree/develop/contrib/linearize, basically go to contrib/linearize folder on your latest Bitcoin fork. Copy example-linearize.cfg to linearize.cfg and edit some parameters. https://github.com/devaultcrypto/devault/pull/321/commits/8e5a4aadea66412d8a4d064c13ae55e1d6d7ffa4

You want to find the rpc port being used, netmagic, genesis block, and the default home directory for appdata.

RPC port is generally on the front page of the github, if not you got some searching to do. Here is where its located on Devault. https://github.com/devaultcrypto/devault/blob/23982400beac78d27ef11a0a69cfc300b46c07bb/src/chainparamsbase.cpp#L37

For genesis block you can go to an explorer and type 0 for block. https://exploredvt.com/block-height/0 or find it in the code maybe? https://github.com/devaultcrypto/devault/blob/develop/src/chainparams.cpp#L124

Which also happens to be where the netmagic is located, lineaize gave me an error on using the netmagic hex, so I ended up using the error which is the diskMagic https://github.com/devaultcrypto/devault/blob/develop/src/chainparams.cpp#L109

Sample linearize.cfg (pick you block height you want to go to in here, and update rpc user and password)

# bitcoind RPC settings (linearize-hashes)
rpcuser=someuser
rpcpassword=somepassword
#datadir=~/.devault
host=127.0.0.1
port=3339
#port=18332

# bootstrap.dat hashlist settings (linearize-hashes)
max_height=313373

# bootstrap.dat input/output settings (linearize-data)

# mainnet
netmagic=c0d2e0d1
genesis=0000000038e62464371566f6a8d35c01aa54a7da351b2dbf85d92f30357f3a90
input=/home/example/.devault/blocks

# testnet
#netmagic=0b110907
#genesis=000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943
#input=/home/example/.bitcoin/testnet3/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

Once you edit linearize.cfg

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

then

./linearize-data.py linearize.cfg

Now you have your bootstrap. I am lazy and use zip

zip -r bootstrap.zip bootstrap.dat

Now you can throw the finished bootstrap.dat into your ~/.devault or appdata directory for faster initial sync on another computer or run a website to host your file for others to grab.

If you enjoy my content please consider donating to the Denarius creator - https://www.patreon.com/carsenk
Join Denarius Discord - https://discord.gg/JQEmXwb

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...