Here we try to test a few scenarios on XDPoS2.0 to see if the protocol can be seamlessly upgraded from v1 without any downtime.
In brief summary: we ran 3 different tests and successfully prove that the upgrade process is seamless and the upgraded protocol is functional.
- Network: Devnet
- Number of Master nodes: 11
- Blocks per Epoch: 900
- V1 mining time: 2s
- V2 mining time: 5s
- V2 mining vote thresholds: 6
- V2 first block: 7060500
Test target: XDC consensus protocol can be upgraded from V1 to V2 without downtime
Test target: Correct synchronization: When bootstrapping a new node, the new node can correctly synchronize all the V1 blocks and then V2 blocks, then run V2 consensus.
Test target: The protocol should penalize inactive nodes and then add it back properly.
Steps and Expected Behaviours:
- Stop node A and observe the delay of blockchain
- Wait until it passes the next Epoch, observe
- node A gets excluded (penalty list) from miner list
- blockchain is fully functional, no delay on produce block
- Restart node A and wait a few Epochs, observe
- node A is added back to miner list
- blockchain is still fully functional
We are committed to continuously test XDPoS2.0 under various test cases and will do more report.
Do you have any good test case in mind? Please share it here!