Cronos POS Chain Docs
  • Getting Started
    • 📑Cronos POS Chain Introduction
    • 🔰Architecture
  • For USERS
    • 🌟New brand and domains
    • 💰Wallets
      • chain-maind
      • Ledger Hardware Wallets with chain-maind
      • Crypto.com DeFi Desktop Wallet
      • Conducting IBC Transfer with Keplr Wallet
      • Using Ledger Device with Keplr Wallet
      • Mainnet Address Generation
      • Mainnet Address Verification
      • Multisig Account
      • Delegation Guide
      • Key Principles for Wallet Security
    • 🛠️Token Migration Web Tool
    • 🚰Croeseid Testnet Faucet
  • For Node Hosts
    • ⛓️Running Nodes
      • Public Node Sync
      • Quicksync
      • Cronos POS Chain Mainnet: Running a Full Node
        • Upgrade Guide
          • The "V5" upgrade guide (v4.* to v5.0.1) :
          • The "V4" upgrade guide (v3.* to v4.2.2) :
          • The "DRACO II" upgrade guide (v2.* to v3.3.2) :
          • The "Canis Major" upgrade guide (v1.* to v2.0.1) at block height 922,363:
          • Running "Canis Major" network upgrade with cosmovisor
      • Cronos POS Chain Mainnet: Running a Validator
      • Cronos POS Chain Mainnet Validator Security Checklist
      • Croeseid Testnet: Running Nodes
      • Mainnet/Testnet: Running Nodes using AWS 1-click Deployment
      • Mainnet/Testnet: Running Nodes using Azure 1-click Deployment
      • Croeseid Testnet: Running Nodes With Nix
      • Devnet: Running Latest Development Node
    • 🔄Advanced TMKMS Integration
    • 💫Notes on Performance
    • 🔃Notes on Production Deployment
  • Block Explorers
    • 📊Cronos POS Chain Mainnet Explorer
    • 📊Croeseid Testnet Explorer
  • Cronos PoS Chain Protocol
    • ⛓️Chain Details
      • Genesis
      • Protocol Documentation
      • Chain ID, Address Format and Signatures
      • Create the IBC-enabled tokens on the Cronos POS Chain with Solo Machine
      • List of parameters
      • Proposal Process
      • Technical glossary
    • 🎛️Modules
      • module_supply
      • module_slashing
      • module_authz
      • module_bank
      • module_mint
      • module_gov
      • module_staking
      • module_distribution
      • module_nft
  • Cronos PoS Integration
    • 🔄Integration documentation
    • 🛂Node Setup and RPC node
    • 🔲Blocks and Transactions
Powered by GitBook
On this page
  • Step 0 - Install cosmosviosr
  • Step 1 - Set up Environment Variables
  • Step 1.1 - Create cosmovisor folder structure
  • Step 2. - Run everything
  1. For Node Hosts
  2. Running Nodes
  3. Cronos POS Chain Mainnet: Running a Full Node
  4. Upgrade Guide

Running "Canis Major" network upgrade with cosmovisor

PreviousThe "Canis Major" upgrade guide (v1.* to v2.0.1) at block height 922,363:NextCronos POS Chain Mainnet: Running a Validator

Last updated 4 months ago

Warning:

It is recommended that cosmovisor is better to be used on full nodes rather than validators as currently there's a potential race condition:

Step 0 - Install cosmosviosr

One can follow this to install.

Alternatively, run the below commands instead

$ git clone https://github.com/cosmos/cosmos-sdk.git
$ cd cosmos-sdk/cosmovisor
$ make cosmovisor

Step 1 - Set up Environment Variables

Set your for cosmovisor to run

export DAEMON_NAME=chain-maind
export DAEMON_HOME=/home/ubuntu/.chain-maind
export DAEMON_RESTART_AFTER_UPGRADE=true
export DAEMON_ALLOW_DOWNLOAD_BINARIES=true
export DAEMON_LOG_BUFFER_SIZE=512

Step 1.1 - Create cosmovisor folder structure

.chain-maind/
├── config
│ 
├── cosmovisor
│   ├── current -> genesis or upgrades/v3.3.0
│   ├── genesis
│   │   └── bin
│   │       └── chain-maind
│   └── upgrades
│       └── v3.3.0
│           └── bin
│               └── chain-maind
└── data

For .chain-maind/cosmovisor/genesis/bin/chain-maind, it is the binary before the upgrade proceeds. In our case of the "DRACO II" upgrade, it should be chain-maind with version 2.*. Kindly have this binary ready before running cosmovisor.

Step 2. - Run everything

  • Start cosmovisor, e.g.:

$ ./cosmovisor start

Since we enable DAEMON_ALLOW_DOWNLOAD_BINARIES=true, cosmovisor will automatically download binary with 3.3.1 in ./cosmovisor/upgrades/v2.0.0/bin/chain-maind and update ./cosmovisor/current directory symlink to upgrades/v3.3.0 instead when proposed upgrade log is found. cosmovisor will create ./cosmovisor/upgrades/v3.3.0/bin/chain-maind for you.

Tip: Example of running cosmovisor with systemd

# /lib/systemd/system/chain-maind.service
[Unit]
Description=Chain-maind
ConditionPathExists=/chain/bin/cosmovisor
After=network.target

[Service]
Type=simple
User=crypto
Group=crypto
LimitNOFILE=12288

Restart=always
RestartSec=10

Environment="DAEMON_NAME=chain-maind"
Environment="DAEMON_HOME=/chain/.chain-maind"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=true"
Environment="DAEMON_LOG_BUFFER_SIZE=512"

WorkingDirectory=/chain/bin
ExecStart=/chain/bin/cosmovisor start --home /chain/.chain-maind

# make sure log directory exists and owned by syslog
PermissionsStartOnly=true

StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=chain-maind

TimeoutStartSec=3min

[Install]
WantedBy=multi-user.target

One can follow this

Important: If one doesn't want to enable DAEMON_ALLOW_DOWNLOAD_BINARIES, one should prepare ./cosmovisor/upgrades/v3.3.0/bin/chain-maind manually before upgrade time. , and are also available.

⛓️
cosmos/cosmos-sdk#9384
link
Environment Variables
folder structure
Linux
Mac
Windows