Stop dydxprotocold and reset database
Copy sudo systemctl stop dydxprotocold
cp $HOME /.dydxprotocol/data/priv_validator_state.json $HOME /.dydxprotocol/priv_validator_state.json.backup
dydxprotocold tendermint unsafe-reset-all --home $HOME /.dydxprotocol --keep-addr-book
Copy STATE_SYNC_RPC = https://rpc.cosmos.directory:443/dydx
BACKUP_RPC = https://dydx-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="ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@seeds.polkachu.com:23856,65b740ee326c9260c30af1f044e9cda63c73f7c1@seeds.kingnodes.net:23856,f04a77b92d0d86725cdb2d6b7a7eb0eda8c27089@dydx-mainnet-seed.bwarelabs.com:36656,20e1000e88125698264454a884812746c2eb4807@seeds.lavenderfive.com:23856,c2c2fcb5e6e4755e06b83b499aff93e97282f8e8@tenderseed.ccvalidators.com:26401,4f20c3e303c9515051b6276aeb89c0b88ee79f8f@seed.dydx.cros-nest.com:26656,a9cae4047d5c34772442322b10ef5600d8e54900@dydx-mainnet-seednode.allthatnode.com:26656,802607c6db8148b0c68c8a9ec1a86fd3ba606af6@64.227.38.88:26656,400f3d9e30b69e78a7fb891f60d76fa3c73f0ecc@dydx.rpc.kjnodes.com:17059,8542cd7e6bf9d260fef543bc49e59be5a3fa9074@seed.publicnode.com:26656,4c30c8a95e26b07b249813b677caab28bf0c54eb@rpc.dydx.nodestake.top:666,ebc272824924ea1a27ea3183dd0b9ba713494f83@dydx-mainnet-seed.autostake.com:27366,09ba537d6563018b97c502979c3478df4decf426@dydxprotocol-seed.genznodes.dev:22656"
echo -e "Modifying $HOME/.dydxprotocol/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 /.dydxprotocol/config/config.toml
mv $HOME /.dydxprotocol/priv_validator_state.json.backup $HOME /.dydxprotocol/data/priv_validator_state.json
Copy curl -L https://snapshots.lavenderfive.com/wasm/$HOME/.dydxprotocol/wasmonly.tar.zst | tar -xaf - -C $HOME/.dydxprotocol
Restart dydxprotocold and check the log
Copy sudo systemctl restart dydxprotocold && sudo journalctl -u dydxprotocold -f --no-hostname -o cat