Software Upgrade on Fuxi-8000 Testnet
Editor’s Note: Fuxi-8000 has smoothly upgraded to v0.10.2 at height 50000.
Fuxi-8000 Testnet upgrade schedule:
- Phase One (Jan.16~Jan. 18): we bootstrap the network with iris v0.10.0 in a decentralized way. After that, we expect the network to be running for two days.
- Phase Two(Jan.18~Jan.21): After Fuxi-8000 goes steady, dev team submitted a runtime Smooth Software Upgrade proposal to v0.10.2. More than 70% voting power switched to v0.10.2 before #50000, new functions in v0.10.2 is now activated.
- Phase Three(Jan.21~Jan.25): Team will test the software upgrade workflow to recover from consensus failure: Patch Upgrade. The team will trigger a consensus failure deliberately placed in v0.10.2. This bug will cause the network to halt and you need to switch to
v0.10.2-patchto make network come back.
- Phase Four(Jan.25~Jan.29): In this phase we will try to export a snapshop of blockchain and use it as genesis file for a new chain. This is another type of software upgarade: Restart Upgrade. In this phase, we will first submit a
system-haltproposal. If this proposal is passed, Tendermint will stop at certain height. Then, you can export the snapshot or download the new genesis file provided by IRIS team and restart with new version
- Load Test(Jan.29~Feb.3) : we expect to deploy a transaction bot which will push system tps to certain level. We expect TPS to increase from 100 to 500 in following days.
Evolution of Upgrade
The first experiment of runtime upgrade of Fuxi-4000 was very inspiring,but software upgrade in Fuxi-7000 cased the chain to halt. Dev team put many thoughts into creating a more robust upgrade workflow afterwards. IRIShub v0.10.0 contains many breaking changes. Besides the architecture modifications that we have already talked about, the most exciting feature is to redefine software upgrade workflow.
Types of Software Upgrade
Voluntary: When there is a non-breaking path release of IRIShub software, validator could upgrade to newer version and restart their nodes. IRIShub v0.10.1 is good for voluntary upgrade.
Smooth: Runtime software upgrade where Tendermint will collect version signals from block headers and tell if the pre-defined threshold is passed. When the target is met, new logic will be activated.
Patch: When there is a consensus failure, like apphash conflicts, then a patch could be deployed with class III upgrade. Tendermint will replay last block to recover application state.
Restart: When the changes in iris is no longer backward compatible, this type of upgrade is needed. We export a snapshop of blockchain and use it as genesis file for a new chain.
Software Upgrade in Phase II
- First, one profiler address held by dev team will submit a software upgrade proposal about upgrading from
v0.10.2at Jan 18, 2019.
- To get this proposal passed, we need to reach participation of more than 85.72% and more than 83.4% of them vote yes. Then it’s expected that validators begin to install IRISHub v0.10.2 and restart with this new version.
$ iris version
$ iriscli version
- Your node status will be different:
As you can see, the
app field is bumped from 0 to 1.
- The validators will have three days, until block 5000, to do this as indicated as
switch-heightin proposal, while Tendermint will collect version signals from block headers afterwards .
- At the end of upgrade period, aka.
switch-height, if Tendermint tells that more than 70% voting power is using
v0.10.2, then this upgrade proposal will be passed and new functions from
v0.10.2will be activated.
- Verify that this runtime upgrade process is successful by executing the following command to query upgrade information:
iriscli upgrade info
The example output should be like:
iriscli upgrade info --node=localhost:26657
You should see that in upgrade_config, the
version is 1 and
ProposalID is that of Upgrade proposal.
- To query how many validators have switched to new version, run this command:
iriscli upgrade query-signals
- If you forgot to upgrade to a new version, but other nodes has successfully upgrade to new version, then your node will show panic error messages in output logs. But don’t worry, you could still download IRIShub
v0.10.2and start again. Then , you will see the panic messages no more
iris start --home=<IRIS-HOME>
New Function in v0.10.2
- The proposer must deposit 30% of the minimum deposit when submitting the proposal
Software Upgrade in Phase III
- We will test the software upgrade workflow to recover from consensus failure . In v0.10.2, there is an easter egg🥚: team will trigger a consensus failure deliberately. This 🐞 will cause the network to halt
- This bug will stop the system from making new blocks, while patched version of iris will fix the problem and reload the application states. As a validator, you need to switch to
v0.10.1-patchto come back live
iris start --home --replay-last-block
- If more than 2/3 voting power has switched to the patched version, the network will resume making blocks.
Software Upgrade in Phase IV
- First, one profiler address held by dev team will submit a
System-Haltproposal about stop the chain at about height #160,000
- To get this proposal passed, we need to reach participation of more than 85.72% and more than 83.4% of them vote yes. Then it’s expected that the chain will stop after 20,000 blocks.
- After the chain is stoped, dev team export a snapshop of blockchain and use it as genesis file to restart the chain,still named Fuxi-8000. This is another type of software upgrade: Restart Upgrade. All the validators are expected to download. the new genesis and start with new version
v0.11.0. If +2/3 validators come online, the new chain will begin making blocks.