Commit Graph

83 Commits

Author SHA1 Message Date
ef319676a9 chore: rename bootstrap to refresh
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.
2019-11-05 23:33:53 +00:00
71c05a8cd0 fix(bootstrap): don't bootstrap more than 16 buckets
We can't generate target IDs in buckets beyond bucket 15 so there's no point.
2019-11-05 22:33:11 +00:00
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
ed244cd485 feat(bootstrap): simplify bootstrapping
* 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.
2019-11-05 22:33:05 +00:00
2fdad28d5c chore(doc): fix comments 2019-11-05 11:15:26 +00:00
98cf91494d chore(bootstrap): remove unecessary request structure 2019-11-05 11:15:23 +00:00
632f3c5cb5 better handling for disable bootstrap option 2019-11-03 19:57:50 +08:00
da6edafb21 make Bootstrap() async and latestSelfWalk a dht field 2019-11-02 11:37:44 +08:00
7cce5bdd96 make bootstrap synchronous & get tests to work 2019-11-02 00:37:15 +08:00
e2842f0317 feat(bootstrap): autobootstrap
1. Auto bootstrap on start.
2. Make `Bootstrap(ctx)` trigger a bootstrap but not _start_ the bootstrapping
   process.
2019-11-01 00:38:28 -07:00
00fffba0aa Update dht_bootstrap.go
1) on connecting to a new peer  -> trigger self & bucket bootstrap if RT size goes below thereshold
2) accept formatting & doc suggestions in the review
3) remove RT recovery code for now -> will address in a separate PR once #383 goes in

changes as per review
2019-10-11 14:10:19 +09:00
f4630f62d5 1) seed RT whenever it becomes empty
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
2019-10-11 13:17:36 +09:00
14545294e3 dep: update go-libp2p-kbucket 2019-10-11 13:14:07 +09:00
f7353aac3b reset timer on bucket 2019-10-11 13:13:53 +09:00
d53dfd6a86 changed bootstrapping logic 2019-10-11 13:13:53 +09:00
31765355df migrate to consolidated types. (#344) 2019-05-26 23:33:15 +01:00
1fe2fd55b9 Get rid of annoying "bootstrap: not found" error (#299)
It's impossible to find the self ID in the DHT because of this statement ac6772539b/handlers.go (L257)
So maybe we should ignore the "not found" error in this case, like we do it for the random walk.
2019-03-14 15:20:56 +11:00
07573a0bc4 Log before and after bootstrap sub-queries (#293) 2019-03-12 13:26:54 +11:00
08c34b4d83 New node methods for tools and otherwise (#265)
* Add IpfsDHT.{Bootstrap{Random,Self},Peer{Id,Key}}
* Include client mode tests, support for Ping, and uncruft setupDHTs
* Include xerrors in deps
2019-03-06 08:10:38 +11:00
2b9f6a6a13 gx publish 4.4.30 2019-02-27 05:21:11 +00:00
d37d69ec4c gx publish 4.4.29 2019-02-26 22:28:19 +00:00
61d3de0d41 Fix deadline handling in runBootstrap subqueries 2019-02-15 14:53:03 +11:00
f7b176604f Change the bootstrapping subquery log level 2019-02-15 14:53:03 +11:00
d422d90de7 Merge pull request #247 from avbasov/patch-1
Fix "no protocol with name dnsaddr" error
2019-02-04 14:35:41 +02:00
8b37385468 Rename log to logger 2019-02-03 13:14:35 +11:00
e7a140b141 Fix "no protocol with name dnsaddr" error 2019-02-01 11:56:56 +02:00
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
bebd753a1d Merge pull request #226 from libp2p/default-bootstrap-peers
Add the full libp2p default bootstrap peer list
2019-01-29 11:00:03 +11:00
201eea5e0b Revert "Tidy up bootstrapping" 2019-01-24 14:06:38 -08:00
a59df7de13 Use existing import naming convention 2019-01-24 10:05:44 +11:00
7da25ec52b Add comment about duplicating sanity checks 2019-01-24 09:59:51 +11:00
9055bd6981 Include BootstrapOnce 2019-01-24 09:52:56 +11:00
c6e2fde1e3 Tidy up a few other things 2019-01-24 09:52:56 +11:00
f423e38edd Simplify the bootstrap logic 2019-01-24 09:52:56 +11:00
69392ff66f Remove signal bootstrapping
Remove IpfsDHT.BootstrapOnSignal.
2019-01-24 09:52:55 +11:00
110dae4320 Revert "Remove signal bootstrapping" 2019-01-23 13:28:20 +01:00
a9c746d42b Add the full libp2p default bootstrap peer list 2019-01-23 17:06:07 +11:00
b33ea78537 Remove signal bootstrapping
Remove IpfsDHT.BootstrapOnSignal.
2019-01-22 15:47:33 +11:00
c419fc3497 remove duplicate pkg documentation
Also contained in "dht.go" and prints twice in godoc.
2018-12-26 03:05:36 -05:00
d4fa80e287 gx publish 4.3.0 2018-07-31 18:19:24 -04:00
7c151dadda typo in dht_bootstrap.go 2018-07-28 15:54:01 +02:00
9d8818b994 Remember to bootstrap immediately ;_; 2018-07-24 11:41:59 -04:00
e8d32a56be Simplify bootstrap loop 2018-07-23 18:32:52 -04:00
a49b5489b9 Use Process.Go() for bootstrap routine 2018-07-02 11:18:47 -04:00
52d4e6a955 Remove redundant continue 2018-06-29 12:37:55 -04:00
23ed4e6789 Bootstrap immediately after calls to BootstrapWithConfig 2018-06-29 12:32:09 -04:00
2832d0325c find self in DHT when bootstrapping
This ensures that our neighbors learn about us so that other peers on the
network *looking* for us can actually find us.

Also:

* Remove dead, racy code.
* Set independent timeouts per bootstrap query.

fixes #147
2018-06-09 08:48:33 -07:00
db3b915a17 docs: remove mentions of coral, it's not implemented 2018-03-28 03:44:49 +02:00
7a4eb0f079 refactor common woker code for BootstrapWithConfig and BootstrapOnSignal 2016-12-08 19:37:07 +02:00
7a658d1e77 fix ticker leak in BootstrapWithConfig 2016-12-08 11:58:06 +02:00