Stop elysd and reset database
Copy sudo systemctl stop elysd
cp $HOME /.elys/data/priv_validator_state.json $HOME /.elys/priv_validator_state.json.backup
elysd tendermint unsafe-reset-all --home $HOME /.elys --keep-addr-book
Copy STATE_SYNC_RPC = https://rpc.cosmos.directory:443/elys
BACKUP_RPC = https://elys-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 = "7e0e2a7a6c435274399d1df9cf65dc4b8b4ebf04@51.89.64.156:26656,41defad48e55a1f69753d50a0b9686d03502e3c6@51.89.235.111:26656,336b4190e2bbd194509f452ab53f301a361a4349@51.178.89.172:26656,2a899b63889ac5caa4c0219fa37992fa624b79de@51.161.118.222:26656,ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@seeds.polkachu.com:22056,36d9c4dcdee38411d680f897481322bcb7e10aa8@elys-mainnet-seed.itrocket.net:41656"
echo -e "Modifying $HOME/.elys/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 /.elys/config/config.toml
mv $HOME /.elys/priv_validator_state.json.backup $HOME /.elys/data/priv_validator_state.json
Copy curl -L https://snapshots.lavenderfive.com/wasm/ $HOME /.elys/wasmonly.tar.zst | tar -xaf - -C $HOME /.elys
Restart elysd and check the log
Copy sudo systemctl restart elysd && sudo journalctl -u elysd -f --no-hostname -o cat