Skip to content

Using Cosmovisor to stage Rubin Chain binary upgrade

Prerequisite

  1. Linux (Ubuntu Server 22.04.3 recommended)
  2. 8-cpu (ARM or x86_64), 64 GB RAM, 500 GB SSD NVME Storage
  3. Already installed Rubin Chain full node

Preparation

  1. Install Go from https://go.dev/doc/install (protocol/go.mod requires go >= 1.25.9)
  2. Install Cosmovisor, with the following command:
  • go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0
  1. Copy cosmovisor from $HOME/go/bin/ to a directory in your $PATH
  2. Add two environment variables to $HOME/.profile. The data directory is $HOME/.ritbit by default
  • export DAEMON_NAME=ritbitd
  • export DAEMON_HOME=<your data directory>
  1. Log out and log back in.
  2. Initialize Cosmovisor with the following command. The path to executable is the the full path to ritbitd
  • cosmovisor init <path to executable>
  1. Cosmovisor is now ready for use.

Running ritbitd under Cosmovisor

You have to change the way you currently run ritbitd to run under Cosmovisor. This is done simply by specifying “cosmovisor run” in place of the “ritbitd” command you used previously. Therefore, if you previously used “ritbitd start --p2p.seeds="ade4d8…”, you would change that to “cosmovisor run start --p2p.seeds="ade4d8…”

Staging upgrade

  1. The Cosmovisor directory structure looks like this:

Upgrade1

  1. To stage an upgrade, you would create a name directory inside the upgrades/ directory. The directory name must match the upgrade name in the governance plan. For example, if the network runs v27.4 and the next upgrade is v27.5, you would create a directory called “v27.5” and then a bin directory inside it.

Upgrade2

  1. Now, download the upgraded binary and put it inside the bin directory created previously. It must be named ritbitd

  2. Restart ritbitd with Cosmovisor. Now, Cosmovisor will automatically halt the current binary at the block activation height and start the upgrade binary.