Stop bcnad and reset database
Copy sudo systemctl stop bcnad
cp $HOME /.bcna/data/priv_validator_state.json $HOME /.bcna/priv_validator_state.json.backup
bcnad tendermint unsafe-reset-all --home $HOME /.bcna --keep-addr-book
Copy STATE_SYNC_RPC = https://rpc.cosmos.directory:443/bitcanna
BACKUP_RPC = https://bitcanna-rpc.lavenderfive.com:443
LATEST_HEIGHT = $( curl -s $STATE_SYNC_RPC /block | jq -r .result.block.header.height )
BLOCK_HEIGHT = $( echo LATEST_HEIGHT | awk '{print $1 - ($1 % 6000)}' ); \
TRUST_HASH = $( curl -s "$STATE_SYNC_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash )
SEEDS="d6aa4c9f3ccecb0cc52109a95962b4618d69dd3f@seed1.bitcanna.io:26656,e2e7c704f766ef6b9e2c8dd61d963f8393b87966@seed3.bitcanna.io:26656,f0e6c86d769bf5c52f78e01864091690e731643f@bitcanna-seed.panthea.eu:37656,258f523c96efde50d5fe0a9faeea8a3e83be22ca@seed.bitcanna-1.bitcanna.aviaone.com:10263,33ab202dfef5e08d5d0346e7b3cfaab2a946198a@seeds.bitcanna-mainnet.hexnodes.one:27656,d5ed854872ad96f114737889ac9521ea3a29e3a3@bitcanna-seed.oldcat.io:26656,d37062587a2aba2a5256b7363f722f4acb4b8e2f@seed-node.mms.team:30656,10ed1e176d874c8bb3c7c065685d2da6a4b86475@seed-bcna.ibs.team:16656,951cadb1888c0360dce506c1eff925cb6eb47e06@seeds-2.anode.team:10258,400f3d9e30b69e78a7fb891f60d76fa3c73f0ecc@bitcanna.rpc.kjnodes.com:14259,daa1e4a3d0f202109baea2a3be589f7eb6d9ea62@seeds-bcna.kjinc.io:26656,5f5cfac5c38506fbb4275c19e87c4107ec48808d@seeds.nodex.one:11710,1531b73fed2ad4eb55ea537fa7fd66f137c12934@seeds.blockhunters.org:38656,80f05ef09003f3303a4529a8a42e87562dd218cb@bitcanna-mainnet.seed.l0vd.com:57656,71df77a8f57af72a4d2b4e842c9ac7eaec31cc09@mainnet-seed.konsortech.xyz:27156,9e2b0de599e1b0b69fe156d783a5365858c43027@bitcanna-seed.kalia.network:12656,6f6a3a908634b79b6fe7c4988efec2553f188234@bitcanna.seed.nodeshub.online:13056,b85358e035343a3b15e77e1102857dcdaf70053b@seeds.bluestake.net:24356"
echo -e "Modifying $HOME/.bcna/config/config.toml based on the following values:"
echo -e "RPC Address: $STATE_SYNC_RPC"
echo -e "Latest Block Height: $LATEST_HEIGHT"
echo -e "Sync Block Height: $BLOCK_HEIGHT"
echo -e "Trust Hash: $TRUST_HASH"
sed -i \
-e "s|^enable *=.*|enable = true|" \
-e "s|^rpc_servers *=.*|rpc_servers = \"$STATE_SYNC_RPC,$BACKUP_RPC\"|" \
-e "s|^trust_height *=.*|trust_height = $BLOCK_HEIGHT|" \
-e "s|^trust_hash *=.*|trust_hash = \"$TRUST_HASH\"|" \
-e "s|^seeds *=.*|seeds = \"$SEEDS\"|" \
$HOME /.bcna/config/config.toml
mv $HOME /.bcna/priv_validator_state.json.backup $HOME /.bcna/data/priv_validator_state.json
Copy curl -L https://snapshots.lavenderfive.com/wasm/ $HOME /.bcna/wasmonly.tar.zst | tar -xaf - -C $HOME /.bcna
Restart bcnad and check the log
Copy sudo systemctl restart bcnad && sudo journalctl -u bcnad -f --no-hostname -o cat