Skip to content

Commit c9a3831

Browse files
authored
docs: add docs versioning (#3092)
* docs: add versioning for current docs * docs: mv archived migrations; mv modules * docs: update docusaurus configs * docs: update docusaurus configs * rm unneded file; update docs docs * update docusaurus * Update DOCS_README.md
1 parent 0a16a03 commit c9a3831

30 files changed

+344
-162
lines changed

docs/DOCS_README.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ parent:
77

88
If you want to open a PR on Gaia to update the documentation, please follow the guidelines in the [`CONTRIBUTING.md`](https://github.com/cosmos/gaia/tree/main/CONTRIBUTING.md)
99

10-
## Internationalization
11-
12-
- Translations for documentation live in a `docs/translations/<locale>/` folder, where `<locale>` is the language code for a specific language. For example, `zh` for Chinese, `ko` for Korean, `es` for Spanish, etc.
13-
- Each `docs/translations/<locale>/` folder must follow the same folder structure within `docs/`, but only content in the following folders needs to be translated and included in the respective `docs/translations/<locale>/` folder
14-
- Each `docs/translations/<locale>/` folder must also have a `README.md` that includes a translated version of both the layout and content within the root-level [`README.md`](https://github.com/cosmos/cosmos-sdk/tree/master/docs/README.md). The layout defined in the `README.md` is used to build the homepage.
15-
1610
## Docs Build Workflow
1711

1812
The documentation for Gaia is hosted at:
@@ -79,6 +73,15 @@ Install project dependencies
7973
npm install
8074
```
8175

76+
Pull the versions referenced in `versions.json` and `docusaurus.config.js`:
77+
78+
```shell
79+
cd ../ # back to project root
80+
make build-docs
81+
git checkout <your_working_branch>
82+
cd docs
83+
```
84+
8285
Serve the app
8386

8487
```bash

docs/README copy.md

-40
This file was deleted.

docs/docs/index.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import { currentParams } from '@site/docs/governance/current-parameters.js';
77
import { PlainVar } from '@site/src/js/Var';
88

99
:::tip
10-
### **v15.1 Upgrade**
11-
Cosmos Hub will be upgraded to [v15.1](https://github.com/cosmos/gaia/releases/tag/v15.1.0) at block height: **[19,639,600](https://www.mintscan.io/cosmos/blocks/19639600)**
10+
### **v16 Upgrade**
11+
Cosmos Hub will be upgraded to [v16](https://github.com/cosmos/gaia/releases/tag/v16.0.0) at block height: **[20,440,500](https://www.mintscan.io/cosmos/blocks/20440500)**
1212

13-
To upgrade from v14 check the [**upgrade guide**](/migration/cosmoshub-4-v15-upgrade.md)
13+
To upgrade from v15.2.0 check the [**upgrade guide**](./migration/latest.md)
1414
:::
1515

1616
![Welcome to the Cosmos Hub](images/cosmos-hub-image.jpg)

docs/docs/interchain-security/README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
title: Interchain Security
3-
order: false
4-
parent:
5-
order: 2
3+
order: 3
64
---
75

86
The Interchain Security feature, brings to the Cosmos Hub a shared security model, where the Cosmos Hub validators, also validate on consumer chains. This is valuable for consumer chains, as consumer chains can focus on product-market fit, rather than business and operational agreements in bringing together a validator set. As part of this agreement, consumer chains pay for the security by distributing a portion of the consumer chain revenue to Hub token holders.

docs/docs/metaprotocols/_category_.json

-5
This file was deleted.

docs/docs/migration/README.md

+8-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
---
22
order: false
33
parent:
4-
title: Migration Instructions
5-
order: 9
4+
title: Upgrade Instructions
65
---
7-
<!--
8-
markdown-link-check-disable
9-
-->
106

11-
# Migration Instructions
127

13-
This directory houses Cosmos Hub major upgrade migration instructions.
8+
# Upgrading
149

15-
- [Upgrading from `cosmoshub-2` to `cosmoshub-3`](./cosmoshub-2/cosmoshub-2.md)
16-
- [Upgrading from `cosmoshub-3` to `cosmoshub-4`](./cosmoshub-3/cosmoshub-3.md)
17-
<!-- markdown-link-check-enable -->
10+
To upgrade to the latest `cosmoshub-4` version check:
11+
- [latest upgrade](./latest.md)
12+
13+
To check archived migrations and historic `cosmoshub` versions check:
14+
- [Upgrading from `cosmoshub-2` to `cosmoshub-3`](./archive/cosmoshub-2/cosmoshub-2.md)
15+
- [Upgrading from `cosmoshub-3` to `cosmoshub-4`](./archive/cosmoshub-3/cosmoshub-3.md)

docs/docs/migration/_category_.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"label": "Migration Instructions",
2+
"label": "Upgrade Instructions",
33
"position": 9,
44
"link": { "type": "doc", "id": "migration/README" }
55
}

docs/docs/migration/archive/README.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
order: false
3+
parent:
4+
title: Archived Instructions
5+
---
6+
7+
8+
# Archive
9+
10+
This directory houses archived Cosmos Hub major upgrade migration instructions.
11+
12+
The migrations are not relevant for mainnet, but you may find them useful in case you are providing infrastructure for historic versions of the Cosmos Hub.
13+
14+
To view archived migrations for old versions check:
15+
- [Upgrading from `cosmoshub-2` to `cosmoshub-3`](./cosmoshub-2/cosmoshub-2.md)
16+
- [Upgrading from `cosmoshub-3` to `cosmoshub-4`](./cosmoshub-3/cosmoshub-3.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"label": "CosmosHub-4",
3+
"position": 3,
4+
"link": null
5+
}

docs/docs/migration/cosmoshub-4-v14-upgrade.md docs/docs/migration/archive/cosmoshub-4/cosmoshub-4-v14-upgrade.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The chain-id of the network will remain the same, `cosmoshub-4`. This is because
5656

5757
## Preparing for the upgrade
5858

59-
System requirements for validator nodes can be found [here](../getting-started/system-requirements.md).
59+
System requirements for validator nodes can be found [here](../../../getting-started/system-requirements.md).
6060

6161
### Backups
6262

docs/docs/migration/cosmoshub-4-v15-upgrade.md docs/docs/migration/archive/cosmoshub-4/cosmoshub-4-v15-upgrade.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Optimal CPU performance:  2.50GHz, 8 cores (eg Intel Xeon Gold 6248 or equivale
7373

7474
It is paramount that the operators set enough SWAP to cover all cases. SWAP partitions can be used to supplement the RAM requirement but they will increase the upgrade time.
7575

76-
After the upgrade you can revert your hardware setting to the recommended system requirements for normal [day-to-day operations](../getting-started/system-requirements.md).
76+
After the upgrade you can revert your hardware setting to the recommended system requirements for normal [day-to-day operations](../../../getting-started/system-requirements.md).
7777

7878
### Backups
7979

docs/docs/migration/latest.md

+200
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
---
2+
title: v16.0.0 Upgrade
3+
---
4+
5+
# Upgrading Gaia
6+
7+
This guide provides instructions for upgrading Gaia from v15.2.x to v16.0.0.
8+
9+
This document describes the steps for validators, full node operators and relayer operators, to upgrade successfully for the Gaia v16 release.
10+
11+
For more details on the release, please see the [release notes](https://github.com/cosmos/gaia/releases/tag/v16.0.0)
12+
13+
**Relayer Operators** for the Cosmos Hub and consumer chains, will also need to update to use [Hermes v1.8.0](https://github.com/informalsystems/hermes/releases/tag/v1.8.0) or higher. You may need to restart your relayer software after a major chain upgrade.
14+
15+
## Release Binary
16+
17+
Please use the correct release binary: `v16.0.0`.
18+
19+
## Instructions
20+
21+
- [Upgrading Gaia](#upgrading-gaia)
22+
- [Release Binary](#release-binary)
23+
- [Instructions](#instructions)
24+
- [On-chain governance proposal attains consensus](#on-chain-governance-proposal-attains-consensus)
25+
- [Upgrade date](#upgrade-date)
26+
- [Preparing for the upgrade](#preparing-for-the-upgrade)
27+
- [System requirements](#system-requirements)
28+
- [An Important Note for Node Operators](#an-important-note-for-node-operators)
29+
- [Backups](#backups)
30+
- [Testing](#testing)
31+
- [Current runtime](#current-runtime)
32+
- [Target runtime](#target-runtime)
33+
- [Upgrade steps](#upgrade-steps)
34+
- [Method I: Manual Upgrade](#method-i-manual-upgrade)
35+
- [Method II: Upgrade using Cosmovisor](#method-ii-upgrade-using-cosmovisor)
36+
- [Manually preparing the binary](#manually-preparing-the-binary)
37+
- [Preparation](#preparation)
38+
- [Expected upgrade result](#expected-upgrade-result)
39+
- [Auto-Downloading the Gaia binary](#auto-downloading-the-gaia-binary)
40+
- [Upgrade duration](#upgrade-duration)
41+
- [Rollback plan](#rollback-plan)
42+
- [Communications](#communications)
43+
- [Risks](#risks)
44+
- [Reference](#reference)
45+
46+
## On-chain governance proposal attains consensus
47+
48+
Once a software upgrade governance proposal is submitted to the Cosmos Hub, both a reference to this proposal and an `UPGRADE_HEIGHT` are added to the [release notes](https://github.com/cosmos/gaia/releases/tag/v16.0.0).
49+
If and when this proposal reaches consensus, the upgrade height will be used to halt the "old" chain binaries. You can check the proposal on one of the block explorers or using the `gaiad` CLI tool.
50+
51+
## Upgrade date
52+
53+
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 by checking the estimated estimated time until the block is produced one of the block explorers (e.g. https://www.mintscan.io/cosmos/blocks/`UPGRADE_HEIGHT`).
54+
55+
## Preparing for the upgrade
56+
57+
### Backups
58+
59+
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.
60+
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.
61+
62+
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.
63+
64+
### Testing
65+
66+
For those validator and full node operators that are interested in ensuring preparedness for the impending upgrade, you can run a [v16 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).
67+
68+
### Current runtime
69+
70+
The Cosmos Hub mainnet network, `cosmoshub-4`, is currently running [Gaia v15.2.0](https://github.com/cosmos/gaia/releases/v15.2.0). We anticipate that operators who are running on v15.2.0, 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 and if building from source, building with the appropriate `go` version.
71+
72+
### Target runtime
73+
74+
The Cosmos Hub mainnet network, `cosmoshub-4`, will run **[Gaia v16.0.0](https://github.com/cosmos/gaia/releases/tag/v16.0.0)**. Operators _**MUST**_ use this version post-upgrade to remain connected to the network. The new version requires `go v1.21` to build successfully.
75+
76+
## Upgrade steps
77+
78+
There are 2 ways to upgrade a node:
79+
80+
- Manual upgrade
81+
- Upgrade using [Cosmovisor](https://pkg.go.dev/cosmossdk.io/tools/cosmovisor)
82+
- Either by manually preparing the new binary
83+
- Or by using the auto-download functionality (this is not yet recommended)
84+
85+
If you prefer to use Cosmovisor to upgrade, some preparation work is needed before upgrade.
86+
87+
### Method I: Manual Upgrade
88+
89+
Make sure **Gaia v15.2.0** is installed by either downloading a [compatible binary](https://github.com/cosmos/gaia/releases/tag/v15.2.0), or building from source. Check the required version to build this binary in the `Makefile`.
90+
91+
Run Gaia v15.2.0 till upgrade height, the node will panic:
92+
93+
```shell
94+
ERR UPGRADE "v16" NEEDED at height: <UPGRADE_HEIGHT>: upgrade to v16 and applying upgrade "v16" at height:<UPGRADE_HEIGHT>
95+
```
96+
97+
Stop the node, and switch the binary to **Gaia v16.0.0** and re-start by `gaiad start`.
98+
99+
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.
100+
101+
### Method II: Upgrade using Cosmovisor
102+
103+
#### Manually preparing the binary
104+
105+
##### Preparation
106+
107+
- Install the latest version of Cosmovisor (`1.5.0`):
108+
109+
```shell
110+
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest
111+
cosmovisor version
112+
# cosmovisor version: v1.5.0
113+
```
114+
115+
- Create a `cosmovisor` folder inside `$GAIA_HOME` and move Gaia `v15.2.0` into `$GAIA_HOME/cosmovisor/genesis/bin`:
116+
117+
```shell
118+
mkdir -p $GAIA_HOME/cosmovisor/genesis/bin
119+
cp $(which gaiad) $GAIA_HOME/cosmovisor/genesis/bin
120+
```
121+
122+
- Build Gaia `v16.0.0`, and move gaiad `v16.0.0` to `$GAIA_HOME/cosmovisor/upgrades/v16/bin`
123+
124+
```shell
125+
mkdir -p $GAIA_HOME/cosmovisor/upgrades/v16/bin
126+
cp $(which gaiad) $GAIA_HOME/cosmovisor/upgrades/v16/bin
127+
```
128+
129+
At this moment, you should have the following structure:
130+
131+
```shell
132+
.
133+
├── current -> genesis or upgrades/<name>
134+
├── genesis
135+
│ └── bin
136+
│ └── gaiad # old: v15.2.0
137+
└── upgrades
138+
└── v16
139+
└── bin
140+
└── gaiad # new: v16.0.0
141+
```
142+
143+
- Export the environmental variables:
144+
145+
```shell
146+
export DAEMON_NAME=gaiad
147+
# please change to your own gaia home dir
148+
# please note `DAEMON_HOME` has to be absolute path
149+
export DAEMON_HOME=$GAIA_HOME
150+
export DAEMON_RESTART_AFTER_UPGRADE=true
151+
```
152+
153+
- Start the node:
154+
155+
```shell
156+
cosmovisor run start --x-crisis-skip-assert-invariants --home $DAEMON_HOME
157+
```
158+
159+
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.
160+
161+
##### Expected upgrade result
162+
163+
When the upgrade block height is reached, Gaia will panic and stop:
164+
165+
This may take a few minutes.
166+
After upgrade, the chain will continue to produce blocks when validators with a total sum voting power > 2/3 complete their node upgrades.
167+
168+
#### Auto-Downloading the Gaia binary
169+
170+
## Upgrade duration
171+
172+
The upgrade may take a few minutes 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.
173+
174+
## Rollback plan
175+
176+
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.
177+
178+
Steps to skip this upgrade proposal are simply to resume the cosmoshub-4 network with the (downgraded) v15.2.0 binary using the following command:
179+
180+
```shell
181+
gaiad start --unsafe-skip-upgrade <UPGRADE_HEIGHT>
182+
```
183+
184+
Note: There is no particular need to restore a state snapshot prior to the upgrade height, unless specifically directed by core Cosmos teams.
185+
186+
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.
187+
188+
## Communications
189+
190+
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.
191+
192+
## Risks
193+
194+
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.
195+
196+
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.
197+
198+
## Reference
199+
200+
[Join Cosmos Hub Mainnet](https://github.com/cosmos/mainnet)

docs/docs/modules/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ links for each one.
88

99
## Module List
1010

11-
- [Global Fee](./globalfee.md) introduced in [v8 Rho](../migration/cosmoshub-4-v8-Rho-upgrade.md)
11+
- [Global Fee](./globalfee.md)
12+
- [Metaprotocols](./metaprotocols.md)

docs/docs/modules/globalfee.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Gaia Fee and Fees Checks
3-
order: 2
2+
title: Globalfee
3+
order: 1
44
---
55

66
## Fee Parameters

0 commit comments

Comments
 (0)