diff --git a/beacon_chain/conf.nim b/beacon_chain/conf.nim index 1eba5c9f8..3dfda0c1f 100644 --- a/beacon_chain/conf.nim +++ b/beacon_chain/conf.nim @@ -139,7 +139,7 @@ type name: "udp-port" }: Port maxPeers* {. - defaultValue: 79 # The Wall gets released + defaultValue: 160 # 5 (fanout) * 64 (subnets) / 2 (subs) for a heathy mesh desc: "The maximum number of peers to connect to" name: "max-peers" }: int diff --git a/beacon_chain/eth2_network.nim b/beacon_chain/eth2_network.nim index ea67ad794..dc84a5714 100644 --- a/beacon_chain/eth2_network.nim +++ b/beacon_chain/eth2_network.nim @@ -311,10 +311,13 @@ template remote*(peer: Peer): untyped = proc openStream(node: Eth2Node, peer: Peer, protocolId: string): Future[Connection] {.async.} = + # When dialling here, we do not provide addresses - all new connection + # attempts are handled via `connect` which also takes into account + # reconnection timeouts let protocolId = protocolId & "ssz_snappy" conn = await dial( - node.switch, peer.info.peerId, peer.info.addrs, protocolId) + node.switch, peer.info.peerId, protocolId) # libp2p may replace peerinfo ref sometimes, so make sure we have a recent # one @@ -665,7 +668,7 @@ proc handleIncomingStream(network: Eth2Node, case peer.connectionState of Disconnecting, Disconnected, None: # We got incoming stream request while disconnected or disconnecting. - warn "Got incoming request from disconnected peer", peer = peer, + debug "Got incoming request from disconnected peer", peer = peer, message = msgName await conn.closeWithEOF() return