Open andy108369 opened 7 months ago
I am currently running my node with these settings for the state-sync to work and have avoid adding bunch of p2p persistent peers which come through CHAIN_JSON
by default (when P2P_PERSISTENT_PEERS
isn't set to 0
and CHAIN_JSON
is present with the p2p persistent peers in it):
- STATESYNC_POLKACHU=1
- P2P_POLKACHU=1
# Discourage the use of p2p persistent peers (coming via CHAIN_JSON), to encourage the usage of p2p seeds instead.
- P2P_PERSISTENT_PEERS=0
# have to add Polkachu State-Sync Peer for Akash https://polkachu.com/live_peers/akash for the state-sync to work
- AKASH_P2P_PERSISTENT_PEERS=d1e47b071859497089c944dc082e920403484c1a@65.108.128.201:12856
But even then this might fail:
INF Error reconnecting to peer. Trying again addr={"id":"d1e47b071859497089c944dc082e920403484c1a","ip":"65.108.128.201","port":12856} err="auth failure: secret conn failed: EOF" module=p2p tries=0
Whereas, state-sync works again when specifying more peers:
# curl -s "https://polkachu.com/api/v2/chains/akash/live_peers" | jq -r '[.polkachu_peer, .live_peers[]] | @csv' | tr -d '"'
- AKASH_P2P_PERSISTENT_PEERS=d1e47b071859497089c944dc082e920403484c1a@65.108.128.201:12856,e1b058e5cfa2b836ddaa496b10911da62dcf182e@169.155.44.150:26656,c908f3dca67111c21ce166d90042f2b898e526b5@35.230.84.227:26656,506002b391be8d653b14f0162325b14929cac72e@51.81.49.176:12856,ebc272824924ea1a27ea3183dd0b9ba713494f83@195.3.223.168:26696,9aa4c9097c818871e45aaca4118a9fe5e86c60e2@135.181.113.227:1506
INF Fetching snapshot chunk chunk=18 format=1 height=13764000 module=statesync total=34
...
INF Fetching snapshot chunk chunk=33 format=1 height=13764000 module=statesync total=34
Could probably also leverage the pre-seeded address book:
- ADDRBOOK_URL=https://snapshots.polkachu.com/addrbook/akash/addrbook.json
As per Polkachu:
https://polkachu.com/docs/index.html#v2-public-GETapi-v2-chains--network--live_peers
I think we should do the following:
P2P_POLKACHU
toP2P_POLKACHU_SEEDS
P2P_POLKACHU_PERSISTENT_PEERS
(which would be getting 5 random live peers plus a polkachu internal one viahttps://polkachu.com/api/v2/chains/<CHAIN>/live_peers
call)Also need to think what to do with
P2P_PERSISTENT_PEERS
which come viaCHAIN_JSON
. There are plenty of them typically and less maintained. I'd say one shouldP2P_PERSISTENT_PEERS=0
(disable them) when usingP2P_POLKACHU_PERSISTENT_PEERS=1
or have some switch to allow the combo.Should also filter the duplicates. They often slip through.