-
Notifications
You must be signed in to change notification settings - Fork 233
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
Correctly implement kademlia bootstrapping algorithm #375
Comments
@aarshkshah1992 want to try this one? |
@Stebalien Perfect. Let me take a look at the relevant paper section/code & come up with something. |
Currently, for bootstrapping, we query for self & a random nodeID once every 5 minutes(by default). If I understand your comment/the code & this section in the paper correctly, we will now:
Wdyt ? |
So the k-bucket now looks like
We add a function to the routing table
DHT.Bootstrap now has a dedicated go-routine that periodically scans the routing table to identify buckets that haven't been queried since an hour -> does a random walk for them -> resets the timer. Two important questions are :
|
Exactly. However, in the periodic query, I'd keep the self query. That is, every hour, query self to determine the nearest bucket (there may be a closer bucket that we're simply not aware of), then proceed normally.
30m sounds fine. That gives us the hour delay.
Yes. I apologize for the insane delay. I was stalling trying to avoid context switching away from some other tasks till they were done. Thanks for the frequent reminders and please continue to bug me if I do this again. |
@Stebalien This issue can now be closed. |
We currently bootstrap:
However, this doesn't keep the entire routing table full. The correct algorithm is to:
See the end of section 2.3 in the paper.
The text was updated successfully, but these errors were encountered: