Stop pylonsd and reset database
Copy sudo systemctl stop pylonsd
cp $HOME /.pylons/data/priv_validator_state.json $HOME /.pylons/priv_validator_state.json.backup
pylonsd tendermint unsafe-reset-all --home $HOME /.pylons --keep-addr-book
Copy STATE_SYNC_RPC = https://rpc.cosmos.directory:443/pylons
BACKUP_RPC = https://pylons-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="0d25c5db4cbdc4171c8272278040db774011c268@5.161.229.9:26656,e9e64412c3d43de4f2e5f7a3e9289b4190e4ed78@88.198.32.17:33656,030e6a01aef8913bcee33b957e9204986203bc81@135.125.4.73:46656"
echo -e "Modifying $HOME/.pylons/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 /.pylons/config/config.toml
mv $HOME /.pylons/priv_validator_state.json.backup $HOME /.pylons/data/priv_validator_state.json
Copy curl -L https://snapshots.lavenderfive.com/wasm/ $HOME /.pylons/wasmonly.tar.zst | tar -xaf - -C $HOME /.pylons
Restart pylonsd and check the log
Copy sudo systemctl restart pylonsd && sudo journalctl -u pylonsd -f --no-hostname -o cat