go-algorand
go-algorand copied to clipboard
p2p: limit connections made by dht and pubsub
Status
p2pNet calls DialPeersUntilTargetCount(n.config.GossipFanout)
to maintain connections but DHT and PubSub maintain their own connections to algod peers. Since all these peers support multiple protocols including /algorand-ws/1.0.0
, they establish such protocol stream.
There was a counter in p2p feature PR to drop this stream from non DialPeersUntilTargetCount
connections but it only handles DHT. Leaving us in a situation where agreement traffic not exchanged but transactions are well exchanged via PubSub.
Expected
Need to have a way to limit total connections made by p2p node.
Solution
TBD