Stop gravity and reset database
Copy sudo systemctl stop gravity
cp $HOME /.gravity/data/priv_validator_state.json $HOME /.gravity/priv_validator_state.json.backup
gravity tendermint unsafe-reset-all --home $HOME /.gravity --keep-addr-book
Copy STATE_SYNC_RPC = https://rpc.cosmos.directory:443/gravitybridge
BACKUP_RPC = https://gravitybridge-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="2b089bfb4c7366efb402b48376a7209632380c9c@65.19.136.133:26656,63e662f5e048d4902c7c7126291cf1fc17687e3c@95.211.103.175:26656,ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@seeds.polkachu.com:14256,20e1000e88125698264454a884812746c2eb4807@seeds.lavenderfive.com:14256,86bd5cb6e762f673f1706e5889e039d5406b4b90@gravity.seed.node75.org:10556,4e595d6781b122b2aea91b08da0ad97f708bf52a@seed-gravity-bridge-01.stakeflow.io:1306,9f4ed62cd0b60d7c4bdbdce5db5794211707528b@seed-gravity.ibs.team:16661,8542cd7e6bf9d260fef543bc49e59be5a3fa9074@seed.publicnode.com:26656,258f523c96efde50d5fe0a9faeea8a3e83be22ca@seed.gravity-bridge-3.gravity.aviaone.com:10266"
echo -e "Modifying $HOME/.gravity/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 /.gravity/config/config.toml
mv $HOME /.gravity/priv_validator_state.json.backup $HOME /.gravity/data/priv_validator_state.json
Copy curl -L https://snapshots.lavenderfive.com/wasm/ $HOME /.gravity/wasmonly.tar.zst | tar -xaf - -C $HOME /.gravity
Restart gravity and check the log
Copy sudo systemctl restart gravity && sudo journalctl -u gravity -f --no-hostname -o cat