66 Commits

Author SHA1 Message Date
Aarsh Shah
fbb1b3668a RT connectivity changes 2020-03-10 14:51:28 -07:00
Adin Schmahmann
c24a52fc7c
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
2020-03-06 14:56:03 -05:00
Adin Schmahmann
5d313b134c 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>
2020-03-04 22:26:30 -08:00
Adin Schmahmann
c4e94ce0fe first pass at proper kad 2020-03-04 22:11:53 -08:00
Adin Schmahmann
c01366876c upgrade deprecated query events 2020-03-04 22:11:53 -08:00
dependabot-preview[bot]
8d7ea6fadc
build(deps): bump github.com/multiformats/go-multiaddr
Bumps [github.com/multiformats/go-multiaddr](https://github.com/multiformats/go-multiaddr) from 0.2.0 to 0.2.1.
- [Release notes](https://github.com/multiformats/go-multiaddr/releases)
- [Commits](https://github.com/multiformats/go-multiaddr/compare/v0.2.0...v0.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 11:20:48 +00:00
dependabot-preview[bot]
7d7e2b1a72
build(deps): bump github.com/libp2p/go-libp2p-core from 0.3.0 to 0.3.1
Bumps [github.com/libp2p/go-libp2p-core](https://github.com/libp2p/go-libp2p-core) from 0.3.0 to 0.3.1.
- [Release notes](https://github.com/libp2p/go-libp2p-core/releases)
- [Commits](https://github.com/libp2p/go-libp2p-core/compare/v0.3.0...v0.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-24 11:20:45 +00:00
dependabot-preview[bot]
32e48dbf74
build(deps): bump github.com/stretchr/testify from 1.4.0 to 1.5.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.4.0 to 1.5.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.4.0...v1.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-20 11:19:55 +00:00
Steven Allen
747410e82a
Merge pull request #451 from libp2p/dependabot/go_modules/github.com/libp2p/go-libp2p-0.5.2
build(deps): bump github.com/libp2p/go-libp2p from 0.5.1 to 0.5.2
2020-02-17 06:46:10 -08:00
dependabot-preview[bot]
97428c08cd
build(deps): bump github.com/ipfs/go-datastore from 0.4.1 to 0.4.2
Bumps [github.com/ipfs/go-datastore](https://github.com/ipfs/go-datastore) from 0.4.1 to 0.4.2.
- [Release notes](https://github.com/ipfs/go-datastore/releases)
- [Commits](https://github.com/ipfs/go-datastore/compare/v0.4.1...v0.4.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-17 11:21:09 +00:00
dependabot-preview[bot]
9adf0af330
build(deps): bump github.com/libp2p/go-libp2p from 0.5.1 to 0.5.2
Bumps [github.com/libp2p/go-libp2p](https://github.com/libp2p/go-libp2p) from 0.5.1 to 0.5.2.
- [Release notes](https://github.com/libp2p/go-libp2p/releases)
- [Changelog](https://github.com/libp2p/go-libp2p/blob/master/NEWS.md)
- [Commits](https://github.com/libp2p/go-libp2p/compare/v0.5.1...v0.5.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-17 11:20:47 +00:00
dependabot-preview[bot]
0bed8bf78d
build(deps): bump github.com/hashicorp/golang-lru from 0.5.3 to 0.5.4
Bumps [github.com/hashicorp/golang-lru](https://github.com/hashicorp/golang-lru) from 0.5.3 to 0.5.4.
- [Release notes](https://github.com/hashicorp/golang-lru/releases)
- [Commits](https://github.com/hashicorp/golang-lru/compare/v0.5.3...v0.5.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-11 18:41:20 +00:00
Steven Allen
9a6208751a
Merge pull request #450 from libp2p/dependabot/go_modules/github.com/ipfs/go-datastore-0.4.1
build(deps): bump github.com/ipfs/go-datastore from 0.3.1 to 0.4.1
2020-02-11 10:37:54 -08:00
dependabot-preview[bot]
68b2b8c864
build(deps): bump github.com/ipfs/go-datastore from 0.3.1 to 0.4.1
Bumps [github.com/ipfs/go-datastore](https://github.com/ipfs/go-datastore) from 0.3.1 to 0.4.1.
- [Release notes](https://github.com/ipfs/go-datastore/releases)
- [Commits](https://github.com/ipfs/go-datastore/compare/v0.3.1...v0.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-11 16:53:05 +00:00
Steven Allen
967e9357ab
Merge pull request #446 from libp2p/dependabot/go_modules/github.com/multiformats/go-multistream-0.1.1
build(deps): bump github.com/multiformats/go-multistream from 0.1.0 to 0.1.1
2020-02-11 08:50:15 -08:00
dependabot-preview[bot]
b5c1df0988
build(deps): bump github.com/ipfs/go-cid from 0.0.4 to 0.0.5
Bumps [github.com/ipfs/go-cid](https://github.com/ipfs/go-cid) from 0.0.4 to 0.0.5.
- [Release notes](https://github.com/ipfs/go-cid/releases)
- [Commits](https://github.com/ipfs/go-cid/compare/v0.0.4...v0.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-05 11:19:33 +00:00
dependabot-preview[bot]
07e1bddd8d
build(deps): bump github.com/multiformats/go-multistream
Bumps [github.com/multiformats/go-multistream](https://github.com/multiformats/go-multistream) from 0.1.0 to 0.1.1.
- [Release notes](https://github.com/multiformats/go-multistream/releases)
- [Commits](https://github.com/multiformats/go-multistream/compare/v0.1.0...v0.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-05 11:19:09 +00:00
dependabot-preview[bot]
26f1e8075b
build(deps): bump go.opencensus.io from 0.22.2 to 0.22.3
Bumps [go.opencensus.io](https://github.com/census-instrumentation/opencensus-go) from 0.22.2 to 0.22.3.
- [Release notes](https://github.com/census-instrumentation/opencensus-go/releases)
- [Commits](https://github.com/census-instrumentation/opencensus-go/compare/v0.22.2...v0.22.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-04 18:29:57 +00:00
dependabot-preview[bot]
0950958a0f
build(deps): bump github.com/multiformats/go-multihash
Bumps [github.com/multiformats/go-multihash](https://github.com/multiformats/go-multihash) from 0.0.10 to 0.0.13.
- [Release notes](https://github.com/multiformats/go-multihash/releases)
- [Commits](https://github.com/multiformats/go-multihash/compare/v0.0.10...v0.0.13)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-04 11:18:31 +00:00
dependabot-preview[bot]
b35a724841
build(deps): bump github.com/libp2p/go-libp2p from 0.5.0 to 0.5.1
Bumps [github.com/libp2p/go-libp2p](https://github.com/libp2p/go-libp2p) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/libp2p/go-libp2p/releases)
- [Changelog](https://github.com/libp2p/go-libp2p/blob/master/NEWS.md)
- [Commits](https://github.com/libp2p/go-libp2p/compare/v0.5.0...v0.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-20 11:21:22 +00:00
Adin Schmahmann
5d2e3df37d make all key types loggable 2019-12-19 12:04:25 -05:00
dependabot-preview[bot]
23e3b62c28
build(deps): bump github.com/libp2p/go-libp2p from 0.4.2 to 0.5.0
Bumps [github.com/libp2p/go-libp2p](https://github.com/libp2p/go-libp2p) from 0.4.2 to 0.5.0.
- [Release notes](https://github.com/libp2p/go-libp2p/releases)
- [Changelog](https://github.com/libp2p/go-libp2p/blob/master/NEWS.md)
- [Commits](https://github.com/libp2p/go-libp2p/compare/v0.4.2...v0.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-18 11:19:25 +00:00
Steven Allen
9c060c8363 chore(bootstrap): update bootstrappers
1. Remove bootstrappers with small (1024 bit) keys.
2. Switch from /ipfs to /p2p multiaddrs.

part of https://github.com/libp2p/libp2p/issues/79
2019-12-17 16:53:38 +01:00
dependabot-preview[bot]
2aa9b6f318
build(deps): bump github.com/libp2p/go-libp2p-core from 0.2.5 to 0.3.0
Bumps [github.com/libp2p/go-libp2p-core](https://github.com/libp2p/go-libp2p-core) from 0.2.5 to 0.3.0.
- [Release notes](https://github.com/libp2p/go-libp2p-core/releases)
- [Commits](https://github.com/libp2p/go-libp2p-core/compare/v0.2.5...v0.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-17 11:53:55 +00:00
Steven Allen
904b4cdb5b
Merge pull request #428 from aarshkshah1992/feat/refresh-cpls
Refresh cpl's in dht
2019-12-17 12:50:25 +01:00
Aarsh Shah
ef6ffec073 refresh cpl in dht 2019-12-17 01:25:57 +08:00
dependabot-preview[bot]
4cb2adfe60
build(deps): bump github.com/ipfs/go-cid from 0.0.3 to 0.0.4
Bumps [github.com/ipfs/go-cid](https://github.com/ipfs/go-cid) from 0.0.3 to 0.0.4.
- [Release notes](https://github.com/ipfs/go-cid/releases)
- [Commits](https://github.com/ipfs/go-cid/compare/v0.0.3...v0.0.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-16 11:22:07 +00:00
Steven Allen
6adedd5011 chore(dep): update kbucket
Fixes a bug where we wouldn't be able to perform queries with a sparse but
non-empty routing table.
2019-12-11 19:42:12 +01:00
dependabot-preview[bot]
039825f76d
build(deps): bump github.com/multiformats/go-multiaddr
Bumps [github.com/multiformats/go-multiaddr](https://github.com/multiformats/go-multiaddr) from 0.1.2 to 0.2.0.
- [Release notes](https://github.com/multiformats/go-multiaddr/releases)
- [Commits](https://github.com/multiformats/go-multiaddr/compare/v0.1.2...v0.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-11 11:35:36 +00:00
Steven Allen
6028925020
Merge pull request #418 from libp2p/feat/refresh-and-wait
feat: refresh and wait
2019-12-10 18:04:36 +01:00
Steven Allen
0be0cbc50e feat: refresh and wait
We'd like to be able to refresh then _wait_ for the refresh to finish in the testground DHT tests. That way, we can:

1. Start and disable _auto_ refresh.
2. Bootstrap.
3. Refresh a couple of times till we're stable.
4. Wait to _stop_ refreshing.
5. Disconnect from and forget about all peers _not_ in our routing tables.
6. Run the actual tests without interference from the bootstrapping logic.
2019-12-10 15:41:20 +01:00
dependabot-preview[bot]
144317432c
build(deps): bump go.opencensus.io from 0.22.1 to 0.22.2
Bumps [go.opencensus.io](https://github.com/census-instrumentation/opencensus-go) from 0.22.1 to 0.22.2.
- [Release notes](https://github.com/census-instrumentation/opencensus-go/releases)
- [Commits](https://github.com/census-instrumentation/opencensus-go/compare/v0.22.1...v0.22.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-07 01:11:50 +00:00
Steven Allen
1320b07966
Merge pull request #412 from libp2p/dependabot/go_modules/github.com/stretchr/testify-1.4.0
build(deps): bump github.com/stretchr/testify from 1.3.0 to 1.4.0
2019-12-06 20:08:34 -05:00
Steven Allen
da497efa3d
Merge pull request #413 from libp2p/dependabot/go_modules/github.com/mr-tron/base58-1.1.3
build(deps): bump github.com/mr-tron/base58 from 1.1.2 to 1.1.3
2019-12-06 17:03:15 -05:00
dependabot-preview[bot]
22803380f7
build(deps): bump github.com/ipfs/go-datastore from 0.1.1 to 0.3.1
Bumps [github.com/ipfs/go-datastore](https://github.com/ipfs/go-datastore) from 0.1.1 to 0.3.1.
- [Release notes](https://github.com/ipfs/go-datastore/releases)
- [Commits](https://github.com/ipfs/go-datastore/compare/v0.1.1...v0.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-06 17:42:53 +00:00
dependabot-preview[bot]
6d0caddb24
build(deps): bump github.com/mr-tron/base58 from 1.1.2 to 1.1.3
Bumps [github.com/mr-tron/base58](https://github.com/mr-tron/base58) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/mr-tron/base58/releases)
- [Commits](https://github.com/mr-tron/base58/compare/v1.1.2...v1.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-06 17:42:11 +00:00
dependabot-preview[bot]
702557e6e0
build(deps): bump github.com/stretchr/testify from 1.3.0 to 1.4.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.3.0...v1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-06 17:41:44 +00:00
Steven Allen
0d48254082 chore(dep): update
Update deps:

* Switch to multiformats/go-base32
* Regenerate protobuf decoding code
2019-12-02 13:05:53 -05:00
Steven Allen
645ba5b650 fix(bootstrap): bootstrap sequentially
The default timeout is 10s so this won't take that long anyways. On the
other hand, if we do this all at once, we max the swarms dial queue.
2019-11-05 22:33:11 +00:00
Jorropo
0cf7de4977 Fixing for go 1.13 (see golang/go#34093). 2019-10-22 12:05:57 +02:00
Raúl Kripalani
e216d3cf6c
dep: upgrade xerrors and other dependencies. (#393) 2019-09-07 18:38:47 +01:00
Cole Brown
3f53841bef Bump go-libp2p, go-libp2p-swarm 2019-08-02 19:43:29 -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
Cole Brown
855b46d37e Address review comments
Update msgio to latest version
Use max size in msgio readers
Fix error handling in reads
2019-06-18 08:52:46 -04:00
Raúl Kripalani
31765355df
migrate to consolidated types. (#344) 2019-05-26 23:33:15 +01:00
Steven Allen
978eca5ea3
Merge pull request #340 from libp2p/feat/fewer-goroutines
reduce background goroutines
2019-05-24 09:08:02 -07:00
Hector Sanjuan
249eb090c5 Update deps to latest libp2p
This is a -u=patch update
2019-05-24 15:58:46 +02:00
Steven Allen
5bf9cf5e1a drop the go-context dependency
This was causing us to build up a bunch of background goroutines. Technically,
we should be resetting all these streams when the DHT stops. However, we don't
actually unregister stream handlers from the host so, really, nothing will
actually stop till the host stops. When it does, it'll kill all the streams
anyways.
2019-05-24 01:13:52 -07:00
Steven Allen
0d5dacd26d dep: update go-libp2p
Really deal with the deleted tag issue.
2019-05-21 20:26:51 -07:00
Steven Allen
5d726a5731 dep: update go-libp2p
Deal with renamed tags.
2019-05-21 17:28:09 -07:00