- 06 Apr, 2020 6 commits
-
-
Adin Schmahmann authored
-
Adin Schmahmann authored
Proposed DHTv2 Changes
-
Adin Schmahmann authored
test: fix TestFindPeerQuery and TestFindPeerQueryMinimal to not try and refresh routing tables for orphaned nodes
-
Steven Allen authored
-
Steven Allen authored
We no longer need this now that we explicitly support v1 compatibility mode.
-
Steven Allen authored
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.
-
- 05 Apr, 2020 2 commits
-
-
Adin Schmahmann authored
-
Adin Schmahmann authored
-
- 03 Apr, 2020 32 commits
-
-
Steven Allen authored
-
Steven Allen authored
The querying node _is_ allowed to reset and go away. fixes https://github.com/libp2p/go-libp2p-kad-dht/issues/431
-
Steven Allen authored
-
Steven Allen authored
* Remove deprecated events. * Fix warning -> warn. * Use structured logging (some places).
-
Steven Allen authored
Except deprecated warn calls
-
Adin Schmahmann authored
-
Steven Allen authored
-
Adin Schmahmann authored
* record valuable peers algorithm only takes into account latency of seed peers
-
Aarsh Shah authored
* fix Low Peers and Cleanup
-
Adin Schmahmann authored
-
Aarsh Shah authored
* new RT management policy
-
Steven Allen authored
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.
-
Adin Schmahmann authored
-
Petar Maymounkov authored
* 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>
-
Steven Allen authored
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.
-
Aarsh Shah authored
-
Adin Schmahmann authored
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>
-
Steven Allen authored
-
Adin Schmahmann authored
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.
-
Aarsh Shah authored
* 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>
-
Adin Schmahmann authored
-
Adin Schmahmann authored
* 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>
-
Aarsh Shah authored
-
Aarsh Shah authored
-
Aarsh Shah authored
-
Adin Schmahmann authored
-
Adin Schmahmann authored
-
Adin Schmahmann authored
-
Adin Schmahmann authored
-
Aarsh Shah authored
-
Aarsh Shah authored
-
Aarsh Shah authored
* kpeerset refactoring * query code cleanup
-