Skip to content

vitwit/cosmos-utils

This branch is 223 commits ahead of anilcse/cosmos-utils:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

04f5c7c · Nov 29, 2024
Jul 16, 2022
Sep 13, 2022
Aug 24, 2022
Nov 29, 2024
Nov 2, 2022
Sep 15, 2022
Oct 12, 2023
Aug 22, 2022
Aug 17, 2021
Nov 12, 2021
Mar 30, 2022
Sep 8, 2021
Oct 15, 2022
Mar 30, 2022

Repository files navigation

cosmos-utils

This repo contains multiple utility scripts to use/test cosmos based applications.

Test an on-chain upgrade

Clone the repo

git clone https://github.com/vitwit/cosmos-utils.git

cd cosmos-utils

Set executable permissions

chmod +x ./scripts/testnet-setup-plan-upgrade.sh
chmod +x ./scripts/handle-upgrade.sh

Configure ENV variables

export GH_URL=github.com/regen-network/regen-ledger
export CHAIN_VERSION=v1.0.0
export UPGRADE_VERSION=v1.1.0-alpha0
export DENOM=uregen
export CHAINID=testnet
export NODE=http://localhost:26657
export DAEMON=regen
export DAEMON_HOME=~/.regen
export CLI=regen
export UPGRADE_BLOCK_HEIGHT=150
export UPGRADE_TITLE=v0.43.0-beta1-upgrade
export GOPATH=$HOME/go
export GOBIN=$GOPATH/bin

Start testnet and handle proposal:

./scripts/testnet-setup-plan-upgrade.sh

The script will start the testnet. It creates a software-upgrade proposal, sends deposit and votes for it.

Just wait for the chain to hit upgrade height and chain will halt there.

You can check sudo service $DAEMON status for the current height or query the chain consensus_state using curl http://localhost:26657/consensus_state

Handle upgrade

Ensure you execute this script only after hitting the upgrade height (i.e., 80 as mentioned in the testnet setup script)

Check the $DAEMON status to confirm if the chain is waiting for the upgrade. sudo service $DAEMON status

You should see a message like: UPGRADE "<upgrade-name-here>" NEEDED at height: 150: module=main

./scripts/handle-upgrade.sh

Check the $DAEMON status, it should start producing the blocks again. sudo service $DAEMON status

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 52.2%
  • Go 39.9%
  • Vue 5.2%
  • Python 1.6%
  • Other 1.1%