waku-org / nwaku

Waku node and protocol.
Other
201 stars 53 forks source link

Scope out work for DNS-based node discovery #552

Closed jm-clius closed 3 years ago

jm-clius commented 3 years ago

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

  1. @decanus's original proposal
  2. EIP-1459 Node Discovery via DNS
  3. The original discussion that led to a feasibility study of discv5 and investigation of DNS-based alternatives.
  4. Go-implementation of EIP-1459
  5. PoC Go-implementation for libp2p
jm-clius commented 3 years ago

Subtasks created and listed in https://github.com/status-im/nim-waku/issues/452