Skip to content

Commit

Permalink
docs: Updates for Gaia v14 (aka v14.1.0) (#2839)
Browse files Browse the repository at this point in the history
* Updates for Gaia v14 (aka v14.1.0)

* Some minor updates
  • Loading branch information
mmulji-ic authored Dec 8, 2023
1 parent 579b8b1 commit 39e059f
Show file tree
Hide file tree
Showing 7 changed files with 285 additions and 114 deletions.
2 changes: 1 addition & 1 deletion docs/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 v13.0.0 https://github.com/cosmos/gaia --depth=1
git clone -b v14.1.0 https://github.com/cosmos/gaia --depth=1
cd gaiad
make install
gaiad init CUSTOM_MONIKER --chain-id cosmoshub-4
Expand Down
14 changes: 14 additions & 0 deletions docs/getting-started/system-requirements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# System requirements

The Gaia application typically needs at least 32GB RAM for smooth operation.

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
# Linux instructions
sudo fallocate -l 16G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
```
6 changes: 3 additions & 3 deletions docs/hub-overview/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ title: Introduction
---

::: warning
### **v13 Upgrade**
Cosmos Hub will be upgraded to [v13](https://github.com/cosmos/gaia/releases/tag/v13.0.0) at block height: **[17,380,000](https://www.mintscan.io/cosmos/blocks/17380000)**
### **v14 Upgrade**
Cosmos Hub will be upgraded to [v14.1](https://github.com/cosmos/gaia/releases/tag/v14.1.0) at block height: **[18,262,000](https://www.mintscan.io/cosmos/blocks/18262000)**

To upgrade from v12 check the [**upgrade guide**](../migration/cosmoshub-4-v13-upgrade.md)
To upgrade from v13 check the [**upgrade guide**](../migration/cosmoshub-4-v14-upgrade.md)
:::

![Welcome to the Cosmos Hub](../images/cosmos-hub-image.jpg)
Expand Down
27 changes: 15 additions & 12 deletions docs/hub-tutorials/join-mainnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ title: Joining Mainnet

# Join the Cosmos Hub Mainnet


The current Cosmos Hub mainnet, `cosmoshub-4`, has been performing in place store migration upgrades as of the [Delta Upgrade](https://github.com/cosmos/gaia/blob/main/docs/migration/cosmoshub-4-delta-upgrade.md) July 2021.
The most recent upgrade was [Gaia v10](https://github.com/cosmos/gaia/blob/main/docs/migration/cosmoshub-4-v10-upgrade.md) June 2023.
The current Cosmos Hub mainnet, `cosmoshub-4`, has been performing in place store migration upgrades as of the [Delta Upgrade](https://github.com/cosmos/gaia/blob/main/docs/migration/cosmoshub-4-delta-upgrade.md) July 2021. The most recent upgrade is [Gaia v14.1.x](https://github.com/cosmos/gaia/blob/main/docs/migration/cosmoshub-4-v14-upgrade.md) Dec 2023.
This type of upgrade preserves the same chain-id but state before the upgrade height is only accessible by corresponding versions of the binary:

## Release History

- use `gaia v5.0.x` (Delta) for queries of state between height `6,910,000` and `8,695,000`
- use `gaia v6.0.x` (Vega) between `8,695,000` and `10,085,397`
- use `gaia v7.0.x` (Theta) between `10,085,397` and `14,099,412`
Expand All @@ -18,8 +19,9 @@ This type of upgrade preserves the same chain-id but state before the upgrade he
- use `gaia v10.0.x` between `15,816,200` and `16,596,000`
- use `gaia v11.x` between `16,596,000` and `16,985,500`
- use `gaia v12.x` between `16,985,500` and `17,380,000`
- use `gaia v13.x` from `17,380,000`

- use `gaia v13.x` between `17,380,000` and `18,262,000`
- use `gaia v14.1.x` from `18,262,000`

For more details, see the [history of upgrades](https://github.com/cosmos/gaia/tree/main/docs/roadmap) or visit the [migration section](https://github.com/cosmos/gaia/tree/main/docs/migration) of the Hub's docs.

**This guide includes full instructions for joining the mainnet either as an archive/full node or a pruned node.**
Expand All @@ -31,6 +33,7 @@ For instructions to join as a validator, please also see the [Validator Guide](h
### Overview
<!-- DON'T FORGET TO KEEP INDEX UP TO DATE -->
- [Join the Cosmos Hub Mainnet](#join-the-cosmos-hub-mainnet)
- [Release History](#release-history)
- [Overview](#overview)
- [Background](#background)
- [Explorers](#explorers)
Expand Down Expand Up @@ -205,7 +208,7 @@ Passing a flag when starting `gaia` will always override settings in the `app.to
By default, the REST API is disabled. To enable the REST API, edit the `~/.gaia/config/app.toml` file, and set `enable` to `true` in the `[api]` section.

```
```toml
###############################################################################
### API Configuration ###
###############################################################################
Expand All @@ -227,7 +230,7 @@ After restarting the application, access the REST API on `<NODE IP>:1317`.
By default, gRPC is enabled on port `9090`. The `~/.gaia/config/app.toml` file is where changes can be made in the gRPC section. To disable the gRPC endpoint, set `enable` to `false`. To change the port, use the `address` parameter.

```
```toml
###############################################################################
### gRPC Configuration ###
###############################################################################
Expand Down Expand Up @@ -302,7 +305,7 @@ With the block height and hash selected, update the configuration in `~/.gaia/co

> **Note**: In the future, the RPC server requirement will be deprecated as state sync is [moved to the p2p layer in Tendermint 0.38](https://github.com/tendermint/tendermint/issues/6491).
```
```toml
#######################################################
### State Sync Configuration Options ###
#######################################################
Expand Down Expand Up @@ -365,7 +368,7 @@ While not advised, if a node operator needs to customize this feature, it can be
In `app.toml`

```
```toml
###############################################################################
### State Sync Configuration ###
###############################################################################
Expand All @@ -386,10 +389,9 @@ snapshot-keep-recent = 10

**See all [Gaia Releases](https://github.com/cosmos/gaia/releases)**

The most up to date release of Gaia is [`V9.1.1`](https://github.com/cosmos/gaia/releases/tag/v9.1.1). For those that want to use state sync or quicksync to get their node up to speed, starting with the most recent version of Gaia is sufficient.

The most up to date release of Gaia is above. For those that want to use state sync or quicksync to get their node up to speed, starting with the most recent version of Gaia is sufficient.

To sync an archive or full node from scratch, it is important to note that you must start with [`V4.2.1`](https://github.com/cosmos/gaia/releases/tag/v4.2.1) and proceed through two different upgrades Delta at block height `6,910,000`, Vega at block height `8,695,000`, Theta at block height `10,085,397`, Rho at block height `14099412` and Lambda at block height `14,470,501`.
To sync an archive or full node from scratch, it is important to note that you must start with [`V4.2.1`](https://github.com/cosmos/gaia/releases/tag/v4.2.1) and proceed through two different upgrades Delta at block height `6,910,000`, Vega at block height `8,695,000`, Theta at block height `10,085,397`, Rho at block height `14099412` and Lambda at block height `14,470,501` and so on.

The process is summarized below but make sure to follow the manual upgrade instructions for each release:

Expand Down Expand Up @@ -454,6 +456,7 @@ Again, make sure to backup `~/.gaia`

Install Gaia [`V9.0.0`](https://github.com/cosmos/gaia/releases/tag/v9.0.0) and restart the daemon.

Repeat the process for newer versions of the Gaia application at the [stated block heights above](#release-history).

## Cosmovisor

Expand Down
49 changes: 30 additions & 19 deletions docs/hub-tutorials/join-testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: Joining Testnet

This tutorial will provide all necessary instructions for joining the current public testnet. If you're interested in more advanced configuration and synchronization options, see [Join Mainnet](./join-mainnet.md) for a detailed walkthrough.

* Current Version: v13
* Current Version: v14
* Chain ID: `theta-testnet-001`

## Background
Expand Down Expand Up @@ -59,12 +59,14 @@ State Sync is far faster and more efficient than Fast Sync, but Fast Sync offers
## Step-by-Step Setup

The following set of instructions assumes you are logged in as root.

* You can run the relevant commands from a sudoer account.
* The `/root/` part in service file paths can be changed to `/home/<username>/`.

### Build Tools

Install build tools and Go.

```shell
sudo apt-get update
sudo apt-get install -y make gcc
Expand All @@ -80,7 +82,8 @@ You will need to install and configure the Gaia binary using the script below. T
* For up-to-date endpoints like seeds and state sync RPC servers, visit the [testnets repository](https://github.com/cosmos/testnets/tree/master/public).

Build the gaiad binary and initialize the chain home folder.
```

```shell
cd $HOME
git clone https://github.com/cosmos/gaia
cd gaia
Expand All @@ -94,7 +97,8 @@ gaiad init <custom_moniker>
```

Prepare the genesis file.
```

```shell
cd $HOME
wget https://github.com/cosmos/testnets/raw/master/public/genesis.json.gz
gzip -d genesis.json.gz
Expand All @@ -113,8 +117,7 @@ State sync requires you to configure a trust height and trust hash. These depend
* Visit a [testnet explorer](https://explorer.theta-testnet.polypore.xyz/) to find the block and hash for the current height - 1000.
* Set these parameters in the code snippet below: `<BLOCK_HEIGHT>` and `<BLOCK_HASH>`.


```
```shell
cd $HOME/.gaia/config
sed -i 's/enable = false/enable = true/' config.toml
sed -i 's/trust_height = 0/trust_height = <BLOCK_HEIGHT>/' config.toml
Expand All @@ -126,7 +129,7 @@ sed -i 's/rpc_servers = ""/rpc_servers = "http:\/\/state-sync-01.theta-testnet.p

### Cosmovisor Setup (Optional)

Cosmovisor is a process manager that monitors the governance module for incoming chain upgrade proposals. When a proposal is approved, Cosmovisor can automatically download the new binary, stop the chain binary when it hits the upgrade height, switch to the new binary, and restart the daemon. Cosmovisor can be used with either Fast Sync or State Sync.
Cosmovisor is a process manager that monitors the governance module for incoming chain upgrade proposals. When a proposal is approved, Cosmovisor can automatically download the new binary, stop the chain binary when it hits the upgrade height, switch to the new binary, and restart the daemon. Cosmovisor can be used with either Fast Sync or State Sync.

The instructions below provide a simple way to sync via Cosmovisor. For more information on configuration, check out the Cosmos SDK's [Cosmovisor documentation](https://github.com/cosmos/cosmos-sdk/tree/main/tools/cosmovisor).

Expand All @@ -140,8 +143,9 @@ Cosmovisor requires the creation of the following directory structure:
└── gaiad
```

Install Cosmovisor and copy Gaia binary to genesis folder
```
Install Cosmovisor and copy Gaia binary to genesis folder:

```shell
go install cosmossdk.io/tools/cosmovisor/cmd/[email protected]
mkdir -p ~/.gaia/cosmovisor/genesis/bin
cp ~/go/bin/gaiad ~/.gaia/cosmovisor/genesis/bin/
Expand All @@ -151,11 +155,11 @@ cp ~/go/bin/gaiad ~/.gaia/cosmovisor/genesis/bin/

* Cosmos Hub recommends running `gaiad` or `cosmovisor` with the `--x-crisis-skip-assert-invariants` flag. If checking for invariants, operators are likely to see `rounding error withdrawing rewards from validator`. These are expected. For more information see [Verify Mainnet](./join-mainnet.md#verify-mainnet).


Create one of the following service files.

If you are not using Cosmovisor: `/etc/systemd/system/gaiad.service`
```

```toml
[Unit]
Description=Gaia service
After=network-online.target
Expand All @@ -171,7 +175,8 @@ WantedBy=multi-user.target
```

If you are using Cosmovisor: `/etc/systemd/system/cosmovisor.service`
```

```toml
[Unit]
Description=Cosmovisor service
After=network-online.target
Expand All @@ -195,19 +200,22 @@ WantedBy=multi-user.target
### Start the Service

Reload the systemd manager configuration.
```

```shell
systemctl daemon-reload
systemctl restart systemd-journald
```

If you are not using Cosmovisor:
```

```shell
systemctl enable gaiad.service
systemctl start gaiad.service
```

If you are using Cosmovisor:
```

```shell
systemctl enable cosmovisor.service
systemctl start cosmovisor.service
```
Expand All @@ -228,10 +236,11 @@ Follow these instructions if you have a node that is already synced and wish to
When the chain reaches the upgrade block height specified by a software upgrade proposal, the chain binary will halt and expect the new binary to be run (the system log will show `ERR UPGRADE "<Upgrade name>" NEEDED at height: XXXX` or something similar).

There are three ways you can update the binary:

1. Without Cosmovisor: You must build or download the new binary ahead of the upgrade. When the chain binary halts at the upgrade height:
* Stop the gaiad service with `systemctl stop gaiad.service`.
* Build or download the new binary, replacing the existing `~/go/bin` one.
* Start the gaiad service with `systemctl start gaiad.service`.
* Stop the gaiad service with `systemctl stop gaiad.service`.
* Build or download the new binary, replacing the existing `~/go/bin` one.
* Start the gaiad service with `systemctl start gaiad.service`.
2. With Cosmovisor: You must build or download the new binary and copy it to the appropriate folder ahead of the upgrade.
3. With Cosmovisor: Using the auto-download feature, assuming the proposal includes the binaries for your system architecture.

Expand All @@ -253,12 +262,14 @@ If the environment variable `DAEMON_ALLOW_DOWNLOAD_BINARIES` is set to `false`,
```

Prepare the upgrade directory
```

```shell
mkdir -p ~/.gaia/cosmovisor/upgrades/v14/bin
```

Download and install the new binary version.
```

```shell
cd $HOME/gaia
git pull
git checkout v14.0.0-rc0
Expand Down
Loading

0 comments on commit 39e059f

Please sign in to comment.