Stop nibid and reset database
Copy sudo systemctl stop nibid
cp $HOME /.nibid/data/priv_validator_state.json $HOME /.nibid/priv_validator_state.json.backup
nibid tendermint unsafe-reset-all --home $HOME /.nibid --keep-addr-book
Copy STATE_SYNC_RPC = https://rpc.cosmos.directory:443/nibiru
BACKUP_RPC = https://nibiru-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="20e1000e88125698264454a884812746c2eb4807@seeds.lavenderfive.com:19856,b7262df35a7e1d1fb4027464efe9d9d6218ca4c7@35.233.111.89:26656,ebf72163ad536ca73a037fa5d564d511be59c2f4@34.34.137.54:26656,8542cd7e6bf9d260fef543bc49e59be5a3fa9074@seed.publicnode.com:26656,400f3d9e30b69e78a7fb891f60d76fa3c73f0ecc@nibiru.rpc.kjnodes.com:13959,08bc9afd0cac4ae6cf8f1877920b0cc7e58a6f42@seeds.tendermint.roomit.xyz:40006,c416d67c3dbb2d30b803611469e6d2634099292d@nibiru.seed.stavr.tech:11036"
echo -e "Modifying $HOME/.nibid/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 /.nibid/config/config.toml
mv $HOME /.nibid/priv_validator_state.json.backup $HOME /.nibid/data/priv_validator_state.json
Copy curl -L https://snapshots.lavenderfive.com/wasm/ $HOME /.nibid/wasmonly.tar.zst | tar -xaf - -C $HOME /.nibid
Restart nibid and check the log
Copy sudo systemctl restart nibid && sudo journalctl -u nibid -f --no-hostname -o cat