Stop acred and reset database
Copy sudo systemctl stop acred
cp $HOME /.acred/data/priv_validator_state.json $HOME /.acred/priv_validator_state.json.backup
acred tendermint unsafe-reset-all --home $HOME /.acred --keep-addr-book
Copy STATE_SYNC_RPC = https://rpc.cosmos.directory:443/acrechain
BACKUP_RPC = https://acrechain-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 = "ef28f065e24d60df275b06ae9f7fed8ba0823448@46.4.81.204:34656,1264ee73a2f40a16c2cbd80c1a824aad7cb082e4@149.102.146.252:26656,bac90a590452337700e0033315e96430d19a3ffa@23.106.238.167:26656,d86d7a9d8059ae726f3322ff1eb9e2797fe62a72@65.108.233.44:26616,ebc272824924ea1a27ea3183dd0b9ba713494f83@acrechain-mainnet-seed.autostake.com:26956"
echo -e "Modifying $HOME/.acred/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 /.acred/config/config.toml
mv $HOME /.acred/priv_validator_state.json.backup $HOME /.acred/data/priv_validator_state.json
Copy curl -L https://snapshots.lavenderfive.com/wasm/ $HOME /.acred/wasmonly.tar.zst | tar -xaf - -C $HOME /.acred
Restart acred and check the log
Copy sudo systemctl restart acred && sudo journalctl -u acred -f --no-hostname -o cat