Empower Empower State-Sync

To help validators to deploy or recover quickly,
we provide a state-sync server from high-performance infrastructure.

State-Sync RPC https://empower-testnet-rpc.bluestake.net:443

State-Sync instructions

Detailled instructions

1. Install dependencies if needed
sudo apt install curl jq -y
2. Stop the node
systemctl stop empower.service
3. Remove old data
# Always backup priv_validator_state.json on validator node, to avoid double-sign
cp $HOME/.empowerchain/data/priv_validator_state.json $HOME/.empowerchain/priv_validator_state.json.backup

If possible, keep this backup until your node is running
mv $HOME/.empowerchain/data $HOME/.empowerchain/data.backup

mkdir $HOME/.empowerchain/data
cp $HOME/.empowerchain/priv_validator_state.json.backup $HOME/.empowerchain/data/priv_validator_state.json
4. Configure state-sync
RPC1=https://empower-testnet-rpc.bluestake.net:443
RPC2=$RPC1

LATEST_HEIGHT=$(curl -s $RPC1/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \
TRUST_HASH=$(curl -s "$RPC1/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$RPC1,$RPC2\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.empowerchain/config/config.toml
5. Start the node
systemctl start empower.service
6. Monitor your node
journalctl -u empower

# Is your node catching up?
curl http://localhost:26657/status | jq .result.sync_info