veriblock-pop-cpp
C++11 Libraries for leveraging VeriBlock Proof-Of-Proof blockchain technology.
Integration

Integrate POP into BTC fork

Note
The documentation below is based on vBTC commit 026fba4e80bc114c68c636e3c9cfc6af855c9c94.
  1. Modifying build setup
  2. Adding PopData
  3. Choosing fork point
  4. Adding configuration
  5. Adding persistence
  6. Pop mempool support
  7. AltTree management
  8. Pop Merkle trees
  9. Pop rewards
  10. Pop fork resolution
  11. Update P2P protocol
  12. New RPC calls
  13. Setup ABFI
  14. Testing of POP-enabled BTC fork

Create new fork from existing BTC+POP chain

It is very easy to do.

1. Fork vBTC

https://github.com/VeriBlock/vbk-ri-btc/

2. Change naming as needed.

Search for all places where vBitcoin or vBTC is used, and replace with yours.

3. Change network ID

vBTC uses network id to distinguish between different networks. Network ID is pchMessageStart bytes from chainparams.cpp. They must be unique per chain/per network.

Warning
Don't forget to update these bytes in functional tests - https://github.com/VeriBlock/vbk-ri-btc/blob/master/test/functional/test_framework/mininode.py#L115-L119

4. Change POP Altchain ID

Altchain ID must be unique among different POP-enabled chains. Set it to random 8-byte number.

https://github.com/VeriBlock/vbk-ri-btc/blob/master/src/vbk/params.hpp#L33-L36

List of public POP-enabled chains: https://pop-coins.netlify.app/ (see field ID).

Note
Technically it is possible for multiple chains to have same Altchain ID, but VeriBlock on-chain analysis will be broken, as multiple chains will be using same ID.

5. Rebootstrap

See rebootstrap guide.

6. Make sure all unit and functional tests pass.

See BTC testing guide.