Defund orbit-alpha-1 statesync

You are welcome to statesync from my node. States are taken every 100 blocks and 5 latest states are stored.

ShellScript
systemctl stop defundd
defundd tendermint unsafe-reset-all --home $HOME/.defund --keep-addr-book
SNAP_RPC="http://46.4.80.43:40657"
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 100)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/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\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.defund/config/config.toml

systemctl restart defundd && journalctl -fu defundd -o cat

That’s it, simple as a pie!


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *