Skip to content

Choose a network

Height5,966,409 Producing blocks Chain IDepix_1916-1 Versionv0.7.3 Explorer (opens in a new tab)

Epix state sync

State sync starts a Epix node from a recent block that our RPC serves, instead of replaying the chain's history.

Step 1: Stop the node, back up the validator state and reset

sudo service epix stop
cp $HOME/.epixd/data/priv_validator_state.json $HOME/.epixd/priv_validator_state.json.backup
epixd tendermint unsafe-reset-all --home $HOME/.epixd --keep-addr-book

Step 2: Configure state sync

The commands read a trusted height and hash from https://epix-rpc.stakerhouse.com, set the peer to sync from and restore the validator state.

SYNC_RPC="https://epix-rpc.stakerhouse.com:443"
SYNC_PEER="3799adb9015f67953e8ca5d9722b7f86c3b42fc0@[2a0e:dc0:2:363c::1]:10256"
LATEST_HEIGHT=$(curl -s $SYNC_RPC/block | jq -r .result.block.header.height)
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000))
TRUST_HASH=$(curl -s "$SYNC_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)

sed -i \
-e "s|^enable *=.*|enable = true|" \
-e "s|^rpc_servers *=.*|rpc_servers = \"$SYNC_RPC,$SYNC_RPC\"|" \
-e "s|^trust_height *=.*|trust_height = $BLOCK_HEIGHT|" \
-e "s|^trust_hash *=.*|trust_hash = \"$TRUST_HASH\"|" \
-e "s|^persistent_peers *=.*|persistent_peers = \"$SYNC_PEER\"|" \
$HOME/.epixd/config/config.toml

mv $HOME/.epixd/priv_validator_state.json.backup $HOME/.epixd/data/priv_validator_state.json

Step 3: Start the node and follow the logs

sudo service epix start && sudo journalctl -fu epix -o cat