Stop oraid and reset database
Copy sudo systemctl stop oraid
cp $WORKSPACE /.oraid/data/priv_validator_state.json $WORKSPACE /.oraid/priv_validator_state.json.backup
oraid tendermint unsafe-reset-all --home $WORKSPACE /.oraid --keep-addr-book
Copy STATE_SYNC_RPC = https://rpc.cosmos.directory:443/oraichain
BACKUP_RPC = https://oraichain-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="e18f82a6da3a9842fa55769955d694f62f7f48bd@seed1.orai.zone:26656,defeea41a01b5afdb79ef2af155866e122797a9c@seed4.orai.zone:26656,49165f4ef94395897d435f144964bdd14413ea28@seed.orai.synergynodes.com:26656,ebc272824924ea1a27ea3183dd0b9ba713494f83@oraichain-mainnet-seed.autostake.com:27436,f223f1be06ef35a6dfe54995f05daeb1897d94d7@seed-node.mms.team:42656,8542cd7e6bf9d260fef543bc49e59be5a3fa9074@seed.publicnode.com:26656,fe0a0d46eb5436905bf8465f83d2da5a503bf4eb@mainnet-seed.konsortech.xyz:33165,bdf3f54758e6a712d13fbcda9f49b01f3c1c73b2@seed.orai.mortysnode.nl:26656,4babdcd4c81d589e789db3b294eebcd779f2227c@orai.seed.stavr.tech:2056,b85358e035343a3b15e77e1102857dcdaf70053b@seeds.bluestake.net:25956,1c6e0f2b3317fefb772fb528269c151735a5f0cb@seeds.owallet.io:10005"
echo -e "Modifying $WORKSPACE/.oraid/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\"|" \
$WORKSPACE /.oraid/config/config.toml
mv $WORKSPACE /.oraid/priv_validator_state.json.backup $WORKSPACE /.oraid/data/priv_validator_state.json
Copy curl -L https://snapshots.lavenderfive.com/wasm/ $WORKSPACE /.oraid/wasmonly.tar.zst | tar -xaf - -C $WORKSPACE /.oraid
Restart oraid and check the log
Copy sudo systemctl restart oraid && sudo journalctl -u oraid -f --no-hostname -o cat