---
# System prepended metadata

title: Local Testnet Upgrade Check

---

# Local Testnet Upgrade Check

## v6.0.4 -> theta prepare (commit f71a4be)

- Commit: https://github.com/cosmos/gaia/commit/f71a4be8b43c9891a36edbd365a5f3e8403da769
- Submitted proposal to upgrade @ block height `9034700`
- Used auto-download feature in cosmovisor
- Upgrade process failed: a binary was not specified in the proposal

### journalctl log
```
Mar 15 18:13:33 dante-local-theta-upgrade cosmovisor[15707]: 6:13PM INF finalizing commit of block hash=DF5212C9CC1F7C3E2CABF2FAF4ACF39B614B1CFD51024E70861CF99490AAE6AC height=9034699 module=consensus num_txs=0 root=F0399930B84B1850EF9D555F49231A9B68FA413A24FA26FEF972616812A6CDE6
Mar 15 18:13:33 dante-local-theta-upgrade cosmovisor[15707]: 6:13PM INF minted coins from module account amount=20424650uatom from=mint module=x/bank
Mar 15 18:13:33 dante-local-theta-upgrade cosmovisor[15707]: 6:13PM INF executed block height=9034699 module=state num_invalid_txs=0 num_valid_txs=0
Mar 15 18:13:33 dante-local-theta-upgrade cosmovisor[15707]: 6:13PM INF commit synced commit=436F6D6D697449447B5B313937203135362032303620323037203433203135312038352032343620313537203138322034342032343820313336203120333620353220323533203137322037332032312032303220363620323238203133312036372031393220313235203132302033322031313920313531203231335D3A3839444243427D
Mar 15 18:13:33 dante-local-theta-upgrade cosmovisor[15707]: 6:13PM INF committed state app_hash=C59CCECF2B9755F69DB62CF888012434FDAC4915CA42E48343C07D78207797D5 height=9034699 module=state num_txs=0
Mar 15 18:13:33 dante-local-theta-upgrade cosmovisor[15707]: 6:13PM INF indexed block height=9034699 module=txindex
Mar 15 18:13:38 dante-local-theta-upgrade cosmovisor[15707]: 6:13PM INF Timed out dur=4914.104913 height=9034700 module=consensus round=0 step=1
Mar 15 18:13:41 dante-local-theta-upgrade cosmovisor[15707]: 6:13PM INF Timed out dur=3000 height=9034700 module=consensus round=0 step=3
Mar 15 18:13:42 dante-local-theta-upgrade cosmovisor[15707]: 6:13PM INF Timed out dur=1000 height=9034700 module=consensus round=0 step=7
Mar 15 18:13:42 dante-local-theta-upgrade cosmovisor[15707]: 6:13PM INF received proposal module=consensus proposal={"Type":32,"block_id":{"hash":"DE3A3A4FD7E385CF13325BBDEBA4C26E6BD9DAF75DA243A1CEB5E9C357BEB46F","parts":{"hash":"4F04CF4B2B7FE9E368CB2C4EB159D97ADF83AE8D5796C9952D74A29C201B28AD","total":1}},"height":9034700,"pol_round":-1,"round":1,"signature":"lgTCA9WnBr5bmrbO6o3RghjrWbC2HEnijn1DHENz81X7/+jVDz5XrgOxtCGLk6YvMPl6A53HNtP/udri3RcICw==","timestamp":"2022-03-15T18:13:42.722717511Z"}
Mar 15 18:13:42 dante-local-theta-upgrade cosmovisor[15707]: 6:13PM INF received complete proposal block hash=DE3A3A4FD7E385CF13325BBDEBA4C26E6BD9DAF75DA243A1CEB5E9C357BEB46F height=9034700 module=consensus
Mar 15 18:13:42 dante-local-theta-upgrade cosmovisor[15707]: 6:13PM INF finalizing commit of block hash=DE3A3A4FD7E385CF13325BBDEBA4C26E6BD9DAF75DA243A1CEB5E9C357BEB46F height=9034700 module=consensus num_txs=0 root=C59CCECF2B9755F69DB62CF888012434FDAC4915CA42E48343C07D78207797D5
Mar 15 18:13:42 dante-local-theta-upgrade cosmovisor[15707]: 6:13PM ERR UPGRADE "v7-Theta" NEEDED at height: 9034700: upgrade to v7-Theta
Mar 15 18:13:42 dante-local-theta-upgrade cosmovisor[15707]: 6:13PM ERR CONSENSUS FAILURE!!! err="UPGRADE \"v7-Theta\" NEEDED at height: 9034700: upgrade to v7-Theta" module=consensus stack="goroutine 74 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x65\ngithub.com/tendermint/tendermint/consensus.(*State).receiveRoutine.func2()\n\tgithub.com/tendermint/tendermint@v0.34.15/consensus/state.go:726 +0x4c\npanic({0x18c9b60, 0xc070b53350})\n\truntime/panic.go:838 +0x207\ngithub.com/cosmos/cosmos-sdk/x/upgrade.BeginBlocker({{0xc000184041, 0xb}, 0xc00105cc30, {0x203d3d0, 0xc0010964c0}, {0x205a5f8, 0xc00007ba90}, 0xc00105d440, {0x2037700, 0xc000fa8680}}, ...)\n\tgithub.com/cosmos/cosmos-sdk@v0.44.6/x/upgrade/abci.go:54 +0xb9f\ngithub.com/cosmos/cosmos-sdk/x/upgrade.AppModule.BeginBlock(...)\n\tgithub.com/cosmos/cosmos-sdk@v0.44.6/x/upgrade/module.go:130\ngithub.com/cosmos/cosmos-sdk/types/module.(*Manager).BeginBlock(_, {{0x204fbf8, 0xc000040070}, {0x205be00, 0xc00b8256c0}, {{0xb, 0x0}, {0xc0ac7181a0, 0xe}, 0x89dbcc, ...}, ...}, ...)\n\tgithub.com/cosmos/cosmos-sdk@v0.44.6/types/module/module.go:465 +0x3a2\ngithub.com/cosmos/gaia/v6/app.(*GaiaApp).BeginBlocker(_, {{0x204fbf8, 0xc000040070}, {0x205be00, 0xc00b8256c0}, {{0xb, 0x0}, {0xc0ac7181a0, 0xe}, 0x89dbcc, ...}, ...}, ...)\n\tgithub.com/cosmos/gaia/v6/app/app.go:628 +0x85\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).BeginBlock(_, {{0xc04498fee0, 0x20, 0x20}, {{0xb, 0x0}, {0xc0ac7181a0, 0xe}, 0x89dbcc, {0x2a5e7c23, ...}, ...}, ...})\n\tgithub.com/cosmos/cosmos-sdk@v0.44.6/baseapp/abci.go:194 +0x97c\ngithub.com/tendermint/tendermint/abci/client.(*localClient).BeginBlockSync(_, {{0xc04498fee0, 0x20, 0x20}, {{0xb, 0x0}, {0xc0ac7181a0, 0xe}, 0x89dbcc, {0x2a5e7c23, ...}, ...}, ...})\n\tgithub.com/tendermint/tendermint@v0.34.15/abci/client/local_client.go:280 +0x118\ngithub.com/tendermint/tendermint/proxy.(*appConnConsensus).BeginBlockSync(_, {{0xc04498fee0, 0x20, 0x20}, {{0xb, 0x0}, {0xc0ac7181a0, 0xe}, 0x89dbcc, {0x2a5e7c23, ...}, ...}, ...})\n\tgithub.com/tendermint/tendermint@v0.34.15/proxy/app_conn.go:81 +0x55\ngithub.com/tendermint/tendermint/state.execBlockOnProxyApp({0x2050950?, 0xc013d7cc60}, {0x2055a50, 0xc0011fa920}, 0xc013cc72c0, {0x205af28, 0xc000dacdd0}, 0x89dbcb?)\n\tgithub.com/tendermint/tendermint@v0.34.15/state/execution.go:307 +0x3dd\ngithub.com/tendermint/tendermint/state.(*BlockExecutor).ApplyBlock(_, {{{0xb, 0x0}, {0xc06e43cb30, 0x8}}, {0xc06e43cb40, 0xe}, 0x89dbae, 0x89dbcb, {{0xc03494f100, ...}, ...}, ...}, ...)\n\tgithub.com/tendermint/tendermint@v0.34.15/state/execution.go:140 +0x171\ngithub.com/tendermint/tendermint/consensus.(*State).finalizeCommit(0xc06e17b880, 0x89dbcc)\n\tgithub.com/tendermint/tendermint@v0.34.15/consensus/state.go:1635 +0x9fd\ngithub.com/tendermint/tendermint/consensus.(*State).tryFinalizeCommit(0xc06e17b880, 0x89dbcc)\n\tgithub.com/tendermint/tendermint@v0.34.15/consensus/state.go:1546 +0x305\ngithub.com/tendermint/tendermint/consensus.(*State).enterCommit.func1()\n\tgithub.com/tendermint/tendermint@v0.34.15/consensus/state.go:1481 +0x87\ngithub.com/tendermint/tendermint/consensus.(*State).enterCommit(0xc06e17b880, 0x89dbcc, 0x1)\n\tgithub.com/tendermint/tendermint@v0.34.15/consensus/state.go:1519 +0xbea\ngithub.com/tendermint/tendermint/consensus.(*State).addVote(0xc06e17b880, 0xc0ed8d39a0, {0x0, 0x0})\n\tgithub.com/tendermint/tendermint@v0.34.15/consensus/state.go:2132 +0xb7c\ngithub.com/tendermint/tendermint/consensus.(*State).tryAddVote(0xc06e17b880, 0xc0ed8d39a0, {0x0?, 0x47be46?})\n\tgithub.com/tendermint/tendermint@v0.34.15/consensus/state.go:1930 +0x2c\ngithub.com/tendermint/tendermint/consensus.(*State).handleMsg(0xc06e17b880, {{0x2038680?, 0xc07994f7c0?}, {0x0?, 0x0?}})\n\tgithub.com/tendermint/tendermint@v0.34.15/consensus/state.go:838 +0x3ff\ngithub.com/tendermint/tendermint/consensus.(*State).receiveRoutine(0xc06e17b880, 0x0)\n\tgithub.com/tendermint/tendermint@v0.34.15/consensus/state.go:782 +0x512\ncreated by github.com/tendermint/tendermint/consensus.(*State).OnStart\n\tgithub.com/tendermint/tendermint@v0.34.15/consensus/state.go:378 +0x11c\n"
Mar 15 18:13:42 dante-local-theta-upgrade cosmovisor[15707]: 6:13PM INF Stopping baseWAL service impl={"Logger":{}} module=consensus wal=/root/.gaia/data/cs.wal/wal
Mar 15 18:13:42 dante-local-theta-upgrade cosmovisor[15707]: 6:13PM INF Stopping Group service impl={"Dir":"/root/.gaia/data/cs.wal","Head":{"ID":"6yPx2NeO8Nqd:/root/.gaia/data/cs.wal/wal","Path":"/root/.gaia/data/cs.wal/wal"},"ID":"group:6yPx2NeO8Nqd:/root/.gaia/data/cs.wal/wal","Logger":{}} module=consensus wal=/root/.gaia/data/cs.wal/wal
Mar 15 18:13:42 dante-local-theta-upgrade cosmovisor[15701]: 6:13PM INF Daemon shutting down in an attempt to restart module=cosmovisor
Mar 15 18:13:42 dante-local-theta-upgrade cosmovisor[15701]: 6:13PM INF starting to take backup of data directory backup start time=2022-03-15T18:13:42Z module=cosmovisor
Mar 15 18:13:43 dante-local-theta-upgrade cosmovisor[15701]: 6:13PM INF backup completed backup completion time=2022-03-15T18:13:43Z backup saved at=/root/.gaia/data-backup-2022-3-15 module=cosmovisor time taken to complete backup=876.304678
Mar 15 18:13:43 dante-local-theta-upgrade cosmovisor[15701]: 6:13PM INF pre-upgrade command does not exist. continuing the upgrade. module=cosmovisor
Mar 15 18:13:43 dante-local-theta-upgrade cosmovisor[15701]: 6:13PM INF No upgrade binary found, beginning to download it module=cosmovisor
Mar 15 18:13:43 dante-local-theta-upgrade cosmovisor[15701]: 6:13PM ERR  error="cannot download binary. downloading reference link upgrade to v7-Theta: relative paths require a module with a pwd" module=cosmovisor
Mar 15 18:13:43 dante-local-theta-upgrade systemd[1]: my-theta-local-validator.service: Main process exited, code=exited, status=1/FAILURE
Mar 15 18:13:43 dante-local-theta-upgrade systemd[1]: my-theta-local-validator.service: Failed with result 'exit-code'.
Mar 15 18:13:47 dante-local-theta-upgrade systemd[1]: my-theta-local-validator.service: Scheduled restart job, restart counter is at 1.
Mar 15 18:13:47 dante-local-theta-upgrade systemd[1]: Stopped cosmovisor-my-theta-local-validator.
Mar 15 18:13:47 dante-local-theta-upgrade systemd[1]: Started cosmovisor-my-theta-local-validator.
Mar 15 18:13:47 dante-local-theta-upgrade cosmovisor[15937]: 6:13PM INF Configuration is valid:
Mar 15 18:13:47 dante-local-theta-upgrade cosmovisor[15937]: Configurable Values:
Mar 15 18:13:47 dante-local-theta-upgrade cosmovisor[15937]:   DAEMON_HOME: /root/.gaia
Mar 15 18:13:47 dante-local-theta-upgrade cosmovisor[15937]:   DAEMON_NAME: gaiad
Mar 15 18:13:47 dante-local-theta-upgrade cosmovisor[15937]:   DAEMON_ALLOW_DOWNLOAD_BINARIES: true
Mar 15 18:13:47 dante-local-theta-upgrade cosmovisor[15937]:   DAEMON_RESTART_AFTER_UPGRADE: true
Mar 15 18:13:47 dante-local-theta-upgrade cosmovisor[15937]:   DAEMON_POLL_INTERVAL: 300ms
Mar 15 18:13:47 dante-local-theta-upgrade cosmovisor[15937]:   UNSAFE_SKIP_BACKUP: false
Mar 15 18:13:47 dante-local-theta-upgrade cosmovisor[15937]:   DAEMON_PREUPGRADE_MAX_RETRIES: 0
Mar 15 18:13:47 dante-local-theta-upgrade cosmovisor[15937]: Derived Values:
Mar 15 18:13:47 dante-local-theta-upgrade cosmovisor[15937]:         Root Dir: /root/.gaia/cosmovisor
Mar 15 18:13:47 dante-local-theta-upgrade cosmovisor[15937]:      Upgrade Dir: /root/.gaia/cosmovisor/upgrades
Mar 15 18:13:47 dante-local-theta-upgrade cosmovisor[15937]:      Genesis Bin: /root/.gaia/cosmovisor/genesis/bin/gaiad
Mar 15 18:13:47 dante-local-theta-upgrade cosmovisor[15937]:   Monitored File: /root/.gaia/data/upgrade-info.json
Mar 15 18:13:47 dante-local-theta-upgrade cosmovisor[15937]:  module=cosmovisor
Mar 15 18:13:47 dante-local-theta-upgrade cosmovisor[15937]: 6:13PM INF running app args=["start","--x-crisis-skip-assert-invariants"] module=cosmovisor path=/root/.gaia/cosmovisor/genesis/bin/gaiad
Mar 15 18:13:47 dante-local-theta-upgrade cosmovisor[15937]: 6:13PM ERR failed to read error="lstat /root/.gaia/cosmovisor/current/upgrade-info.json: no such file or directory" filename=/root/.gaia/cosmovisor/current/upgrade-info.json module=cosmovisor
Mar 15 18:13:47 dante-local-theta-upgrade cosmovisor[15946]: 6:13PM INF starting ABCI with Tendermint
Mar 15 18:13:47 dante-local-theta-upgrade cosmovisor[15937]: 6:13PM INF Daemon shutting down in an attempt to restart module=cosmovisor
Mar 15 18:13:47 dante-local-theta-upgrade cosmovisor[15937]: 6:13PM INF starting to take backup of data directory backup start time=2022-03-15T18:13:47Z module=cosmovisor
Mar 15 18:13:48 dante-local-theta-upgrade cosmovisor[15937]: 6:13PM INF backup completed backup completion time=2022-03-15T18:13:48Z backup saved at=/root/.gaia/data-backup-2022-3-15 module=cosmovisor time taken to complete backup=1326.434332
Mar 15 18:13:48 dante-local-theta-upgrade cosmovisor[15937]: 6:13PM INF pre-upgrade command does not exist. continuing the upgrade. module=cosmovisor
Mar 15 18:13:48 dante-local-theta-upgrade cosmovisor[15937]: 6:13PM INF No upgrade binary found, beginning to download it module=cosmovisor
Mar 15 18:13:48 dante-local-theta-upgrade cosmovisor[15937]: 6:13PM ERR  error="cannot download binary. downloading reference link upgrade to v7-Theta: relative paths require a module with a pwd" module=cosmovisor
Mar 15 18:13:48 dante-local-theta-upgrade systemd[1]: my-theta-local-validator.service: Main process exited, code=exited, status=1/FAILURE
Mar 15 18:13:48 dante-local-theta-upgrade systemd[1]: my-theta-local-validator.service: Failed with result 'exit-code'.
```

### Command history

```
apt update
apt upgrade
reboot now
curl -OL https://go.dev/dl/go1.18.linux-amd64.tar.gz
sudo apt install git build-essential
apt autoremove 
tar -C /usr/local -xvf go1.18.linux-amd64.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.profile
source ~/.profile
git clone https://github.com/cosmos/gaia.git
cd gaia/
git checkout release/v6.0.4
git pull
make install
export CHAIN_ID=theta-localnet
export NODE_MONIKER=my-theta-local-validator # whatever you like
export BINARY=gaiad
export NODE_HOME=$HOME/.gaia
$BINARY config chain-id $CHAIN_ID --home $NODE_HOME
$BINARY config keyring-backend test --home $NODE_HOME
$BINARY config broadcast-mode block --home $NODE_HOME
$BINARY init $NODE_MONIKER --home $NODE_HOME --chain-id=$CHAIN_ID
wget https://github.com/hyphacoop/testnets/raw/add-theta-testnet/v7-theta/local-testnet/genesis.json.gz
gunzip genesis.json.gz 
mv genesis.json $NODE_HOME/config/genesis.json
wget https://github.com/hyphacoop/testnets/raw/add-theta-testnet/v7-theta/local-testnet/priv_validator_key.json
mv priv_validator_key.json $NODE_HOME/config/priv_validator_key.json
export USER_MNEMONIC="junk appear guide guess bar reject vendor illegal script sting shock afraid detect ginger other theory relief dress develop core pull across hen float"
export USER_KEY_NAME=my-validator-account
echo $USER_MNEMONIC | $BINARY --home $NODE_HOME keys add $USER_KEY_NAME --recover --keyring-backend=test
sed -i -e 's/minimum-gas-prices = ""/minimum-gas-prices = "0.0025uatom"/g' $NODE_HOME/config/app.toml
sed -i -e '/fast_sync =/ s/= .*/= false/' $NODE_HOME/config/config.toml
export GO111MODULE=on
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@v1.0.0
mkdir -p $NODE_HOME/cosmovisor/genesis/bin
cp $(which gaiad) $NODE_HOME/cosmovisor/genesis/bin
export BINARY=$NODE_HOME/cosmovisor/genesis/bin/gaiad
nano /etc/systemd/system/cosmovisor.service
nano /etc/systemd/system/my-theta-local-validator.service
export DAEMON_NAME=gaiad
export DAEMON_HOME=/root/.gaia
sudo systemctl daemon-reload
sudo systemctl restart systemd-journald
sudo systemctl enable $NODE_MONIKER.service
sudo systemctl start $NODE_MONIKER.service
export DAEMON_ALLOW_DOWNLOAD_BINARIES=true
cosmovisor tx gov submit-proposal software-upgrade v7-Theta --title v7-Theta --deposit 100uatom --upgrade-height 9034700 --upgrade-info "upgrade to v7-Theta" --description "upgrade to v7-Theta" --gas auto --fees 400uatom --from $USER_KEY_NAME --keyring-backend test --chain-id $CHAIN_ID --home $NODE_HOME --node tcp://localhost:26657 --yes
gaiad tx gov vote 61 yes --from $USER_KEY_NAME --keyring-backend test --chain-id $CHAIN_ID --home $NODE_HOME --gas auto --fees 400uatom --node tcp://localhost:26657 --yes
$BINARY query gov proposal 61 --home $NODE_HOME
```

### my-theta-local-validator.service

```
[Unit]
Description=cosmovisor-my-theta-local-validator
After=network-online.target

[Service]
User=root
ExecStart=/root/go/bin/cosmovisor start --x-crisis-skip-assert-invariants
Restart=always
RestartSec=3
LimitNOFILE=4096
Environment='DAEMON_NAME=gaiad'
Environment='DAEMON_HOME=/root/.gaia'
Environment='DAEMON_ALLOW_DOWNLOAD_BINARIES=true'
Environment='DAEMON_RESTART_AFTER_UPGRADE=true'
Environment='DAEMON_LOG_BUFFER_SIZE=512'

[Install]
WantedBy=multi-user.target
```