12 Commits

Author SHA1 Message Date
Adin Schmahmann
7ada018b2a Upgrade DHT version (#479)
* 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.
2020-03-10 16:22:41 -04:00
Steven Allen
d440bbf0c4 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.
2020-03-10 16:21:56 -04:00
Steven Allen
2a39785d3f fix(options): make the disable providers/values options consistent 2019-12-06 09:47:22 -05:00
Steven Allen
52747fc1f0 feat: allow disabling value and provider storage/messages
fixes #274
2019-12-05 19:11:46 -05:00
Cole Brown
2db9d18d58 Use 2048 bit RSA keys in tests 2019-08-02 14:18:42 -04:00
Cole Brown
889386fa7c Update tests to use Ed25519 when acceptable.
Updates the version of go-libp2p-core and go-libp2p-testing
2019-08-02 13:43:08 -04:00
Raúl Kripalani
31765355df
migrate to consolidated types. (#344) 2019-05-26 23:33:15 +01:00
Steven Allen
977bc9aca4 tests: skip key inlining test
This has temporarily been disabled due to the changes/issues described in:

https://github.com/libp2p/specs/issues/111
2018-12-03 10:56:36 -08:00
Steven Allen
4d76fd28ed upgrade protobuf and switch to bytes keys
fixes #177
2018-08-07 18:50:04 -07:00
Steven Allen
26ed97fd0b update peer-id public key extraction (and more!)
1. Rely on the peerstore to extract the public key instead of doing so
internally (centralize).
2. Update the tests for the changes in go-libp2p-peer.
3. Update a bunch of deps (including go-libp2p-crypto, go-log, etc.)
4. Remove unnecessary progress bar dependency.
2018-04-16 14:04:03 +09:00
Dirk McCormick
40eb5dc9af Only retrieve one value when fetching public key from DHT 2018-02-27 17:28:13 -05:00
Jeromy
95a3e5dae2 add test for ed25519 pubkey extraction 2017-07-11 16:57:49 -07:00