Cosmovisor Sync
Cosmovisor is a binary manager that can perform upgrades automatically.
Prerequisites:
A Tellor node machine configured like this is not required, but different setups may require different commands from the ones shown below.
Build and configure Cosmovisor
Clone the cosmos repo somewhere on your node machine and change directory to
cosmos-sdk
git clone https://github.com/cosmos/cosmos-sdk && cd cosmos-sdk/tools/cosmovisorBuild cosmovisor:
go build ./cmd/cosmovisorAdd the following to the end of your
~/.bashrcor~/.zshrcfile:
# cosmovisor
export DAEMON_NAME=layerd
export DAEMON_HOME=$HOME/.layer
export DAEMON_RESTART_AFTER_UPGRADE=true
export DAEMON_ALLOW_DOWNLOAD_BINARIES=false
export DAEMON_POLL_INTERVAL=300ms
export UNSAFE_SKIP_BACKUP=true
export DAEMON_PREUPGRADE_MAX_RETRIES=0Use source ~/.bashrc or source ~/.zshrc to load the variables.
Initialize cosmovisor and add all the of the upgrades that you downloaded during node setup. Change the file paths in the command to match the correct folder path to each binary:
# set up cosmovisor. Each command is done seperatly.
./cosmovisor init ~/layer/binaries/v4.0.3/layerd
./cosmovisor add-upgrade v5.0.0 ~/layer/binaries/v5.0.0/layerd
./cosmovisor add-upgrade v5.1.0 ~/layer/binaries/v5.1.0/layerd
./cosmovisor add-upgrade v5.1.1 ~/layer/binaries/v5.1.1/layerd
./cosmovisor add-upgrade v5.1.2 ~/layer/binaries/v5.1.2/layerdTo start your node with cosmovisor managing upgrades:
./cosmovisor run start --home ~/.layer --keyring-backend test --key-name YOUR_ACCOUNT_NAME --api.enable --api.swaggerMake sure to do add-upgrade in advance of future Tellor upgrades to make use of cosmovisor's upgrade automation!
Last updated

