- 03 Apr, 2020 5 commits
-
-
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>
-
Adin Schmahmann authored
* 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.
-
Steven Allen authored
* 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.
-
Adin Schmahmann authored
* 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
-
Adin Schmahmann authored
options: KValue and AlphaValue global variables no longer used internally. Concurrency option now sets alpha. DisjointPaths option now sets d. Default number of disjoint paths is now bucketSize/2.
-
- 18 Feb, 2020 1 commit
-
-
Vibhav Pant authored
-
- 17 Feb, 2020 2 commits
-
-
Vibhav Pant authored
-
Vibhav Pant authored
-
- 07 Dec, 2019 1 commit
-
-
Steven Allen authored
-
- 06 Dec, 2019 3 commits
-
-
Steven Allen authored
-
Steven Allen authored
-
Steven Allen authored
fixes #274
-
- 15 Nov, 2019 1 commit
-
-
Aarsh Shah authored
-
- 05 Nov, 2019 3 commits
-
-
Raúl Kripalani authored
-
Steven Allen authored
As pointed out by raul, bootstrapping and refreshing are not the same thing. Bootstrapping is the initial setup (i.e., connect to some initial nodes to get started). Refreshing is the process of refreshing the routing table.
-
Steven Allen authored
* Rename triggerAutoBootstrap to autoBootstrap. This variable used to control _triggering_ only but now completely disables automatic bootstrapping. * Remove the BootstrapConfig. We introduced this before we switched to functional options. Now that we're breaking the interfaces anyways, we might as well use functional options all the way (easier to extend). * Always query self (feedback from @raulk). * Important: don't abort the bootstrap process if we timeout finding ourselves.
-
- 03 Nov, 2019 1 commit
-
-
Aarsh Shah authored
-
- 01 Nov, 2019 1 commit
-
-
Aarsh Shah authored
-
- 11 Oct, 2019 1 commit
-
-
Aarsh Shah authored
2) seed RT if empty before starting bootstrap incase 1 hasn't fired 3) pass bootstrap config as option while creating Dht 4) replace all bootstrap function with 1 function
-
- 04 Oct, 2019 1 commit
-
-
Raúl Kripalani authored
-
- 26 May, 2019 1 commit
-
-
Raúl Kripalani authored
-
- 15 Apr, 2019 1 commit
-
-
Matt Joiner authored
-
- 01 Jun, 2018 3 commits
-
-
Erin Swenson-Healey authored
-
Erin Swenson-Healey authored
-
Steven Allen authored
Instead of changing the existing constructors, add a new DHT constructor that takes options (and add DHT options).
-