Currently the only way for a Waku v2 node to "know" about other peers, is for those peers to be statically configured on the node, either in a list of initial bootstrap nodes or in an ad-hoc fashion via an RPC call.
Discovery, or the method by which a node might find peers, can be implemented in a number of different ways. nimbus-eth2, for example, uses an implementation of Discovery v5. The main objection to using (only) discv5 for Waku v2 is the high resource-usage, specifically i.t.o. CPU and memory usage. Since Waku v2 specifically focuses on resource-restricted devices, a more appropriate approach was suggested whereby a node uses DNS to resolve a list of available bootstrap nodes. This is based on EIP-1459. DNS-based discovery on initial bootstrapping, in combination with ambient peer discovery, should be enough for a peer to gradually become aware of other peers in the network in a resource-efficient way.
Since this is a wide-ranging issue, the first step is to carefully scope out the work and create reasonable subtasks.
Background
This issue defines a first step towards https://github.com/status-im/nim-waku/issues/452
Currently the only way for a Waku v2 node to "know" about other peers, is for those peers to be statically configured on the node, either in a list of initial bootstrap nodes or in an ad-hoc fashion via an RPC call. Discovery, or the method by which a node might find peers, can be implemented in a number of different ways.
nimbus-eth2
, for example, uses an implementation of Discovery v5. The main objection to using (only) discv5 for Waku v2 is the high resource-usage, specifically i.t.o. CPU and memory usage. Since Waku v2 specifically focuses on resource-restricted devices, a more appropriate approach was suggested whereby a node uses DNS to resolve a list of available bootstrap nodes. This is based on EIP-1459. DNS-based discovery on initial bootstrapping, in combination with ambient peer discovery, should be enough for a peer to gradually become aware of other peers in the network in a resource-efficient way.Since this is a wide-ranging issue, the first step is to carefully scope out the work and create reasonable subtasks.
References