Copy sudo systemctl stop emped
cp $HOME/.empe-chain/data/priv_validator_state.json $HOME/.empe-chain/priv_validator_state.json.backup
rm -rf $HOME/.empe-chain/data
emped tendermint unsafe-reset-all --home ~/.emped/ --keep-addr-book
curl -L https://snapshot.validatorvn.com/empeiria/data.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.empeiria
mv $HOME/.empe-chain/priv_validator_state.json.backup $HOME/.empe-chain/data/priv_validator_state.json
sudo systemctl restart emped && sudo journalctl -u emped -f -o cat
Copy sudo systemctl stop emped
cp $HOME/.empe-chain/data/priv_validator_state.json $HOME/.empe-chain/priv_validator_state.json.backup
emped tendermint unsafe-reset-all --home ~/.empe-chain/ --keep-addr-book
SNAP_RPC="https://empeiria-rpc.validatorvn.com:443"
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" ~/.empe-chain/config/config.toml
more ~/.empe-chain/config/config.toml | grep 'rpc_servers'
more ~/.empe-chain/config/config.toml | grep 'trust_height'
more ~/.empe-chain/config/config.toml | grep 'trust_hash'
sudo mv $HOME/.empe-chain/priv_validator_state.json.backup $HOME/.empe-chain/data/priv_validator_state.json
sudo systemctl restart emped && journalctl -u emped -f -o cat
Copy URL="https://empeiria-rpc.validatorvn.com/net_info"
# Fetch data from the endpoint
response=$(curl -s $URL)
# Parse JSON and construct PEERS string using jq
PEERS=$(echo $response | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):" + (.node_info.listen_addr | capture("(?<ip>.+):(?<port>[0-9]+)$").port)' | paste -sd "," -)
# Display the PEERS string
echo "PEERS=\"$PEERS\""
# Set the peers
sed -i 's|^persistent_peers *=.*|persistent_peers = "'$PEERS'"|' $HOME/.empe-chain/config/config.toml
Copy curl -L https://snapshot.validatorvn.com/empeiria/addrbook.json > $HOME /.empe-chain/config/addrbook.json
curl -L https://snapshot.validatorvn.com/empeiria/genesis.json > $HOME /.empe-chain/config/genesis.json