Created
July 5, 2022 01:16
-
-
Save zeroFruit/723891166e3caa2966092e59a0a743e7 to your computer and use it in GitHub Desktop.
Cosmos Dev Series: Cosmos-SDK-based Blockchain Upgrade - setup-node.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export DAEMON_NAME=simappd | |
export SIMAPPD_V1_HOME=/path/to/simappd-v1 | |
export SIMAPPD_V2_HOME=/path/to/simappd-v2 | |
export DAEMON_HOME=/path/to/simappd-home | |
# Tmp cosmovisor directory. In this directory, we are going to | |
# setup Cosmovisor directory structures and copy this directory | |
# into $DAEMON_HOME | |
export TMP_COSMOVISOR_DIR=/path/to/tmp-cosmovisor | |
# update if needed | |
export DAEMON_ALLOW_DOWNLOAD_BINARIES=false | |
export DAEMON_RESTART_AFTER_UPGRADE=true | |
# setup cored binaries | |
cd $SIMAPPD_V1_HOME | |
make build | |
cp ./build/simappd $TMP_COSMOVISOR_DIR/genesis/bin/ | |
cd $SIMAPPD_V2_HOME | |
make build | |
cp ./build/simappd $TMP_COSMOVISOR_DIR/upgrades/v2.0.0/bin/ | |
# setup cored data | |
cd $SIMAPPD_V1_HOME | |
ignite chain init --home $DAEMON_HOME | |
cp -R $TMP_COSMOVISOR_DIR $DAEMON_HOME/ | |
cosmovisor run start --home $DAEMON_HOME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment