Developers Forum for XinFin XDC Network


Posted on

XDPoS2.0 Upgrade Guide

Upgrading the consensus engine from XDPoS1.0 to XDC2.0 only takes a few simple steps.

For the Apothem testnet upgrade:

  1. All Apothem master node owners confirm their participation by deploying the latest code version.
  2. The protocol team will create a code branch that specifies a future block height as the consensus switch point, and build a docker image accordingly.
  3. Apothem master node owners restart their nodes using this docker image. This step must be done before the network has reached the switch block, and this is why we want to ensure everyone is on the same page via step-1.

More generically, to upgrade a XDC devnet/testnet/private network that you own:

  1. Configure a switch block number: Check your current block height and decide on a future block number as the switch block point. The block height should allow enough time for you to complete all the steps below. Once decided, configure it here:
  2. Configure a voting quorum threshold: The maximum reasonable value is 2/3, giving your network the highest level of Byzantine fault tolerance of 1/3. The threshold can be set here:
  3. Redeploy. Rebuild the node binary based on your changes above, and then deploy the binary on all your masternodes.

To verify whether the switch was successful:
Monitor the block height by attach into web3 portal, or from the dashboard and wait until the switch block is passed.
You can also query web3 api, to see v2 block specific information

Enter fullscreen mode Exit fullscreen mode

Discussion (0)