Cosmovisor
cosmovisor
is a lightweight process manager for Cosmos SDK application binaries that automates the upgrade process. It monitors the governance module for on-chain upgrade proposals and seamlessly handles binary upgrades by:
Downloading and preparing the new binary
Stopping the current binary
Switching to the upgraded binary
Restarting the node with the new binary
Why Use Cosmovisor?
For validators, cosmovisor
significantly reduces downtime during chain upgrades. Instead of manually handling upgrades, validators can pre-install new binaries, allowing cosmovisor
to execute upgrades automatically when a proposal passes.
Configuration
More details about cosmovisor
settings can be found in the official documentation.
Installation
1. Using Go Install
Install the latest version of cosmovisor
with:
2. Manual Build
Alternatively, build from source:
This builds cosmovisor
in the /cosmovisor
directory. To add it to your system’s PATH:
Verify the installation:
Directory Structure
Manual Software Upgrade Using Cosmovisor
This tutorial assumes you have set up a validator node using this guide.
Upgrade Process Overview
1. Foundation Team Publishes a New Release
Example: v0.50.8 Release
2. Foundation Team Submits a Software Upgrade Proposal
Example: Proposal #310
The most important detail is the block height at which the upgrade takes effect. In Proposal #310, the upgrade happens at block
53006170
.You can track this block height and estimate when the upgrade will occur.
3. Validator's Steps: Prepare the Upgrade Binary
Create the upgrade binary folder:
Build the new binary:
Copy the binary to the upgrade folder:
Verify the new binary version:
If both commands return v0.50.8
, the setup is correct, and you are now ready for the upgrade.
4. Automatic Upgrade at the Specified Block Height
Once the network reaches block 53006170
, cosmovisor
will automatically:
Stop the current binary
Switch to the new binary (
upgrades/v0.50.8/bin
)Restart the node
When 2/3 of validators approve the next block (53006170
), the upgrade is considered successful.
Final Thoughts
With cosmovisor
, software upgrades are seamless and reduce validator downtime. Make sure to follow this guide for every upgrade and ensure your node is prepared in advance.
🚀 Happy Validating!
Last updated
Was this helpful?