-
Notifications
You must be signed in to change notification settings - Fork 296
Kad clarification #692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Ben-PH
wants to merge
2
commits into
libp2p:master
Choose a base branch
from
Ben-PH:kad-clarification
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Kad clarification #692
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
guillaumemichel
requested changes
Aug 19, 2025
| on `Message` is set to equal `key` of the `Record`. The target node validates | ||
| `record`, and if it is valid, it stores it in the datastore and as a response | ||
| echoes the request. | ||
| `record`, and if it is [valid, it then selects](#entry-validation) the value to be stored, and stores it in the datastore. As a response, the request is echoed, with the `record` updated if the selection makes a change. |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
| `record`, and if it is [valid, it then selects](#entry-validation) the value to be stored, and stores it in the datastore. As a response, the request is echoed, with the `record` updated if the selection makes a change. | |
| `record`, and if it is valid and newer than any existing record for `key`, it | |
| stores it in the datastore and responds by echoing back the request. |
Comment on lines
+371
to
+381
| frequency (default: 10 minutes): | ||
|
|
||
| ``` | ||
| if routing table is not empty: | ||
| for each k-bucket in the routing table: | ||
| create a $PEER_ID for said k-bucket using an RNG | ||
| do the normal <findNode($PEER_ID)> | ||
| ``` | ||
| The idea here, is that peers encountered throughout the find-node process | ||
| as defined in [peer routing](#peer-routing), are inserted into the routing table, | ||
| as per usual business. |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find the current text clearer and more concise.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is some ambiguity of exactly what a kademlia
PUT_VALresponse should be, and when it responds. This PR aims to clarify that (#691 (@guillaumemichel )). I went by the issue comment, as opposed to implementation, as the specification, and thus the conversations that take part there, are the authoritative reference, and implementations that diverge are "out of spec" until their divergence is accepted upstream.While at it, I thought it might be worthwhile to add some clarity to the suggested bootstrap algorithm.