931 Commits

Author SHA1 Message Date
Steven Allen
8e39fcb2b3 test: only build curFileLimit when testing 2019-02-07 17:31:39 -08:00
Steven Allen
3d75af08ef gx publish 4.4.21 2019-02-07 15:32:20 -08:00
Matt Joiner
0ab2731196
Add go mod files (#251) 2019-02-08 10:11:08 +11:00
vyzo
353ea0110e
Merge pull request #250 from libp2p/gx/update
gx publish 4.4.20
2019-02-05 11:16:49 +02:00
vyzo
9aea9da229 gx publish 4.4.20 2019-02-05 11:13:23 +02:00
Matt Joiner
8a62a14374
Deflake TestFindPeerQuery (#245)
* Rework TestFindPeersQuery

Unravel the logic and create a minimal test case that isn't flaky.

* Use testing.T.Logf

* Skip the original test in short mode

* Add comments for the arguments to testFindPeerQuery

* Qualify aberrant package name

* Use redundant package names

* gx import testify 1.3.0.
2019-02-05 10:35:37 +11:00
vyzo
d422d90de7
Merge pull request #247 from avbasov/patch-1
Fix "no protocol with name dnsaddr" error
2019-02-04 14:35:41 +02:00
Matt Joiner
8b37385468 Rename log to logger 2019-02-03 13:14:35 +11:00
Steven Allen
ad151c1039
Merge pull request #248 from raulk/master
Fix a race in dial queue
2019-02-01 12:52:55 -08:00
Raúl Kripalani
94682b4df2 fix a race in dial queue. 2019-02-01 19:20:32 +00:00
Anatoliy Basov
e7a140b141
Fix "no protocol with name dnsaddr" error 2019-02-01 11:56:56 +02:00
Raúl Kripalani
ebcfcd46a6 make dial queue parameters configurable. 2019-02-01 13:43:27 +11:00
Raúl Kripalani
1b1fb7e04f
Merge pull request #241 from libp2p/dq-var-test-races
Fix races with DialQueue variables
2019-01-31 10:19:16 +00:00
Raúl Kripalani
46e8562fdc restore import aliases. 2019-01-31 10:10:25 +00:00
Matt Joiner
b598d08a51 Reduce noise in the bootstrap tests 2019-01-31 14:59:23 +11:00
Matt Joiner
7246a3b0f4 Fix races with DialQueue variables 2019-01-31 13:08:45 +11:00
Matt Joiner
0998477db1
Merge pull request #238 from libp2p/circleci
Fix CircleCI
2019-01-31 11:22:58 +11:00
Raúl Kripalani
7a255be653
Merge pull request #237 from raulk/feat/adaptive-dial-queue
Adaptive queue for staging dials
2019-01-30 23:38:53 +00:00
Raúl Kripalani
74d22f3f5e park waiters in slice; revise closure logic. 2019-01-30 23:25:10 +00:00
Matt Joiner
c06aea3c14 Reduce aggressive test
Doesn't pass in time with race detector enabled.
2019-01-31 10:17:34 +11:00
Matt Joiner
2c77e278c1 Add go mod CI test 2019-01-31 10:17:34 +11:00
Matt Joiner
2d2bb5513c
Tidy up bootstrapping (#235)
* Remove signal bootstrapping

Remove IpfsDHT.BootstrapOnSignal.

* Type check expected interfaces on IpfsDHT

* Simplify the bootstrap logic

* Tidy up a few other things

* Include BootstrapOnce

* Add comment about duplicating sanity checks

* Use existing import naming convention

* Defer error wrapping until we need it

* Restore existing query count behaviour
2019-01-31 10:06:56 +11:00
Raúl Kripalani
bf4b91ce4b harden tests. 2019-01-29 20:49:14 +00:00
Raúl Kripalani
f2df3ec540 fix shutdown logic; fix timer logic. 2019-01-29 20:49:04 +00:00
Raúl Kripalani
72f9d4c2c0 add godoc on global vars. 2019-01-29 20:48:38 +00:00
Raúl Kripalani
83660414ce cleanup channels on context cancellation. 2019-01-29 17:11:40 +00:00
Raúl Kripalani
abacfe5fc9 refactor interface of Consume(). 2019-01-29 16:47:42 +00:00
Raúl Kripalani
7cd14f5d1e replace concurrency level error with panic. 2019-01-29 16:34:39 +00:00
Raúl Kripalani
24f0a2dec8 remove unneeded lk; group global vars. 2019-01-29 16:15:40 +00:00
Raúl Kripalani
95a0975dd7 enhance logging and import prefixes. 2019-01-29 00:56:12 +00:00
Raúl Kripalani
f044043c3d adjust godoc. 2019-01-29 00:56:12 +00:00
Raúl Kripalani
5e74c4a6f2 introduce adaptive queue for DHT dials.
This patch introduces an adaptive dial queue that spawns a dynamically sized
set of goroutines to preemptively stage dials for later handoff to the DHT
protocol for RPC. It identifies backpressure on both ends (dial consumers and
dial producers), and takes compensating action by adjusting the worker pool.

We start with `DialQueueMinParallelism` number of workers (6), and scale up
and down based on demand and supply of dialled peers.

The following events trigger scaling:
- we scale up when we can't immediately return a successful dial to a new
  consumer.
- we scale down when we've been idle for a while waiting for new dial
  attempts.
- we scale down when we complete a dial and realise nobody was waiting for it.

Dialler throttling (e.g. FD limit exceeded) is a concern, as we can easily
spin up more workers to compensate, and end up adding fuel to the fire. Since
we have no deterministic way to detect this for now, we hard-limit concurrency
to `DialQueueMaxParallelism` (20).
2019-01-29 00:56:12 +00:00
Matt Joiner
bebd753a1d
Merge pull request #226 from libp2p/default-bootstrap-peers
Add the full libp2p default bootstrap peer list
gx/v4.4.20
2019-01-29 11:00:03 +11:00
Steven Allen
9e65f2946c
Merge pull request #232 from libp2p/revert-225-tidy-up-bootstrapping
Revert "Tidy up bootstrapping"
2019-01-24 14:40:47 -08:00
Steven Allen
201eea5e0b
Revert "Tidy up bootstrapping" 2019-01-24 14:06:38 -08:00
Matt Joiner
66cc80c81c
Merge pull request #225 from libp2p/tidy-up-bootstrapping
Tidy up bootstrapping
2019-01-25 08:42:25 +11:00
Matt Joiner
a59df7de13 Use existing import naming convention 2019-01-24 10:05:44 +11:00
Matt Joiner
7da25ec52b Add comment about duplicating sanity checks 2019-01-24 09:59:51 +11:00
Matt Joiner
9055bd6981 Include BootstrapOnce 2019-01-24 09:52:56 +11:00
Matt Joiner
c6e2fde1e3 Tidy up a few other things 2019-01-24 09:52:56 +11:00
Matt Joiner
f423e38edd Simplify the bootstrap logic 2019-01-24 09:52:56 +11:00
Matt Joiner
f91dc28913 Type check expected interfaces on IpfsDHT 2019-01-24 09:52:55 +11:00
Matt Joiner
69392ff66f Remove signal bootstrapping
Remove IpfsDHT.BootstrapOnSignal.
2019-01-24 09:52:55 +11:00
vyzo
3f37420d31
Merge pull request #227 from libp2p/revert-224-remove-signal-bootstrap
Revert "Remove signal bootstrapping"
2019-01-23 14:38:25 +02:00
Hector Sanjuan
110dae4320
Revert "Remove signal bootstrapping" 2019-01-23 13:28:20 +01:00
Matt Joiner
a9c746d42b Add the full libp2p default bootstrap peer list 2019-01-23 17:06:07 +11:00
Matt Joiner
838d43da02
Merge pull request #224 from libp2p/remove-signal-bootstrap
Remove signal bootstrapping
2019-01-23 09:38:35 +11:00
Matt Joiner
b33ea78537 Remove signal bootstrapping
Remove IpfsDHT.BootstrapOnSignal.
2019-01-22 15:47:33 +11:00
ZhengQi
9d60a686c0 add RoutingTable func (#217)
* add RoutingTable func

* fix gofmt
2019-01-22 04:46:41 +01:00
Gustvo Chain
70d5802fce Remove outdated package documentation
Both, dht.go and dht_bootstrap.go duplicate the package documentation.
The whole block had been moved to doc.go

Also query.go provides documentation for query package but now it
belongs to dht package, so it's been removed.
2019-01-09 14:21:14 +11:00