From 3d83e89d78a6fc941477295d2f781f048d7e338a Mon Sep 17 00:00:00 2001 From: Milan Mulji <98309852+mmulji-ic@users.noreply.github.com> Date: Sun, 10 Sep 2023 16:46:01 +0200 Subject: [PATCH] docs: Updated docs for v12 release (#2718) * updated docs for v12 release * Review comments regarding installation instructions of cosmovisor --- docs/getting-started/quickstart.md | 2 +- docs/hub-overview/overview.md | 8 +- .../{ => cosmoshub-2}/cosmoshub-2.md | 0 .../{ => cosmoshub-3}/cosmoshub-3.md | 0 .../{ => cosmoshub-3}/cosmoshub-3[ES_es].md | 0 .../{ => cosmoshub-3}/cosmoshub-3[KR_kr].md | 0 docs/migration/cosmoshub-4-delta-upgrade.md | 2 +- docs/migration/cosmoshub-4-v10-upgrade.md | 2 +- docs/migration/cosmoshub-4-v11-upgrade.md | 2 +- docs/migration/cosmoshub-4-v12-upgrade.md | 284 ++++++++++++++++++ .../migration/cosmoshub-4-v7-Theta-upgrade.md | 2 +- docs/migration/cosmoshub-4-v8-Rho-upgrade.md | 2 +- .../cosmoshub-4-v9-Lambda-upgrade.md | 2 +- docs/migration/cosmoshub-4-vega-upgrade.md | 2 +- docs/validators/validator-faq.md | 4 +- 15 files changed, 298 insertions(+), 14 deletions(-) rename docs/migration/{ => cosmoshub-2}/cosmoshub-2.md (100%) rename docs/migration/{ => cosmoshub-3}/cosmoshub-3.md (100%) rename docs/migration/{ => cosmoshub-3}/cosmoshub-3[ES_es].md (100%) rename docs/migration/{ => cosmoshub-3}/cosmoshub-3[KR_kr].md (100%) create mode 100644 docs/migration/cosmoshub-4-v12-upgrade.md diff --git a/docs/getting-started/quickstart.md b/docs/getting-started/quickstart.md index 61d6453f61031..723235d224cca 100644 --- a/docs/getting-started/quickstart.md +++ b/docs/getting-started/quickstart.md @@ -27,7 +27,7 @@ For reference, the list of `rpc_servers` and `persistent` peers can be found in ```bash # Build gaiad binary and initialize chain cd $HOME -git clone -b v11.0.0 https://github.com/cosmos/gaia --depth=1 +git clone -b v12.0.0 https://github.com/cosmos/gaia --depth=1 cd gaiad make install gaiad init CUSTOM_MONIKER --chain-id cosmoshub-4 diff --git a/docs/hub-overview/overview.md b/docs/hub-overview/overview.md index 5e3680f64885c..55773bd6abf47 100644 --- a/docs/hub-overview/overview.md +++ b/docs/hub-overview/overview.md @@ -4,10 +4,10 @@ title: Introduction --- ::: warning -### **v11 Upgrade** -Cosmos Hub will be upgraded to [v11](https://github.com/cosmos/gaia/releases/tag/v11.0.0) at block height: **16,596,000** +### **v12 Upgrade** +Cosmos Hub will be upgraded to [v12](https://github.com/cosmos/gaia/releases/tag/v12.0.0) at block height: **[16,985,500](https://www.mintscan.io/cosmos/blocks/16985500)** -To upgrade from v10 check the [**upgrade guide**](../migration/cosmoshub-4-v11-upgrade.md) +To upgrade from v11 check the [**upgrade guide**](../migration/cosmoshub-4-v12-upgrade.md) ::: ![Welcome to the Cosmos Hub](../images/cosmos-hub-image.jpg) @@ -18,7 +18,7 @@ The Cosmos Hub is the first of [thousands of interconnected blockchains](https:/ ## The ATOM -Do you have ATOM tokens? With ATOM, you have the superpower to contribute to the security and governance of the Cosmos Hub. Delegate your ATOM to one or more of the 125 validators on the Cosmos Hub blockchain to earn more ATOM through Proof-of-Stake. You can also vote with your ATOM to influence the future of the Cosmos Hub through on-chain governance proposals. +Do you have ATOM tokens? With ATOM, you have the superpower to contribute to the security and governance of the Cosmos Hub. Delegate your ATOM to one or more of the 180 validators on the Cosmos Hub blockchain to earn more ATOM through Proof-of-Stake. You can also vote with your ATOM to influence the future of the Cosmos Hub through on-chain governance proposals. Learn more about [being a delegator](../delegators/delegator-faq.md), learn about [the security risks](../delegators/delegator-security.md), and start participating with one of the following wallets. diff --git a/docs/migration/cosmoshub-2.md b/docs/migration/cosmoshub-2/cosmoshub-2.md similarity index 100% rename from docs/migration/cosmoshub-2.md rename to docs/migration/cosmoshub-2/cosmoshub-2.md diff --git a/docs/migration/cosmoshub-3.md b/docs/migration/cosmoshub-3/cosmoshub-3.md similarity index 100% rename from docs/migration/cosmoshub-3.md rename to docs/migration/cosmoshub-3/cosmoshub-3.md diff --git a/docs/migration/cosmoshub-3[ES_es].md b/docs/migration/cosmoshub-3/cosmoshub-3[ES_es].md similarity index 100% rename from docs/migration/cosmoshub-3[ES_es].md rename to docs/migration/cosmoshub-3/cosmoshub-3[ES_es].md diff --git a/docs/migration/cosmoshub-3[KR_kr].md b/docs/migration/cosmoshub-3/cosmoshub-3[KR_kr].md similarity index 100% rename from docs/migration/cosmoshub-3[KR_kr].md rename to docs/migration/cosmoshub-3/cosmoshub-3[KR_kr].md diff --git a/docs/migration/cosmoshub-4-delta-upgrade.md b/docs/migration/cosmoshub-4-delta-upgrade.md index 755597eab59f9..24a583d5cd2b9 100644 --- a/docs/migration/cosmoshub-4-delta-upgrade.md +++ b/docs/migration/cosmoshub-4-delta-upgrade.md @@ -1,6 +1,6 @@ --- title: Cosmos Hub 4, Delta Upgrade -order: 4 +order: 1 --- # Cosmos Hub 4, Delta Upgrade, Instructions diff --git a/docs/migration/cosmoshub-4-v10-upgrade.md b/docs/migration/cosmoshub-4-v10-upgrade.md index ce1bd79b15baa..152493c786e5b 100644 --- a/docs/migration/cosmoshub-4-v10-upgrade.md +++ b/docs/migration/cosmoshub-4-v10-upgrade.md @@ -1,6 +1,6 @@ --- title: Cosmos Hub 4, v10 Upgrade -order: 1 +order: 6 --- # Cosmos Hub 4, v10 Upgrade, Instructions diff --git a/docs/migration/cosmoshub-4-v11-upgrade.md b/docs/migration/cosmoshub-4-v11-upgrade.md index 16881dd3a98f8..3d177a85521f1 100644 --- a/docs/migration/cosmoshub-4-v11-upgrade.md +++ b/docs/migration/cosmoshub-4-v11-upgrade.md @@ -1,6 +1,6 @@ --- title: Cosmos Hub 4, Gaia v11 Upgrade -order: 1 +order: 7 --- # Cosmos Hub 4, Gaia v11 Upgrade, Instructions diff --git a/docs/migration/cosmoshub-4-v12-upgrade.md b/docs/migration/cosmoshub-4-v12-upgrade.md new file mode 100644 index 0000000000000..9b43cf34aafb3 --- /dev/null +++ b/docs/migration/cosmoshub-4-v12-upgrade.md @@ -0,0 +1,284 @@ +--- +title: Cosmos Hub 4, Gaia v12 Upgrade +order: 8 +--- + +# Cosmos Hub 4, Gaia v12 Upgrade, Instructions + +This document describes the steps for validators and full node operators, to upgrade successfully to the Gaia v12 release. +For more details on the release, please see the [release notes](https://github.com/cosmos/gaia/releases/tag/v12.0.0) + +## Instructions + +- [Cosmos Hub 4, Gaia v12 Upgrade, Instructions](#cosmos-hub-4-gaia-v12-upgrade-instructions) + - [Instructions](#instructions) + - [On-chain governance proposal attains consensus](#on-chain-governance-proposal-attains-consensus) + - [Liquid Staking](#liquid-staking) + - [Upgrade date](#upgrade-date) + - [Chain-id will remain the same](#chain-id-will-remain-the-same) + - [Preparing for the upgrade](#preparing-for-the-upgrade) + - [System requirement](#system-requirement) + - [Backups](#backups) + - [Testing](#testing) + - [Current runtime](#current-runtime) + - [Target runtime](#target-runtime) + - [Upgrade steps](#upgrade-steps) + - [Method I: Manual Upgrade](#method-i-manual-upgrade) + - [Method II: Upgrade using Cosmovisor](#method-ii-upgrade-using-cosmovisor) + - [Manually preparing the binary](#manually-preparing-the-binary) + - [Preparation](#preparation) + - [Expected upgrade result](#expected-upgrade-result) + - [Auto-Downloading the Gaia binary](#auto-downloading-the-gaia-binary) + - [Preparation](#preparation-1) + - [Expected result](#expected-result) + - [Upgrade duration](#upgrade-duration) + - [Rollback plan](#rollback-plan) + - [Communications](#communications) + - [Risks](#risks) + - [Reference](#reference) + +## On-chain governance proposal attains consensus + +[Proposal 821](https://www.mintscan.io/cosmos/proposals/821) is the reference on-chain governance proposal for this upgrade, which is still in its voting period. Neither core developers nor core funding entities control the governance, and this governance proposal has passed in a _fully decentralized_ way. + +## Liquid Staking + +Validators please be aware that this release will include a new liquid staking module which has been included via the Cosmos SDK. Please see the [release notes](https://github.com/cosmos/gaia/releases/tag/v12.0.0) for v12 for more information about this module. + +**IMPORTANT:** Inclusion of this module requires validators to set a validation-bond to be eligiable for Liquid Staked delegations. Please see the [Validator FAQ](../validators/validator-faq.html#liquid-staking-module) for more information. + +## Upgrade date + +The upgrade will take place at a block height of `16985500`. The date/time of the upgrade is subject to change as blocks are not generated at a constant interval. You can stay up-to-date using this [live countdown](https://www.mintscan.io/cosmos/blocks/16985500) page. + +## Chain-id will remain the same + +The chain-id of the network will remain the same, `cosmoshub-4`. This is because an in-place migration of state will take place, i.e., this upgrade does not export any state. + +## Preparing for the upgrade + +### System requirement + +32GB RAM is recommended to ensure a smooth upgrade. + +If you have less than 32GB RAM, you might try creating a swapfile to swap an idle program onto the hard disk to free up memory. This can +allow your machine to run the binary than it could run in RAM alone. + +```shell +sudo fallocate -l 16G /swapfile +sudo chmod 600 /swapfile +sudo mkswap /swapfile +sudo swapon /swapfile +``` + +### Backups + +Prior to the upgrade, validators are encouraged to take a full data snapshot. Snapshotting depends heavily on infrastructure, but generally this can be done by backing up the `.gaia` directory. +If you use Cosmovisor to upgrade, by default, Cosmovisor will backup your data upon upgrade. See below [upgrade using cosmovisor](#method-ii-upgrade-using-cosmovisor) section. + +It is critically important for validator operators to back-up the `.gaia/data/priv_validator_state.json` file after stopping the gaiad process. This file is updated every block as your validator participates in consensus rounds. It is a critical file needed to prevent double-signing, in case the upgrade fails and the previous chain needs to be restarted. + +### Testing + +For those validator and full node operators that are interested in ensuring preparedness for the impending upgrade, you can run a [v12 Local Testnet](https://github.com/cosmos/testnets/tree/master/local) or join in our [Cosmos Hub Public Testnet](https://github.com/cosmos/testnets/tree/master/public). + +### Current runtime + +The Cosmos Hub mainnet network, `cosmoshub-4`, is currently running [Gaia v11.0.0](https://github.com/cosmos/gaia/releases/v11.0.0). We anticipate that operators who are running on v11.0.x, will be able to upgrade successfully. Validators are expected to ensure that their systems are up to date and capable of performing the upgrade. This includes running the correct binary, or if building from source, building with go `1.20`. + +### Target runtime + +The Cosmos Hub mainnet network, `cosmoshub-4`, will run [Gaia v12.0.0](https://github.com/cosmos/gaia/releases/tag/v12.0.0). Operators _**MUST**_ use this version post-upgrade to remain connected to the network. + +## Upgrade steps + +There are 2 major ways to upgrade a node: + +- Manual upgrade +- Upgrade using [Cosmovisor](https://pkg.go.dev/cosmossdk.io/tools/cosmovisor) + - Either by manually preparing the new binary + - Or by using the auto-download functionality (this is not yet recommended) + +If you prefer to use Cosmovisor to upgrade, some preparation work is needed before upgrade. + +### Method I: Manual Upgrade + +Make sure Gaia v12.0.0 is installed by either downloading a [compatible binary](https://github.com/cosmos/gaia/releases/tag/v12.0.0), or building from source. Building from source requires **Golang 1.20**. + +Run Gaia v11.0.0 till upgrade height, the node will panic: + +```shell +ERR UPGRADE "v12" NEEDED at height: 16985500: upgrade to v12 and applying upgrade "v12" at height:16985500 +``` + +Stop the node, and switch the binary to Gaia v12.0.0 and re-start by `gaiad start`. + +It may take several minutes to a few hours until validators with a total sum voting power > 2/3 to complete their node upgrades. After that, the chain can continue to produce blocks. + +### Method II: Upgrade using Cosmovisor + +### Manually preparing the binary + +##### Preparation + +Install the latest version of Cosmovisor (`1.5.0`): + +```shell +go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest +``` + +**Verify Cosmovisor Version** +```shell +cosmovisor version +cosmovisor version: v1.5.0 +``` + +Create a cosmovisor folder: + +create a Cosmovisor folder inside `$GAIA_HOME` and move Gaia v11.0.0 into `$GAIA_HOME/cosmovisor/genesis/bin` + +```shell +mkdir -p $GAIA_HOME/cosmovisor/genesis/bin +cp $(which gaiad) $GAIA_HOME/cosmovisor/genesis/bin +```` + +build Gaia v12.0.0, and move gaiad v12.0.0 to `$GAIA_HOME/cosmovisor/upgrades/v12/bin` + +```shell +mkdir -p $GAIA_HOME/cosmovisor/upgrades/v12/bin +cp $(which gaiad) $GAIA_HOME/cosmovisor/upgrades/v12/bin +``` + +Then you should get the following structure: + +```shell +. +├── current -> genesis or upgrades/ +├── genesis +│ └── bin +│ └── gaiad #v11.0.x +└── upgrades + └── v12 + └── bin + └── gaiad #v12.0.0 +``` + +Export the environmental variables: + +```shell +export DAEMON_NAME=gaiad +# please change to your own gaia home dir +# please note `DAEMON_HOME` has to be absolute path +export DAEMON_HOME=$GAIA_HOME +export DAEMON_RESTART_AFTER_UPGRADE=true +``` + +Start the node: + +```shell +cosmovisor run start --x-crisis-skip-assert-invariants --home $DAEMON_HOME +``` + +Skipping the invariant checks is strongly encouraged since it decreases the upgrade time significantly and since there are some other improvements coming to the crisis module in the next release of the Cosmos SDK. + +#### Expected upgrade result + +When the upgrade block height is reached, Gaia will panic and stop: + +This may take 7 minutes to a few hours. +After upgrade, the chain will continue to produce blocks when validators with a total sum voting power > 2/3 complete their node upgrades. + +### Auto-Downloading the Gaia binary + +**This method is not recommended!** + +#### Preparation + +Install the latest version of Cosmovisor (`1.5.0`): + +```shell +go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest +``` + +Create a cosmovisor folder: + +create a cosmovisor folder inside gaia home and move gaiad v11.0.x into `$GAIA_HOME/cosmovisor/genesis/bin` + +```shell +mkdir -p $GAIA_HOME/cosmovisor/genesis/bin +cp $(which gaiad) $GAIA_HOME/cosmovisor/genesis/bin +``` + +```shell +. +├── current -> genesis or upgrades/ +└── genesis + └── bin + └── gaiad #v11.0.x +``` + +Export the environmental variables: + +```shell +export DAEMON_NAME=gaiad +# please change to your own gaia home dir +export DAEMON_HOME=$GAIA_HOME +export DAEMON_RESTART_AFTER_UPGRADE=true +export DAEMON_ALLOW_DOWNLOAD_BINARIES=true +``` + +Start the node: + +```shell +cosmovisor run start --x-crisis-skip-assert-invariants --home $DAEMON_HOME +``` + +Skipping the invariant checks can help decrease the upgrade time significantly. + +#### Expected result + +When the upgrade block height is reached, you can find the following information in the log: + +```shell +ERR UPGRADE "v12" NEEDED at height: 16985500: upgrade to v12 and applying upgrade "v12" at height:16985500 +``` + +Then the Cosmovisor will create `$GAIA_HOME/cosmovisor/upgrades/v12/bin` and download the Gaia v12.0.0 binary to this folder according to links in the `--info` field of the upgrade proposal. +This may take 7 minutes to a few hours, afterwards, the chain will continue to produce blocks once validators with a total sum voting power > 2/3 complete their nodes upgrades. + +_Please Note:_ + +- In general, auto-download comes with the risk that the verification of correct download is done automatically. If users want to have the highest guarantee users should confirm the check-sum manually. We hope more node operators will use the auto-download for this release but please be aware this is a risk and users should take at your own discretion. +- Users should run their node on v11.0.x if they use the cosmovisor v1.5.0 with auto-download enabled for upgrade process. + +## Upgrade duration + +The upgrade may take a few minutes to several hours to complete because cosmoshub-4 participants operate globally with differing operating hours and it may take some time for operators to upgrade their binaries and connect to the network. + +## Rollback plan + +During the network upgrade, core Cosmos teams will be keeping an ever vigilant eye and communicating with operators on the status of their upgrades. During this time, the core teams will listen to operator needs to determine if the upgrade is experiencing unintended challenges. In the event of unexpected challenges, the core teams, after conferring with operators and attaining social consensus, may choose to declare that the upgrade will be skipped. + +Steps to skip this upgrade proposal are simply to resume the cosmoshub-4 network with the (downgraded) v11.0.0 binary using the following command: + +> gaiad start --unsafe-skip-upgrade 16985500 + +Note: There is no particular need to restore a state snapshot prior to the upgrade height, unless specifically directed by core Cosmos teams. + +Important: A social consensus decision to skip the upgrade will be based solely on technical merits, thereby respecting and maintaining the decentralized governance process of the upgrade proposal's successful YES vote. + +## Communications + +Operators are encouraged to join the `#cosmos-hub-validators-verified` channel of the Cosmos Hub Community Discord. This channel is the primary communication tool for operators to ask questions, report upgrade status, report technical issues, and to build social consensus should the need arise. This channel is restricted to known operators and requires verification beforehand. Requests to join the `#cosmos-hub-validators-verified` channel can be sent to the `#general-support` channel. + +## Risks + +As a validator performing the upgrade procedure on your consensus nodes carries a heightened risk of double-signing and being slashed. The most important piece of this procedure is verifying your software version and genesis file hash before starting your validator and signing. + +The riskiest thing a validator can do is discover that they made a mistake and repeat the upgrade procedure again during the network startup. If you discover a mistake in the process, the best thing to do is wait for the network to start before correcting it. + +## Reference + +[Join Cosmos Hub Mainnet](https://github.com/cosmos/mainnet) + + diff --git a/docs/migration/cosmoshub-4-v7-Theta-upgrade.md b/docs/migration/cosmoshub-4-v7-Theta-upgrade.md index 21ab16097ae55..e218e49167b72 100644 --- a/docs/migration/cosmoshub-4-v7-Theta-upgrade.md +++ b/docs/migration/cosmoshub-4-v7-Theta-upgrade.md @@ -1,6 +1,6 @@ --- title: Cosmos Hub 4, Theta Upgrade -order: 2 +order: 3 --- # Cosmos Hub 4, v7-Theta Upgrade, Instructions diff --git a/docs/migration/cosmoshub-4-v8-Rho-upgrade.md b/docs/migration/cosmoshub-4-v8-Rho-upgrade.md index f60d35c956e35..1984cb2494d13 100644 --- a/docs/migration/cosmoshub-4-v8-Rho-upgrade.md +++ b/docs/migration/cosmoshub-4-v8-Rho-upgrade.md @@ -1,6 +1,6 @@ --- title: Cosmos Hub 4, Rho Upgrade -order: 2 +order: 4 --- # Cosmos Hub 4, v8-Rho Upgrade, Instructions diff --git a/docs/migration/cosmoshub-4-v9-Lambda-upgrade.md b/docs/migration/cosmoshub-4-v9-Lambda-upgrade.md index 94462b504358d..7ee8ceff735b7 100644 --- a/docs/migration/cosmoshub-4-v9-Lambda-upgrade.md +++ b/docs/migration/cosmoshub-4-v9-Lambda-upgrade.md @@ -1,6 +1,6 @@ --- title: Cosmos Hub 4, Lambda Upgrade -order: 1 +order: 5 --- # Cosmos Hub 4, v9-Lambda Upgrade, Instructions diff --git a/docs/migration/cosmoshub-4-vega-upgrade.md b/docs/migration/cosmoshub-4-vega-upgrade.md index 4f8eda6bbecc1..36ef3607f8891 100644 --- a/docs/migration/cosmoshub-4-vega-upgrade.md +++ b/docs/migration/cosmoshub-4-vega-upgrade.md @@ -1,6 +1,6 @@ --- title: Cosmos Hub 4, Vega Upgrade -order: 3 +order: 2 --- # Cosmos Hub 4, Vega Upgrade, Instructions diff --git a/docs/validators/validator-faq.md b/docs/validators/validator-faq.md index bb68a1377104a..e645db553be56 100644 --- a/docs/validators/validator-faq.md +++ b/docs/validators/validator-faq.md @@ -261,7 +261,7 @@ For a detailed and technical description, please see ADR-061 in the Cosmos SDK o The validator themselves, but also any other address delegated to the validator. ### How can I validator bond? -Once delegated to a validator, a delegator (or validator operator) can convert their delegation to a validator into Validator Bond by signing a ValidatorBond message. +Once delegated to a validator, a delegator (or validator operator) can convert their delegation to a validator into Validator Bond by signing a ValidatorBond message. The ValidatorBond message is exposed by the staking module and can be executed as follows: ``` @@ -272,7 +272,7 @@ There are no partial Validator Bonds: when a delegator or validator converts the To convert Validator Bond back into a standard delegation, simply unbond the shares. ### How does a delegator or validator mark their delegation as a validator bond? -Once delegated to a validator, sign a `ValidatorBond` message. +Once delegated to a validator, sign a `ValidatorBond` message. ### Are validator bonds subject to additional slashing conditions? No, in the event of a slash, a validator bond is slashed at the same rate as a regular bond.