Upgrading the consensus engine from XDPoS1.0 to XDC2.0 only takes a few simple steps.
For the Apothem testnet upgrade:
- All Apothem master node owners confirm their participation by deploying the latest code version.
- 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.
- 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:
- 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: https://github.com/XinFinOrg/XDPoSChain/blob/dev-upgrade/common/constants.go#L39
- 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: https://github.com/XinFinOrg/XDPoSChain/blob/dev-upgrade/params/config.go#L64.
- 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
XDPoS.getV2Block("latest")
XDPoS.getV2Block("committed")
Discussion (0)