Closed arnetheduck closed 4 years ago
I think this issue is fixed, i can't see any more duplicates in lost
logs. But for some reason prevailing amount of connections here are incoming, this is very strange.
I saw it yesterday - they are incoming because the incoming / outgoing flag is set late in the process and generally holds an invalid value until it's set (ping @zah )
@arnetheduck, can you clarify what you mean?
The flag in the Peer
object is called wasDialed
and the default value is false
(in other words "incoming peer"). wasDialed
is set to true
for the outgoing peers very early, right after we have a LibP2P connection with the peer, but before we have tried to perform the Eth2 handshake:
https://github.com/status-im/nim-beacon-chain/blob/master/beacon_chain/eth2_network.nim#L708
well, it's obviously wrong here because all these peers in the log are outgoing (I don't have ports open for incoming connections)
fixed with peer events in libp2p
Notice there are supposedly 21 peers, but only a few are "lost" on shutdown - mostly notably though
16Uiu2HAmBqaNcNitjW1kar4voXHhuHoJkfqr8yS4s1xCSqJVM3Vb
is lost 4 times.