Stop lavad and reset database
Copy sudo systemctl stop lavad
cp $HOME /.lava/data/priv_validator_state.json $HOME /.lava/priv_validator_state.json.backup
lavad tendermint unsafe-reset-all --home $HOME /.lava --keep-addr-book
Copy STATE_SYNC_RPC = https://rpc.cosmos.directory:443/lava
BACKUP_RPC = https://lava-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="e023c3892862744081360a99a2666e8111b196d3@lava-seed.y2.finance:26656,810b95bb95de712d4f30c2f62738bd976c016831@lava-seed.finteh.org:26656,cec848e7d4c5a7ae305b27cda133d213435c110f@seed-lava.ibs.team:16680,a5e5e2971721803e2297c870adacb234a724fc87@seed-lava.r93axnodes.cloud:8256,258f523c96efde50d5fe0a9faeea8a3e83be22ca@seed.lava-mainnet-1.lava.aviaone.com:10291,8542cd7e6bf9d260fef543bc49e59be5a3fa9074@seed.publicnode.com:26656,b9dfd3f222e65ae605efc29dc9e3faecdc3b71d0@lava.seed.stavr.tech:197,b85358e035343a3b15e77e1102857dcdaf70053b@seeds.bluestake.net:29956,ebc272824924ea1a27ea3183dd0b9ba713494f83@lava-mainnet-seed.autostake.com:27066,6086779c98b6864aea1ae595b96a412aa11ec6c7@lava.seed.stakevillage.net:17760"
echo -e "Modifying $HOME/.lava/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 /.lava/config/config.toml
mv $HOME /.lava/priv_validator_state.json.backup $HOME /.lava/data/priv_validator_state.json
Copy curl -L https://snapshots.lavenderfive.com/wasm/ $HOME /.lava/wasmonly.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME /.lava
Restart lavad and check the log
Copy sudo systemctl restart lavad && sudo journalctl -u lavad -f --no-hostname -o cat