veriblock-pop-cpp
C++11 Libraries for leveraging VeriBlock Proof-Of-Proof blockchain technology.
|
Rebootstrapping is a process of changing bootstrap blocks stored in altchain.
To properly validate every ATV and VTB, Altchain should maintain a SPV view on BTC and VBK blockchains. Every blockchain starts with a genesis block - a single hand-crafted block, which is a "root" of a tree.
Similarly, VBK and BTC blockchains should start with a root block. Since we don't start at block 0, we should specify at least 1 difficulty adjustment interval
worth of contiguous blocks, otherwise we won't be able to statefully validate their difficulty. For BTC we require at least 2016 blocks, and for VBK we require at least 100 blocks.
mainnet
you ALWAYS should use VBK mainnet
and BTC mainnet
, otherwise there will be serious security issues. testnet
and BTC testnet
. regtest
, use VBK regtest_progpow
and BTC regtest
.btcStartHeight
: if last BTC block height is 1M, then use heights 1M - F - 2016
where F
is number of confirmations to consider block final, and 2016
is the number of blocks in single BTC difficulty adjustment interval. In our example btcStartHeight=1M-11-2016=997973
btcStartHeight
, for example 000000000d9fcff7c03867d8d6331506cb9ed885be4b098d9df1ec6c552b54f9
getblockheader <hash>
RPC to get actual block header content. Serialized block header is always 80 bytes.btcStartHeight
, btcHeaders
, vbkStartHeight
, vbkHeaders
in bootstraps.cpp
: https://github.com/VeriBlock/vbk-ri-btc/blob/master/src/vbk/bootstraps.cpp