Skip to content

kad: FIND_NODE(self) should return multiple peers #2450

@guillaumemichel

Description

@guillaumemichel
  • Version:
    1.0.0

  • Platform:
    all

  • Subsystem:
    kad-dht

Severity:

Low

Description:

When receiving a kademlia FIND_NODE request for its own peer id, a js-libp2p node will respond with its own peer record only. According to libp2p kademlia spec, it should reply with the k closest nodes.

The libp2p Kademlia DHT offers the following types of operations:

  • Peer routing
    • Finding the closest nodes to a given key via FIND_NODE.
  1. Upon a response:
    1. If successful the response will contain the k closest nodes the peer knows to the key Key. Add them to the candidate list Pn, except for those that have already been queried.

Depending on libp2p/specs#609, nodes shouldn't even include their own peer records in the response (already known to the requester).

Metadata

Metadata

Assignees

No one assigned

    Labels

    need/triageNeeds initial labeling and prioritization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions