Pylons-tech/pylons

State Sync doesn't work on latest binaries (v1.1.1)

Closed this issue · 2 comments

Error trying to state sync.

4:10PM ERR snapshot manager not configured
4:10PM ERR State sync failed err="state sync aborted" module=statesync

RPC Node configuration:

pruning = "custom"
pruning-keep-recent = "100"
pruning-keep-every = "2000"
pruning-interval = "10"

snapshot-interval = 2000
snapshot-keep-recent = 2

You can use our RPC for testing purposes.

SNAP_RPC="https://pylons.nodejumper.io:443"

v1.1.1

Try to state sync using the below steps.

sudo systemctl stop pylonsd

cp $HOME/.pylons/data/priv_validator_state.json $HOME/.pylons/priv_validator_state.json.backup
pylonsd tendermint unsafe-reset-all --home $HOME/.pylons --keep-addr-book

SNAP_RPC="https://pylons.nodejumper.io: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

peers="7b6b13bcbd30311a407e193d0c7b21ed3dc15cd1@pylons.nodejumper.io:30656"
sed -i 's|^persistent_peers *=.*|persistent_peers = "'$peers'"|' $HOME/.pylons/config/config.toml

sed -i -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/.pylons/config/config.toml

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

sudo systemctl restart pylonsd
sudo journalctl -u pylonsd -f --no-hostname -o cat

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

looking in to it

After some investigation, it turns out that this was actually a bug in the SDK. Should already be solved in 0.46.7.

Corresponding issue: cosmos/cosmos-sdk#13766

Temporary workaround is to set the snapshot interval flags for the syncing node.

I think this can be closed. CC @faisalnaveedRNS.