Stop sged and reset database
Copy sudo systemctl stop sged
cp $HOME /.sge/data/priv_validator_state.json $HOME /.sge/priv_validator_state.json.backup
sged tendermint unsafe-reset-all --home $HOME /.sge --keep-addr-book
Copy STATE_SYNC_RPC = https://rpc.cosmos.directory:443/sge
BACKUP_RPC = https://sge-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="babc3f3f7804933265ec9c40ad94f4da8e9e0017@seed.rhinostake.com:17756,a973f744ec9b00cd387f62fc8d69ae1d753c060e@seed.sge.cros-nest.com:26656,20e1000e88125698264454a884812746c2eb4807@seeds.lavenderfive.com:17756,df949a46ae6529ae1e09b034b49716468d5cc7e9@seeds.stakerhouse.com:11156,08bc9afd0cac4ae6cf8f1877920b0cc7e58a6f42@seeds.tendermint.roomit.xyz:40005,af9d9bd15ca597eb77dab73c56b0ae51bafcbb28@sge.ramuchi.tech:16656,6a727128f427d166d90a1185c7965b178235aaee@rpc.sge.nodestake.top:666,8542cd7e6bf9d260fef543bc49e59be5a3fa9074@seed.publicnode.com:26656"
echo -e "Modifying $HOME/.sge/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 /.sge/config/config.toml
mv $HOME /.sge/priv_validator_state.json.backup $HOME /.sge/data/priv_validator_state.json
Copy curl -L https://snapshots.lavenderfive.com/wasm/ $HOME /.sge/wasmonly.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME /.sge
Restart sged and check the log
Copy sudo systemctl restart sged && sudo journalctl -u sged -f --no-hostname -o cat