# IRIS Hub Upgrade to v1.0.1 (Kuafu) ## Key Results If passed, this governance proposal would commit the IRIS Hub to halting `irishub` on Feb 25, exporting the state and starting `irishub-1` based on irishub v1.0.1 (Kuafu). ## Kuafu Kuafu represents the third stage of IRISnet (see [whitepaper](https://github.com/irisnet/irisnet/blob/master/WHITEPAPER.md)). In this stage, we are aiming to accomplish the connection of IRIS Hub with Cosmos Hub and other application blockchains through IBC, and to upgrade mobile clients to support IBC applications. We will also focus on buiding out the envisioned interchain service network. ## Kuafu Upgrade Preparations ### Bifrost Testnets To fulfill the objectives of Kuafu and to support the Cosmos Network’s interchain vision, the Bifrost testnet was launched on September 2, 2020 to run side by side with the Stargate testnet. As the Cosmos Stargate mainnet upgrade is fast approaching, the Bifrost testnet advanced into **Phase-2** accordingly on January 19 to make the final dash for IRIS Hub mainnet upgrade preparation. Bifrost Phase-2 provides a comprehensive testing environment, including: 1. A testnet that provides a "staging area" where exchanges, developers of wallets, explorers and dApps test and verify their product upgrades; 2. An upgrade simulation testnet where IRIS Hub mainnet validators perform a "dry-run" of the upcoming upgrade; 3. The core development team has also initiated a multi-network IBC joint testing campaign to further validate the IBC token transfer function, improve IBC user experience, and support IBC-related tools development. Before Phase-2, Bifrost went through two predecessor stages of **Phase-0** and **Phase-1**, and here are some highlights of incentivized task results in Phase-1: - 166 developers participated for a total of 1331 badges distributed and a completion rate of up to 92.4% - more than 8,000 NFTs were minted. ### IRIS Hub 1.0 After several iterations and intensive tests,`irishub v1.0.1` which is the software for IRIS Hub 1.0, has been released. Built on top of Cosmso SDK v0.41, `irishub v1.0.1` has not only integrated IBC functions provided by Cosmos SDK, but also introduced some unique IRIS Modules, including iService, Coinswap (AMM), NFT and so on. 1. **Inter-Blockchain Communication (IBC)**: IRIS Hub 1.0 will be one of the first mainnets in the Cosmos ecosystem to integrate the flagship cross-chain IBC protocol. IBC along with the enhanced iService can serve as the blockchain world’s “TCP/IP + HTTP” protocols over which the Internet of Blockchains can be built out. 2. **Enhanced iService**: As an application layer protocol, the enhanced Interchain Service (iService) framework can support connections between heterogeneous blockchains and centralized systems, and bridge the gap between the crypto world and the traditional business world. 3. **Coinswap (AMM)**: The combination of IBC with Coinswap (AMM) will provide a vanguard innovation platform for DeFi applications in the Cosmos ecosystem. 4. **NFT**: The NFT module built into IRIS Hub 1.0 supports the complete lifecycle management of non-fungible tokens and can be used for asset digitization on blockchains. 5. **Oracle**: Powered by iService, a flexible and innovative oracle function has been built into IRIS Hub 1.0, enabling cross-platform data services with various on-chain/off-chain interaction patterns. #### CHANGELOG: CLI: * [\#2573](https://github.com/irisnet/irishub/pull/2573) Bump cosmos-sdk version to [v0.41.3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.41.3) * [\#2571](https://github.com/irisnet/irishub/pull/2571) Bump tendermint verion to [v0.34.7](https://github.com/tendermint/tendermint/releases/tag/v0.34.7) * [\#2567](https://github.com/irisnet/irishub/pull/2567) Bump irismod version to [v1.3.1](https://github.com/irisnet/irismod/releases/tag/v1.3.1) * [\#2505](https://github.com/irisnet/irishub/pull/2505) Remove duplicate cmd * [\#2154](https://github.com/irisnet/irishub/issues/2154) Support native token unit conversion in command Application: * [\#2573](https://github.com/irisnet/irishub/pull/2573) Bump cosmos-sdk version to [v0.41.3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.41.3) * [\#2571](https://github.com/irisnet/irishub/pull/2571) Bump tendermint verion to [v0.34.7](https://github.com/tendermint/tendermint/releases/tag/v0.34.7) * [\#2567](https://github.com/irisnet/irishub/pull/2567) Bump irismod version to [v1.3.1](https://github.com/irisnet/irismod/releases/tag/v1.3.1) * [\#2551](https://github.com/irisnet/irishub/pull/2551) Disable repeated service invocation * [\#2542](https://github.com/irisnet/irishub/pull/2542) Migrate withdraw infos * [\#2524](https://github.com/irisnet/irishub/pull/2524) Fix proto package and path * [\#2518](https://github.com/irisnet/irishub/pull/2518) Move abandoned tokens to communityTax * [\#2512](https://github.com/irisnet/irishub/pull/2512) Normalize msg and genesis validation * [\#2484](https://github.com/irisnet/irishub/pull/2484) Bump cosmos-sdk version to [v0.40.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.40.0) * [\#2484](https://github.com/irisnet/irishub/pull/2484) Bump tendermint verion to [v0.34.1](https://github.com/tendermint/tendermint/releases/tag/v0.34.1) * [\#2502](https://github.com/irisnet/irishub/pull/2502) Bump irismod version to [v1.2.0](https://github.com/irisnet/irismod/releases/tag/v1.2.0) * [\#2501](https://github.com/irisnet/irishub/issues/2501) Merge the swagger docs of cosmos-sdk and irismod * [\#2485](https://github.com/irisnet/irishub/pull/2485) Support key import 0.16.3 and earlier version keystore file * [\#2488](https://github.com/irisnet/irishub/pull/2488) Restrict the use of certain token for specified Msg * [\#2098](https://github.com/irisnet/irishub/issues/2098) Migrate iriscli test * [\#2097](https://github.com/irisnet/irishub/issues/2097) Add scripts to migrate genesis data from v0.16.3 * [\#2090](https://github.com/irisnet/irishub/issues/2090) Refactor guardian module * [\#2089](https://github.com/irisnet/irishub/issues/2089) Overwrite mint module * [\#2500](https://github.com/irisnet/irishub/issues/2500) Migrate IRIShub modules to irismod * [\#2381](https://github.com/irisnet/irishub/pull/2381) Rebuild irishub v1.0 using cosmos-sdk v0.40 ### Conclusion After all the preparation work mentioned above, we are now ready to enter the Kuafu stage with IRIS Hub 1.0. ## Upgrade Steps Since Cosmos SDK v0.41 has many non-compatible functions from Cosmos SDK v0.28 which is being used by the current mainnet, this upgrade has to use a non-compatible restart upgrade method. ### Halt `irishub` This proposal will lead to the "SystemHalt" of the current mainnet (chain-id: `irishub`). The halt is scheduled to happen 20,000 blocks after the proposal passes. The blockchain state at the halt height will be exported and migrated. ### Start `irishub-1` After the mainnet validators verify the migrated state, they will run `irishub v1.0.1` to launch the new mainnet (chain-id: `irishub-1`). The involved steps are: 1. Export genesis file 2. Migrate genesis file 3. Initialize new node 4. Migrate privkey file 5. Migrate node key file 6. Copy migrated genesis file 7. Config new node 8. Start new node Validators can refer to the following doc for detailed upgrade steps: https://github.com/irisnet/irishub/blob/master/docs/migration/README.md ## Upgrade Time The mainnet upgrade is expected to take place on Thursday Feb 25 at around 14:00 UTC+8, which is about 1 week after Cosmos Stargate upgrade (Feb 18). ## Git Commit The git commit of `irishub v1.0.1` is: `6c4a335953e4b7fcba581643ab6b83be32a69d3b` ## Migration Guide Besides the validators, other types of participants of IRISnet should follow different migration methods for this upgrade. ### Exchanges Exchanges can refer to the migration guide: https://github.com/irisnet/mainnet/blob/master/upgrade/v1.0.0/Migration-Guide-For-Exchange.md ### Application Developers Developers can refer to the complete API docs: https://github.com/irisnet/irishub/blob/master/docs/endpoints/intro.md ### Users it’s very important to back up your wallet mnemonics or keystore files. Rainbow wallet users should refer to [Rainbow wallet tutorial](https://medium.com/irisnet-blog/much-safer-keystore-import-export-function-is-added-to-rainbow-v2-4-5e8d9e0723cc), while users of other wallets should follow their own manuals to perform similar operations. CLI users can refer to this migration guide: https://github.com/irisnet/irishub/blob/master/migrate/keys.md ## Other Effects This upgrade will affect the Delegator Reward Program of [IRIS Foundation community-centric delegation campaign](https://medium.com/irisnet-blog/iris-foundation-to-roll-out-a-community-centric-delegation-campaign-the-second-one-year-token-528876fa1083). The program relies on the detailed "coin flow" information provided by `irishub v0.16` to perform accurate calculation of any given delegator's rewards within a certain period of time. This feature was enabled through some customized enhancements to the forked Cosmos SDK v0.28, which is no longer possible as `irishub v1.0` has migrated to depend on Cosmos SDK v0.41. As a result, **Delegator Reward Program will have to be cancelled after the upgrade**. Community delegators can still get their doubled delegation rewards from Feb 1 to Feb 25 though, which will be distributed at the beginning of March. ## Exceptions There are multiple circumstances where the proposal should be abandoned even if it passes: 1. A critical vulnerability may be found in the software. If the development teams change their recommended version of irishub, the validator set should implicitly abandon this upgrade procedure. A future proposal will be made to the Hub to upgrade to the new target commit. 2. The migration process fails could fail to produce a valid irishub-1 genesis file. This would manifest as ad-hoc changes to genesis needed to start or a failure to produce blocks from `irishub-1`. In this case, the validator set should restart `irishub` (with a new patched version to skip the system-halt process) at the block height of the halt and a future governance proposal will be done to initiate another upgrade.