-
Notifications
You must be signed in to change notification settings - Fork 618
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
(cherry picked from commit 2b42759) Co-authored-by: Niccolo Raspa <[email protected]>
- Loading branch information
1 parent
b209c00
commit 5d17333
Showing
2 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
# Mainnet Upgrade Guide: From Version v26 to v27 | ||
|
||
## Overview | ||
|
||
- **v27 Proposal**: [Proposal Page](https://www.mintscan.io/osmosis/proposals/T.B.D) | ||
- **v27 Upgrade Block Height**: 24250100 | ||
- **v27 Upgrade Countdown**: [Block Countdown](https://www.mintscan.io/osmosis/blocks/24250100) | ||
|
||
## Hardware Requirements | ||
|
||
### Memory Specifications | ||
|
||
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. | ||
|
||
#### Configuring Swap Space | ||
|
||
*Execute these commands to set up a 32GB swap space*: | ||
|
||
```sh | ||
sudo swapoff -a | ||
sudo fallocate -l 32G /swapfile | ||
sudo chmod 600 /swapfile | ||
sudo mkswap /swapfile | ||
sudo swapon /swapfile | ||
``` | ||
|
||
*To ensure the swap space persists after reboot*: | ||
|
||
```sh | ||
sudo cp /etc/fstab /etc/fstab.bak | ||
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab | ||
``` | ||
|
||
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). | ||
|
||
--- | ||
|
||
## Cosmovisor Configuration | ||
|
||
### Initial Setup (For First-Time Users) | ||
|
||
If you have not previously configured Cosmovisor, follow this section; otherwise, proceed to the next section. | ||
|
||
Cosmovisor is strongly recommended for validators to minimize downtime during upgrades. It automates the binary replacement process according to on-chain `SoftwareUpgrade` proposals. | ||
|
||
Documentation for Cosmovisor can be found [here](https://docs.cosmos.network/main/tooling/cosmovisor). | ||
|
||
#### Installation Steps | ||
|
||
*Run these commands to install and configure Cosmovisor*: | ||
|
||
```sh | ||
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/[email protected] | ||
mkdir -p ~/.osmosisd | ||
mkdir -p ~/.osmosisd/cosmovisor | ||
mkdir -p ~/.osmosisd/cosmovisor/genesis | ||
mkdir -p ~/.osmosisd/cosmovisor/genesis/bin | ||
mkdir -p ~/.osmosisd/cosmovisor/upgrades | ||
cp $GOPATH/bin/osmosisd ~/.osmosisd/cosmovisor/genesis/bin | ||
mkdir -p ~/.osmosisd/cosmovisor/upgrades/v26/bin | ||
cp $GOPATH/bin/osmosisd ~/.osmosisd/cosmovisor/upgrades/v26/bin | ||
``` | ||
|
||
*Add these lines to your profile to set up environment variables*: | ||
|
||
```sh | ||
echo "# Cosmovisor Setup" >> ~/.profile | ||
echo "export DAEMON_NAME=osmosisd" >> ~/.profile | ||
echo "export DAEMON_HOME=$HOME/.osmosisd" >> ~/.profile | ||
echo "export DAEMON_ALLOW_DOWNLOAD_BINARIES=false" >> ~/.profile | ||
echo "export DAEMON_LOG_BUFFER_SIZE=512" >> ~/.profile | ||
echo "export DAEMON_RESTART_AFTER_UPGRADE=true" >> ~/.profile | ||
echo "export UNSAFE_SKIP_BACKUP=true" >> ~/.profile | ||
source ~/.profile | ||
``` | ||
|
||
### Upgrading to v27 | ||
|
||
*To prepare for the upgrade, execute these commands*: | ||
|
||
```sh | ||
mkdir -p ~/.osmosisd/cosmovisor/upgrades/v27/bin | ||
cd $HOME/osmosis | ||
git pull | ||
git checkout v27.0.0 | ||
make build | ||
cp build/osmosisd ~/.osmosisd/cosmovisor/upgrades/v27/bin | ||
``` | ||
|
||
At the designated block height, Cosmovisor will automatically upgrade to version v27. | ||
|
||
--- | ||
|
||
## Manual Upgrade Procedure | ||
|
||
Follow these steps if you opt for a manual upgrade: | ||
|
||
1. Monitor Osmosis until it reaches the specified upgrade block height: 24250100. | ||
2. Observe for a panic message followed by continuous peer logs, then halt the daemon. | ||
3. Perform these steps: | ||
|
||
```sh | ||
cd $HOME/osmosis | ||
git pull | ||
git checkout v27.0.0 | ||
make install | ||
``` | ||
|
||
4. Restart the Osmosis daemon and observe the upgrade. | ||
|
||
--- | ||
|
||
## Additional Resources | ||
|
||
- Osmosis Documentation: [Website](https://docs.osmosis.zone) | ||
- Community Support: [Discord](https://discord.gg/pAxjcFnAFH) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"binaries": { | ||
"linux/amd64": "https://github.com/osmosis-labs/osmosis/releases/download/v27.0.0/osmosisd-27.0.0-linux-amd64?checksum=sha256:fd9884a1a48192c440cd0c780f71e06af1bdf2dac73b92614e20d1baeb119e83", | ||
"linux/arm64": "https://github.com/osmosis-labs/osmosis/releases/download/v27.0.0/osmosisd-27.0.0-linux-arm64?checksum=sha256:0b73570fba0445536de3b7bb8dc209653dd726f925b39575be506bb6cee1f680" | ||
} | ||
} |