Skip to content

Commit

Permalink
kad-dht/README: Require algorithms to make progress towards target key
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden committed Jun 9, 2021
1 parent c4d4b53 commit b074091
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions kad-dht/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ In addition the libp2p Kademlia DHT offers the auxiliary _bootstrap_ operation.

### Peer routing

The below is one possible algorithm to find nodes closest to a given key on
the DHT. Implementations may diverge from this base algorithm as long as they
continue to adhere to the wire format.
The below is one possible algorithm to find nodes closest to a given key on the
DHT. Implementations may diverge from this base algorithm as long as they adhere
to the wire format and make progress towards the target key.


Let's assume we’re looking for nodes closest to key `Key`. We then enter an
iterative network search.
Expand Down Expand Up @@ -172,8 +173,8 @@ eventually converges to the best value for each record, as a result of nodes
collaborating with one another.

The below is one possible algorithm to lookup a value on the DHT.
Implementations may diverge from this base algorithm as long as they continue to
adhere to the wire format.
Implementations may diverge from this base algorithm as long as they adhere to
the wire format and make progress towards the target key.

Let's assume we’re looking for key `Key`. We first try to fetch the value from the
local store. If found, and `Q == { 0, 1 }`, the search is complete.
Expand Down

0 comments on commit b074091

Please sign in to comment.