Cosmovisor

Cosmovisor

Please refer to the Cosmovisor documentation for further information. https://docs.cosmos.network/main/build/tooling/cosmovisor

cosmovisor is a process manager for Cosmos SDK application binaries that automates application binary switch at chain upgrades. It polls the upgrade-info.json file that is created by the x/upgrade module at upgrade height, and then can automatically download the new binary, stop the current binary, switch from the old binary to the new one, and finally restart the node with the new binary.

‼️

If you have been running without using Cosmovisor for a while and are now preparing to use Cosmovisor, please note that you need to check if upgrade-info.json file exists under WORKSPACE/data/ Please remove it during the initial run Cosmovisor.

To Install the latest version.

go  install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest

Setup

cd $WORKSPACE
mkdir -p cosmovisor/genesis/bin
mkdir -p cosmovisor/upgrades

cp bbcored cosmovisor/genesis/bin/  # copy current version of bbcored

Systemd update -> /etc/systemd/system/bouncebit.service

[Unit]
Description=Bouncebit Mainnet
After=network-online.target
[Service]
Type=simple
User=bouncebit 
ExecStart=cosmovisor run start --log_level info --home <WORKSPACE> --chain-id bouncebit_6001-1 --moniker <YOUR_NODE_NAME>
KillMode=process
Restart=on-failure
RestartSec=3
Environment="DAEMON_HOME=<WORKSPACE>" # replace!
Environment="DAEMON_NAME=bbcored"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="UNSAFE_SKIP_BACKUP=true"
[Install]
WantedBy=multi-user.target

When requested to upgrade to the new version.

<aside> ‼️ Please ensure to use StateSync or Archive Snapshot to synchronize the mainnet node.

</aside>

StateSync

With state sync, your node will download and verify data only related to the head or near the head of the chain.

Fetch the latest block height.

Fetch the trust hash of the latest block height.

Enable state-sync, add RPC servers

config.toml

app.toml

Archive Snapshot (pruning nothing)

✅ bouncebit_archive_snapshot_2024_12_06.lz4

Last updated