-
Notifications
You must be signed in to change notification settings - Fork 222
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
Commits on Apr 3, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 57a12ce - Browse repository at this point
Copy the full SHA 57a12ceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6793dc1 - Browse repository at this point
Copy the full SHA 6793dc1View commit details -
fix Search/GetValue to be Kad compliant. Default quorum is now 0 whic…
…h means do not abort the query early
Configuration menu - View commit details
-
Copy full SHA for 564764f - Browse repository at this point
Copy the full SHA 564764fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 616b0e1 - Browse repository at this point
Copy the full SHA 616b0e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4aee8bb - Browse repository at this point
Copy the full SHA 4aee8bbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6dac71c - Browse repository at this point
Copy the full SHA 6dac71cView commit details -
query switches from alpha mode to k mode if no peers closer than one …
…we have heard about (in a given path) has been found
Configuration menu - View commit details
-
Copy full SHA for 85f88e1 - Browse repository at this point
Copy the full SHA 85f88e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for c7a8d0d - Browse repository at this point
Copy the full SHA c7a8d0dView commit details -
Configuration menu - View commit details
-
Copy full SHA for cfb4b40 - Browse repository at this point
Copy the full SHA cfb4b40View commit details -
Configuration menu - View commit details
-
Copy full SHA for 19e4d2e - Browse repository at this point
Copy the full SHA 19e4d2eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 11776e0 - Browse repository at this point
Copy the full SHA 11776e0View commit details -
options: KValue and AlphaValue global variables no longer used intern…
…ally. Concurrency option now sets alpha. DisjointPaths option now sets d. Default number of disjoint paths is now bucketSize/2.
Configuration menu - View commit details
-
Copy full SHA for e967aca - Browse repository at this point
Copy the full SHA e967acaView commit details -
Configuration menu - View commit details
-
Copy full SHA for dd0bbb2 - Browse repository at this point
Copy the full SHA dd0bbb2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c2cf46 - Browse repository at this point
Copy the full SHA 4c2cf46View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41f47f7 - Browse repository at this point
Copy the full SHA 41f47f7View commit details -
Utilize identify events to add peers to the routing table (#472)
* 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>
Configuration menu - View commit details
-
Copy full SHA for 509c0bc - Browse repository at this point
Copy the full SHA 509c0bcView commit details -
fix: improve context deadline handling
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.
Configuration menu - View commit details
-
Copy full SHA for 1de9b90 - Browse repository at this point
Copy the full SHA 1de9b90View commit details -
Configuration menu - View commit details
-
Copy full SHA for acd3bba - Browse repository at this point
Copy the full SHA acd3bbaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 052ac59 - Browse repository at this point
Copy the full SHA 052ac59View commit details -
Enable switching DHT between client and server modes (#469)
* created Mode(ModeOpt) option for choosing between auto/client/server modes * Auto mode internally switches the DHT between client and server modes based on the EvtLocalReachabilityChanged event emitted on the event bus (e.g. by AutoNAT) * routing table management of peers that switch between client and server mode while we are connected to them (i.e. are in auto mode) * removed Client(bool) option, becoming a DHT client is specified using Mode(ModeClient) instead
Configuration menu - View commit details
-
Copy full SHA for d4134a4 - Browse repository at this point
Copy the full SHA d4134a4View commit details -
feat: move options to main package and make internals private (#486)
* feat: move options to main package and make internals private Rationale: 1. This allows us to make private options for testing. 2. This removes an import for DHT users. 3. This makes options much easier to discover. 4. This makes it possible to make the config/options internals private. We originally put them in a sub-package to avoid poluting the root namespace, but that isn't really necessary. This keeps the old package (for now) to avoid breaking too much.
Configuration menu - View commit details
-
Copy full SHA for 30fa086 - Browse repository at this point
Copy the full SHA 30fa086View commit details -
* upgraded the protocol id to version 2 (i.e. /kad/2.0.0) and made it so v2 peers running in server mode respond to queries from v1 peers. Note: v2 peers will only send queries using the v2 protocol, will only add v2 peers to their routing tables, and will only tell v1 peers about v2 peers. * to run a forked network we now use network specific protocol prefixes instead of manually setting protocol IDs. Use the ProtocolPrefix option instead of the Protocols option. * emit errors during initialization if the user misuses the default protocol prefix by setting parameters inconsistent with the default protocol's network specification * since the Client option has been deprecated it's been removed from the dht's options. While deprecated it is still available in the dht options package. Setting `Client(false)` now puts the node into ModeAuto.
Configuration menu - View commit details
-
Copy full SHA for 07dff1f - Browse repository at this point
Copy the full SHA 07dff1fView commit details -
Configuration menu - View commit details
-
Copy full SHA for c17965f - Browse repository at this point
Copy the full SHA c17965fView commit details -
Cypress Disjoint Query & Query Termination code cleanup (#489)
* kpeerset refactoring * query code cleanup
Configuration menu - View commit details
-
Copy full SHA for 229cacc - Browse repository at this point
Copy the full SHA 229caccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 169395b - Browse repository at this point
Copy the full SHA 169395bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8715e2d - Browse repository at this point
Copy the full SHA 8715e2dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5c71aa9 - Browse repository at this point
Copy the full SHA 5c71aa9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5358a4f - Browse repository at this point
Copy the full SHA 5358a4fView commit details -
cleanup: documentation and code cleanup for search/getvalue quorum de…
…faulting to zero
Configuration menu - View commit details
-
Copy full SHA for ac9f033 - Browse repository at this point
Copy the full SHA ac9f033View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b5a0e6 - Browse repository at this point
Copy the full SHA 9b5a0e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 050c4b8 - Browse repository at this point
Copy the full SHA 050c4b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for e1ed825 - Browse repository at this point
Copy the full SHA e1ed825View commit details -
Configuration menu - View commit details
-
Copy full SHA for cbeb73d - Browse repository at this point
Copy the full SHA cbeb73dView commit details -
* feat(query): fully async implementation of Kademlia lookup. peers returned from the lookup are not guaranteed to be alive (i.e. we're only guaranteed to have dialed the closest beta peers to the target), but given stable and correct routing tables the expectation that most of the peers returned are alive is high. * feat(query): add wrapper lookup followup function to followup after the lookup is completed and ensure that the closest k returned peers from a lookup have been queried even for beta < k * refactor(query) modified the structure returned from lookups to be a useful subset of the full query state instead of the entire query state * feat(options): beta parameter exposed as the Resiliency parameter * feat(routing): do not mark the routing table as updated after a FindPeer query * feat(routing): FindPeer can return addresses even if not Connected as long as it was either recently connected (CanConnect) or was discovered during the lookup * feat(bootstrap): bootstrap logic now uses GetClosestPeers instead of FindPeer * refactor(dht): stopFn no longer takes any state * fix(test): changed GetClosestPeers test to only assume beta instead of k peers since that is now more appropriate given the query logic changes and that the routing tables in that test are bad, i.e. a ring network with arbitrary peerIDs Co-authored-by: Petar Maymounkov <petarm@gmail.com> Co-authored-by: Aarsh Shah <aarshkshah1992@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 94cf481 - Browse repository at this point
Copy the full SHA 94cf481View commit details -
Configuration menu - View commit details
-
Copy full SHA for c60ea62 - Browse repository at this point
Copy the full SHA c60ea62View commit details -
Remove disjoint queries (#503)
* remove disjoint queries * remove globally queried check * removed dht rng field and mutex * removed the Disjoint option Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 94cf3e5 - Browse repository at this point
Copy the full SHA 94cf3e5View commit details -
fix(test): TestFindPeerQuery and TestFindPeerQueryMinimal now refresh…
… DHT routing tables before running. TestFindPeerQuery no longer runs with the race detector because it uses too many goroutines.
Configuration menu - View commit details
-
Copy full SHA for 7c8f404 - Browse repository at this point
Copy the full SHA 7c8f404View commit details -
Configuration menu - View commit details
-
Copy full SHA for fa52ddd - Browse repository at this point
Copy the full SHA fa52dddView commit details -
Configurable Peer Filtering (#471)
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>
Configuration menu - View commit details
-
Copy full SHA for 0543571 - Browse repository at this point
Copy the full SHA 0543571View commit details -
Configuration menu - View commit details
-
Copy full SHA for 29bc71a - Browse repository at this point
Copy the full SHA 29bc71aView commit details -
feat: reduce request read timeout (#527)
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.
Configuration menu - View commit details
-
Copy full SHA for fad6c8a - Browse repository at this point
Copy the full SHA fad6c8aView commit details -
Emit events during async query. (#504)
* 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>
Configuration menu - View commit details
-
Copy full SHA for 5a41195 - Browse repository at this point
Copy the full SHA 5a41195View commit details -
Configuration menu - View commit details
-
Copy full SHA for 39990c0 - Browse repository at this point
Copy the full SHA 39990c0View commit details -
feat: return target peer if we know about them (#511)
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.
Configuration menu - View commit details
-
Copy full SHA for d0770d2 - Browse repository at this point
Copy the full SHA d0770d2View commit details -
New RT management policy (#520)
* new RT management policy
Configuration menu - View commit details
-
Copy full SHA for 8fa0438 - Browse repository at this point
Copy the full SHA 8fa0438View commit details -
Configuration menu - View commit details
-
Copy full SHA for d715495 - Browse repository at this point
Copy the full SHA d715495View commit details -
Periodic Pinging and active fixLowPeers (#533)
* fix Low Peers and Cleanup
Configuration menu - View commit details
-
Copy full SHA for 2539114 - Browse repository at this point
Copy the full SHA 2539114View commit details -
Record valuable peers will only take into account latency of seed pee…
…rs (#536) * record valuable peers algorithm only takes into account latency of seed peers
Configuration menu - View commit details
-
Copy full SHA for 6a36698 - Browse repository at this point
Copy the full SHA 6a36698View commit details -
Configuration menu - View commit details
-
Copy full SHA for 485c60a - Browse repository at this point
Copy the full SHA 485c60aView commit details -
refreshing the routing table after the dht context is cancelled retur…
…ns an error instead of hanging
Configuration menu - View commit details
-
Copy full SHA for a4eaa70 - Browse repository at this point
Copy the full SHA a4eaa70View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5aad954 - Browse repository at this point
Copy the full SHA 5aad954View commit details -
* Remove deprecated events. * Fix warning -> warn. * Use structured logging (some places).
Configuration menu - View commit details
-
Copy full SHA for 445472b - Browse repository at this point
Copy the full SHA 445472bView commit details -
Configuration menu - View commit details
-
Copy full SHA for dfea791 - Browse repository at this point
Copy the full SHA dfea791View commit details -
fix(test): don't panic on read/write error
The querying node _is_ allowed to reset and go away. fixes #431
Configuration menu - View commit details
-
Copy full SHA for d520a1e - Browse repository at this point
Copy the full SHA d520a1eView commit details -
Configuration menu - View commit details
-
Copy full SHA for deee8b7 - Browse repository at this point
Copy the full SHA deee8b7View commit details
Commits on Apr 5, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 5e318d3 - Browse repository at this point
Copy the full SHA 5e318d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f1df26 - Browse repository at this point
Copy the full SHA 6f1df26View commit details
Commits on Apr 6, 2020
-
feat: add a v1 compatibility mode
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.
Configuration menu - View commit details
-
Copy full SHA for 9bab969 - Browse repository at this point
Copy the full SHA 9bab969View commit details -
chore: remove unused testProtocols
We no longer need this now that we explicitly support v1 compatibility mode.
Configuration menu - View commit details
-
Copy full SHA for 8af12dd - Browse repository at this point
Copy the full SHA 8af12ddView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7035c59 - Browse repository at this point
Copy the full SHA 7035c59View commit details -
test: fix TestFindPeerQuery and TestFindPeerQueryMinimal to not try a…
…nd refresh routing tables for orphaned nodes
Configuration menu - View commit details
-
Copy full SHA for a7fd35f - Browse repository at this point
Copy the full SHA a7fd35fView commit details