discv5.md
1 # Node Discovery Protocol v5 2 3 **Protocol version v5.1** 4 5 Welcome to the Node Discovery Protocol v5 specification! 6 7 Note that this specification is a work in progress and may change incompatibly without 8 prior notice. 9 10 Node Discovery is a system for finding other participants in a peer-to-peer network. The 11 system can be used by any node, for any purpose, at no cost other than running the network 12 protocol and storing a limited number of other nodes' records. Any node can be used as an 13 entry point into the network. 14 15 The system's design is loosely inspired by the Kademlia DHT, but unlike most DHTs no 16 arbitrary keys and values are stored. Instead, the DHT stores and relays 'node records', 17 which are signed documents providing information about nodes in the network. Node 18 Discovery acts as a database of all live nodes in the network and performs three basic 19 functions: 20 21 - Sampling the set of all live participants: by walking the DHT, the network can be 22 enumerated. 23 - Searching for participants providing a certain service: Node Discovery v5 includes a 24 scalable facility for registering 'topic advertisements'. These advertisements can be 25 queried and nodes advertising a topic found. 26 - Authoritative resolution of node records: if a node's ID is known, the most recent 27 version of its record can be retrieved. 28 29 ## Specification Overview 30 31 The specification has three parts: 32 33 - [discv5-wire.md] defines the wire protocol. 34 - [discv5-theory.md] describes the algorithms and data structures. 35 - [discv5-rationale.md] contains the design rationale. 36 37 ## Comparison With Other Discovery Mechanisms 38 39 Systems such as MDNS/Bonjour allow finding hosts in a local-area network. The Node 40 Discovery Protocol is designed to work on the Internet and is most useful for applications 41 with a large number of participants spread across the Internet. 42 43 Systems using a rendezvous server: these systems are commonly used by desktop applications 44 or cloud services to connect participants to each other. While undoubtedly efficient, this 45 requires trust in the operator of the rendezvous server and these systems are prone to 46 censorship. Compared to a rendezvous server, The Node Discovery Protocol doesn't rely on a 47 single operator and places a small amount of trust in every participant. It becomes more 48 resistant to censorship as the size of the network increases and participants of multiple 49 distinct peer-to-peer networks can share the discovery network to further increase its 50 resilience. 51 52 The Achilles heel of the Node Discovery Protocol is the process of joining the network: 53 while any other node may be used as an entry point, such a node must first be located 54 through some other mechanism. Several approaches including scalable listing of initial 55 entry points in DNS or discovery of participants in the local network can be used for 56 reasonable secure entry into the network. 57 58 ## Comparison With Node Discovery v4 59 60 - Topic advertisement was added. 61 - Arbitrary node metadata can be stored/relayed. 62 - Node identity crypto is extensible, use of secp256k1 keys isn't strictly required. 63 - The protocol no longer relies on the system clock. 64 - Communication is encrypted, protecting topic searches and record lookups against passive 65 observers. 66 67 [discv5-wire.md]: ./discv5-wire.md 68 [discv5-theory.md]: ./discv5-theory.md 69 [discv5-rationale.md]: ./discv5-rationale.md