Skip to content
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

Proposed DHTv2 Changes #473

Merged
merged 61 commits into from
Apr 6, 2020
Merged

Proposed DHTv2 Changes #473

merged 61 commits into from
Apr 6, 2020

Conversation

aschmahmann
Copy link
Contributor

This branch contains the various changes to the DHT that will result in us bumping the DHT protocol version.

The changes include:

routing.go Outdated Show resolved Hide resolved
query.go Outdated Show resolved Hide resolved
query.go Outdated Show resolved Hide resolved
query.go Outdated Show resolved Hide resolved
aschmahmann and others added 17 commits April 3, 2020 12:50
…we have heard about (in a given path) has been found
…ally. Concurrency option now sets alpha. DisjointPaths option now sets d. Default number of disjoint paths is now bucketSize/2.
* feat: consume identify events to evaluate routing table addition
* fix: routing table no longer gets an update just because new messages have arrived or been sent
* fix: add already connected peers into the routing table before listening to events

Co-authored-by: Raúl Kripalani <raul.kripalani@gmail.com>
Co-authored-by: Aarsh Shah <aarshkshah1992@gmail.com>
1. Continue to best-effort provide, but still return an error when we fail to
send provider records to the _best_ peers.
2. Continue returning the best peer's we've found in GetClosestPeers, but also
return an error to indicate that we didn't find the closest ones.

And fix the hang test.
Stebalien and others added 13 commits April 3, 2020 12:50
Allows specifying peer filter functions on query and on adding peers to the routing table. This patch also includes some reasonable default functions for a public-only and private-only DHT.

Co-authored-by: Will Scott <will@cypherpunk.email>
Co-authored-by: Steven Allen <steven@stebalien.com>
This should stop us from waiting on unresponsive peers. This only kicks in when
we've already _sent_ a request so this:

* Shouldn't be blocked on other requests we're planning on making.
* Shouldn't be blocked on dialing.
* Add Kademlia async lookup implementation (replaces prior implementation)
* Add lookup events that allow full lookup reconstruction from logs
* Introduce lookup stopping condition, based on parameter "beta"

Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
Previously, we'd only return the target peer if we were connected to them.
However, this makes it difficult to impossible to find peers that are mostly
disconnected from the network.

This change also changes `p` to `from` in several places as `p` is _very_
confusing. We should probably switch away from using `p` everywhere.
* new RT management policy
…rs (#536)

* record valuable peers algorithm only takes into account latency of seed peers
Stebalien and others added 7 commits April 3, 2020 15:19
Except deprecated warn calls
* Remove deprecated events.
* Fix warning -> warn.
* Use structured logging (some places).
The querying node _is_ allowed to reset and go away.

fixes #431
Stebalien and others added 4 commits April 5, 2020 19:28
When this option is passed, the DHT node will listen on and query _only_ using
the old DHT protocol. Importantly, the node won't even pretend to be a new DHT
node because it's routing table includes V1 peers.
We no longer need this now that we explicitly support v1 compatibility mode.
@Stebalien Stebalien marked this pull request as ready for review April 6, 2020 04:27
@aschmahmann aschmahmann merged commit 1ba0310 into master Apr 6, 2020
@Stebalien
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants