Skip to main content

Peer Exchange

The primary objective of this protocol is to facilitate peer connectivity for resource-limited devices without relying on Discv5. The peer exchange protocol enables light nodes to request peers from other nodes within the network. Have a look at the Peer Exchange specification to learn more.

info

Peer Exchange enables requesting random peers from other network nodes without revealing information about their connectivity or neighbourhood.

Pros

  • Low resource requirements.
  • Decentralised with random sampling of nodes from a global view using Discv5.

Cons

  • Decreased anonymity.
  • Imposes additional load on responder nodes.

Overview

  1. DNS Discovery protocol is executed.
  2. Alice retrieves Bob's websocket multiaddr from DNS Server.
  3. Alice dials Bob using libp2p protocols.
  4. Alice executes a Peer Exchange query to Bob.
  5. Bob returns Carol's and David's ENR to Alice.
  6. Alice decodes ENRs and extracts Carol's and David's websocket multiaddrs.
  7. Alice dials Carol and David.
  8. Alice can now drop the connection with Bob (bootstrap node); Alice has 2 connections to the Waku Network.