8000 docs: cosmovisor v2 upgrade preparation docs by khoslaventures · Pull Request #358 · evmos/evmos · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

docs: cosmovisor v2 upgrade preparation docs #358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 45 additions & 13 deletions docs/guides/upgrades/upgrade_node.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
order: 1
-->

# Upgrade Node
# Handling Upgrades

Learn how to upgrade your full node to the latest software version {synopsis}
Learn how to upgrade your full nodes and validator nodes to the latest software version {synopsis}

With every new software release, we strongly recommend validators to perform a software upgrade, in order to prevent [double signing or halting the chain during consensus](https://docs.tendermint.com/master/spec/consensus/signing.html#double-signing).

You can upgrade your node by 1) upgrading your software version and 2) upgrading your node to that version. In this guide, you can find out how to automatically upgrade your node with Cosmovisor or perform the update manually.

## Software Upgrade
## Updating the `evmosd` binary

These instructions are for full nodes that have ran on previous versions of and would like to upgrade to the latest testnet.

Expand Down Expand Up @@ -44,7 +44,7 @@ go: go version go1.17 darwin/amd64

If the software version does not match, then please check your $PATH to ensure the correct evmosd is running.

## Upgrade Node
## Upgrading your Validator

We highly recommend validators use Cosmovisor to run their nodes. This will make low-downtime upgrades smoother, as validators don't have to manually upgrade binaries during the upgrade. Instead users can preinstall new binaries, and cosmovisor will automatically update them based on on-chain Software Upgrade proposals.

Expand All @@ -70,33 +70,37 @@ Set up the Cosmovisor environment variables. We recommend setting these in your
echo "# Setup Cosmovisor" >> ~/.profile
echo "export DAEMON_NAME=evmosd" >> ~/.profile
echo "export DAEMON_HOME=$HOME/.evmosd" >> ~/.profile
echo 'export PATH="$DAEMON_HOME/cosmovisor/current/bin:$PATH"' >> ~/.profile
source ~/.profile
```


After this, you must make the necessary folders for cosmosvisor in your daemon home directory (~/.evmosd).
After this, you must make the necessary folders for cosmosvisor in your daemon home directory (~/.evmosd) and copy over the current binary.

```bash
mkdir -p ~/.evmosd/cosmovisor/upgrades
mkdir -p ~/.evmosd/cosmovisor
mkdir -p ~/.evmosd/cosmovisor/genesis
mkdir -p ~/.evmosd/cosmovisor/genesis/bin
cp $(which evmosd) ~/.evmosd/cosmovisor/genesis/bin/
mkdir -p ~/.evmosd/cosmovisor/upgrades

cp $GOPATH/bin/evmosd ~/.evmosd/cosmovisor/genesis/bin
```

# Verify the setup
# It should return the same version as evmosd
To check that you did this correctly, ensure your versions of cosmovisor and evmosd are the same:
```
cosmovisor version
evmosd version
```

#### Preparing an Upgrade
#### Generally Preparing an Upgrade

Cosmovisor will continually poll the `$DAEMON_HOME/data/upgrade-info.json` for new upgrade instructions. When an upgrade is ready, node operators can download the new binary and place it under `$DAEMON_HOME/cosmovisor/upgrades/<name>/bin` where `<name>` is the URI-encoded name of the upgrade as specified in the upgrade module plan.

It is possible to have Cosmovisor automatically download the new binary. To do this set the following environment variable.

```bash
export DAEMON_ALLOW_DOWNLOAD_BINARIES=true
echo "export DAEMON_ALLOW_DOWNLOAD_BINARIES=true" >> ~/.profile
```


#### Download Genesis File

You can now download the "genesis" file for the chain. It is pre-filled with the entire genesis state and gentxs.
Expand Down Expand Up @@ -197,6 +201,34 @@ You can check the status with:
systemctl status evmosd
```

#### Update Cosmosvisor to V2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should probably make it clear somewhere that people should be on v1.1.2 prior to this upgrade, or it won't work


If you're not yet on the latest V1 release (`v1.1.2`) please upgrade your current version first:
```bash
cd $HOME/evmos
git pull
git checkout v1.1.2
make build
systemctl stop evmosd.service
cp build/evmosd ~/.evmosd/cosmovisor/genesis/bin
systemctl start evmosd.service
cd $HOME
```


If you are on the latest V1 release (`v1.1.2`) and you want evmosd to upgrade automatically from V1 to V2, do the following steps prior to the upgrade height:
```bash
mkdir -p ~/.evmosd/cosmovisor/upgrades/v2/bin
cd $HOME/evmos
git pull
git checkout v2.0.0
make build
systemctl stop evmosd.service
cp build/evmosd ~/.evmosd/cosmovisor/upgrades/v2/bin
systemctl start evmosd.service
cd $HOME
```

### Upgrade Manually

#### Upgrade Genesis File
Expand Down
0