Stop andromedad and reset database
Copy sudo systemctl stop andromedad
cp $HOME /.andromeda/data/priv_validator_state.json $HOME /.andromeda/priv_validator_state.json.backup
andromedad tendermint unsafe-reset-all --home $HOME /.andromeda --keep-addr-book
Copy STATE_SYNC_RPC = https://rpc.cosmos.directory:443/andromeda1
BACKUP_RPC = https://andromeda1-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="df949a46ae6529ae1e09b034b49716468d5cc7e9@seeds.stakerhouse.com:12156,ebc272824924ea1a27ea3183dd0b9ba713494f83@andromeda-mainnet-peer.autostake.com:27126,400f3d9e30b69e78a7fb891f60d76fa3c73f0ecc@nibiru.rpc.kjnodes.com:13959"
echo -e "Modifying $HOME/.andromeda/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 /.andromeda/config/config.toml
mv $HOME /.andromeda/priv_validator_state.json.backup $HOME /.andromeda/data/priv_validator_state.json
Copy curl -L https://snapshots.lavenderfive.com/wasm/ $HOME /.andromeda/wasmonly.tar.zst | tar -xaf - -C $HOME /.andromeda
Restart andromedad and check the log
Copy sudo systemctl restart andromedad && sudo journalctl -u andromedad -f --no-hostname -o cat