1. Aug 06, 2020
  2. Aug 05, 2020
  3. Aug 04, 2020
  4. Aug 03, 2020
  5. Jul 31, 2020
  6. Jul 30, 2020
  7. Jul 29, 2020
    • Max Inden's avatar
      client/network: Add peers to DHT only if protocols match (#6549) · dc33e646
      Max Inden authored
      * client/network/src/discovery: Adjust to Kademlia  API changes
      
      * client/network: Add peers to DHT only if protocols match
      
      With https://github.com/libp2p/rust-libp2p/pull/1628 rust-libp2p allows
      manually controlling which peers are inserted into the routing table.
      Instead of adding each peer to the routing table automatically, insert
      them only if they support the local nodes protocol id (e.g. `dot`)
      retrieved via the `identify` behaviour.
      
      For now this works around
      https://github.com/libp2p/rust-libp2p/issues/1611
      
      . In the future one
      might add more requirements. For example one might try to exclude
      light-clients.
      
      * Cargo.toml: Remove crates.io patch for libp2p
      
      * client/network/src/behaviour: Adjust to PeerInfo name change
      
      * client/network/src/discovery: Rework Kademlia event matching
      
      * client/network/discovery: Add trace on adding peer to DHT
      
      * client/network/discovery: Retrieve protocol name from kad behaviour
      
      * client/network/discovery: Fix formatting
      
      * client/network: Change DiscoveryBehaviour::add_self_reported signature
      
      * client/network: Document manual insertion strategy
      
      * client/network/discovery: Remove TODO for ignoring DHT address
      
      Co-authored-by: default avatarPierre Krieger <[email protected]>
      dc33e646