State Sync
Stop the service
1sudo systemctl stop dymd
Backup val state and reset data
1cp $HOME/.dymension/data/priv_validator_state.json $HOME/.dymension/priv_validator_state.json.backup2dymd tendermint unsafe-reset-all --home $HOME/.dymension
Enable State-sync config
1SNAP_RPC="https://rpc.dymension.bh.rocks:443"23LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);4BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000));5TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)67echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH && sleep 189sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;10s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;11s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;12s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;13s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.dymension/config/config.toml
Restart node
1sudo systemctl restart dymd && sudo journalctl -u dymd -f