Discovery Behaviour #3864
-
Hey, we are trying to implement DHT, Gossipsub, Heartbeats, Request & Response. **We have 100 nodes in a network, which they need to discover nodes via bootstrap nodes, and create rounds. But seems like limiting discover numbers limits the discover itself. Any new node cannot connect to bootstrap node, or cannot discover any nodes due to losing connection to the bootstrap, because of discover limit.** How can we solve this issue? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
We don't have a dedicated "discovery behaviour", can you elaborate what you are referring to? Also, by default, there are no connection limits. Are you setting them yourself? |
Beta Was this translation helpful? Give feedback.
Two things:
libp2p
version,connection_limits
is deprecated, you should use thelibp2p::connections_limits::Behaviour
instead.With a counter-based connection limit, we will disallow new connections if they exceed it. We cannot know ahead of time what the "purpose" of this connection is, i.e. whether it is an initial "bootstrap" connection or not. If you need a more flexible connection management, you are probably better of with implementing
NetworkBehaviour
yourself. Take a look atlibp2p::connection_limits::Behaviour
for some inspiration.