Prathamesh Musale
eef72ec9c3
Part of [Create a public laconicd testnet](https://www.notion.so/Create-a-public-laconicd-testnet-896a11bdd8094eff8f1b49c0be0ca3b8) - Add instructions to setup stage2 laconicd deployment - Add instructions for stage1 to stage2 migration - Add a script and instructions for users to upgrade their nodes to testnet stage2 Reviewed-on: #31 Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com> Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
26 lines
565 B
Bash
Executable File
26 lines
565 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Exit on error
|
|
set -e
|
|
set -u
|
|
|
|
NODE_HOME="$HOME/.laconicd"
|
|
testnet2_genesis="$NODE_HOME/tmp-testnet2/genesis.json"
|
|
|
|
if [ ! -f ${testnet2_genesis} ]; then
|
|
echo "testnet2 genesis file not found, exiting..."
|
|
exit 1
|
|
fi
|
|
|
|
# Remove data but keep keys
|
|
laconicd cometbft unsafe-reset-all
|
|
|
|
# Use provided genesis config
|
|
cp $testnet2_genesis $NODE_HOME/config/genesis.json
|
|
|
|
# Set chain id in config
|
|
chain_id=$(jq -r '.chain_id' $testnet2_genesis)
|
|
laconicd config set client chain-id $chain_id --home $NODE_HOME
|
|
|
|
echo "Node data reset and ready for testnet2!"
|