Skip to content

Commit 713611e

Browse files
authored
Add V31 docs (#9567)
* Add V31 docs * Add Checksums * Add upgrade details
1 parent 9b6aafb commit 713611e

File tree

2 files changed

+122
-0
lines changed

2 files changed

+122
-0
lines changed
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Mainnet Upgrade Guide: From Version v30 to v31
2+
3+
## Overview
4+
5+
- **v31 Proposal**: [Proposal Page](https://www.mintscan.io/osmosis/proposals/990)
6+
- **v31 Upgrade Block Height**: 47626000
7+
- **v31 Upgrade Countdown**: [Block Countdown](https://www.mintscan.io/osmosis/blocks/47626000)
8+
9+
## Hardware Requirements
10+
11+
### Memory Specifications
12+
13+
Although this upgrade is not expected to be resource-intensive, a minimum of 64GB of RAM is advised. If you cannot meet this requirement, setting up a swap space is recommended.
14+
15+
#### Configuring Swap Space
16+
17+
_Execute these commands to set up a 32GB swap space_:
18+
19+
```sh
20+
sudo swapoff -a
21+
sudo fallocate -l 32G /swapfile
22+
sudo chmod 600 /swapfile
23+
sudo mkswap /swapfile
24+
sudo swapon /swapfile
25+
```
26+
27+
_To ensure the swap space persists after reboot_:
28+
29+
```sh
30+
sudo cp /etc/fstab /etc/fstab.bak
31+
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
32+
```
33+
34+
For an in-depth guide on swap configuration, please refer to [this tutorial](https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-20-04).
35+
36+
---
37+
38+
## Cosmovisor Configuration
39+
40+
### Initial Setup (For First-Time Users)
41+
42+
If you have not previously configured Cosmovisor, follow this section; otherwise, proceed to the next section.
43+
44+
Cosmovisor is strongly recommended for validators to minimize downtime during upgrades. It automates the binary replacement process according to on-chain `SoftwareUpgrade` proposals.
45+
46+
Documentation for Cosmovisor can be found [here](https://docs.cosmos.network/main/tooling/cosmovisor).
47+
48+
#### Installation Steps
49+
50+
_Run these commands to install and configure Cosmovisor_:
51+
52+
```sh
53+
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@v1.0.0
54+
mkdir -p ~/.osmosisd
55+
mkdir -p ~/.osmosisd/cosmovisor
56+
mkdir -p ~/.osmosisd/cosmovisor/genesis
57+
mkdir -p ~/.osmosisd/cosmovisor/genesis/bin
58+
mkdir -p ~/.osmosisd/cosmovisor/upgrades
59+
cp $GOPATH/bin/osmosisd ~/.osmosisd/cosmovisor/genesis/bin
60+
mkdir -p ~/.osmosisd/cosmovisor/upgrades/v31/bin
61+
cp $GOPATH/bin/osmosisd ~/.osmosisd/cosmovisor/upgrades/v31/bin
62+
```
63+
64+
_Add these lines to your profile to set up environment variables_:
65+
66+
```sh
67+
echo "# Cosmovisor Setup" >> ~/.profile
68+
echo "export DAEMON_NAME=osmosisd" >> ~/.profile
69+
echo "export DAEMON_HOME=$HOME/.osmosisd" >> ~/.profile
70+
echo "export DAEMON_ALLOW_DOWNLOAD_BINARIES=false" >> ~/.profile
71+
echo "export DAEMON_LOG_BUFFER_SIZE=512" >> ~/.profile
72+
echo "export DAEMON_RESTART_AFTER_UPGRADE=true" >> ~/.profile
73+
echo "export UNSAFE_SKIP_BACKUP=true" >> ~/.profile
74+
source ~/.profile
75+
```
76+
77+
### Upgrading to v31
78+
79+
_To prepare for the upgrade, execute these commands_:
80+
81+
```sh
82+
mkdir -p ~/.osmosisd/cosmovisor/upgrades/v31/bin
83+
cd $HOME/osmosis
84+
git pull
85+
git checkout v31.0.0
86+
make build
87+
cp build/osmosisd ~/.osmosisd/cosmovisor/upgrades/v31/bin
88+
```
89+
90+
At the designated block height, Cosmovisor will automatically upgrade to version v31.
91+
92+
---
93+
94+
## Manual Upgrade Procedure
95+
96+
Follow these steps if you opt for a manual upgrade:
97+
98+
1. Monitor Osmosis until it reaches the specified upgrade block height: 47626000.
99+
2. Observe for a panic message followed by continuous peer logs, then halt the daemon.
100+
3. Perform these steps:
101+
102+
```sh
103+
cd $HOME/osmosis
104+
git pull
105+
git checkout v31.0.0
106+
make install
107+
```
108+
109+
4. Restart the Osmosis daemon and observe the upgrade.
110+
111+
---
112+
113+
## Additional Resources
114+
115+
- Osmosis Documentation: [Website](https://docs.osmosis.zone)
116+
- Community Support: [Discord](https://discord.com/invite/osmosis)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"binaries": {
3+
"linux/amd64": "https://github.com/osmosis-labs/osmosis/releases/download/v31.0.0/osmosisd-31.0.0-linux-amd64?checksum=d435408b845e79a2594594a315d9d22797fdbb7871a5936df68f51f0df557957",
4+
"linux/arm64": "https://github.com/osmosis-labs/osmosis/releases/download/v31.0.0/osmosisd-31.0.0-linux-arm64?checksum=b5c44e74c4dc484f8492d10a24fcd3f75a43dccaa40ab083662741beeeaa20cc"
5+
}
6+
}

0 commit comments

Comments
 (0)