Steven Allen
2a39785d3f
fix(options): make the disable providers/values options consistent
2019-12-06 09:47:22 -05:00
Steven Allen
ba86f51884
fix: return a closed channel from FindProvidersAsync when providers are disabled.
2019-12-06 09:27:09 -05:00
Steven Allen
c2b72b250d
doc(options): document that disabling values/providers should only be done on forked dhts
2019-12-05 19:11:46 -05:00
Steven Allen
52747fc1f0
feat: allow disabling value and provider storage/messages
...
fixes #274
2019-12-05 19:11:46 -05:00
Steven Allen
a530368fe0
Merge pull request #411 from libp2p/chore/update-deps
...
chore(dep): update
v0.3.1
2019-12-02 13:13:51 -05: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
4b7d6fb886
Merge pull request #410 from aarshkshah1992/feat/config-record-maxage
...
Make max record age configurable
2019-11-14 20:25:44 -08:00
Aarsh Shah
7a39667d70
make max record age configurable
2019-11-15 10:54:09 +08:00
Steven Allen
8ecf9380a4
Merge pull request #405 from libp2p/feat/simplify-bootstrapping
...
fix and simplify some bootstrapping logic
v0.3.0
2019-11-06 00:36:08 +00:00
Raúl Kripalani
a33b0b97a4
inline struct for RoutingTable config.
2019-11-05 23:55:32 +00:00
Steven Allen
4bc0480ede
doc(bootstrap): document minRTRefreshThreshold
2019-11-05 23:45:07 +00:00
Steven Allen
8e9ecdbc98
fix(bootstrap): include the error in the bootstrap failure warning
2019-11-05 23:42:53 +00:00
Steven Allen
b8eb083e46
chore(bootstrap): rename scanInterval to refreshTicker
2019-11-05 23:42:22 +00:00
Steven Allen
76f388b623
chore(bootstrap): reduce indent level
2019-11-05 23:41:24 +00:00
Steven Allen
4eaf4293dc
fix(bootstrap): use the correct context
2019-11-05 23:40:46 +00:00
Steven Allen
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
Steven Allen
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
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
Steven Allen
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
Steven Allen
4fd64988b5
Merge pull request #403 from aarshkshah1992/feat/finish-auto-bootstrap
...
feat(bootstrap): take autobootstrap to completion
2019-11-05 11:20:41 +00:00
Steven Allen
2fdad28d5c
chore(doc): fix comments
2019-11-05 11:15:26 +00:00
Steven Allen
98cf91494d
chore(bootstrap): remove unecessary request structure
2019-11-05 11:15:23 +00:00
Aarsh Shah
632f3c5cb5
better handling for disable bootstrap option
2019-11-03 19:57:50 +08:00
Aarsh Shah
da6edafb21
make Bootstrap() async and latestSelfWalk a dht field
2019-11-02 11:37:44 +08:00
Aarsh Shah
7cce5bdd96
make bootstrap synchronous & get tests to work
2019-11-02 00:37:15 +08:00
Steven Allen
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
Steven Allen
9c020873ac
Merge pull request #398 from Jorropo/fix/go1.13
...
Fixing for go 1.13
2019-10-22 19:34:04 +09:00
Jorropo
0cf7de4977
Fixing for go 1.13 (see golang/go#34093 ).
2019-10-22 12:05:57 +02:00
Steven Allen
315504eb15
Merge pull request #384 from aarshkshah1992/feature/correct-bootstrapping
...
Feature/correct bootstrapping
2019-10-11 14:19:05 +09:00
Aarsh Shah
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
Aarsh Shah
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
Aarsh Shah
5da16344fe
refresh bucket only when query is successful
2019-10-11 13:14:07 +09:00
Steven Allen
232357eab2
chore: smaller diff
2019-10-11 13:14:07 +09:00
Steven Allen
14545294e3
dep: update go-libp2p-kbucket
2019-10-11 13:14:07 +09:00
aarshkshah1992
585d6725be
refresh a bucket whenever we lookup a key in it
2019-10-11 13:13:53 +09:00
Aarsh Shah
5329454a0f
removed cfg.Queries param from bootstrap
2019-10-11 13:13:53 +09:00
Aarsh Shah
f7353aac3b
reset timer on bucket
2019-10-11 13:13:53 +09:00
Aarsh Shah
d53dfd6a86
changed bootstrapping logic
2019-10-11 13:13:53 +09:00
Raúl Kripalani
fed99afe6e
Make routing table bucket size configurable ( #396 )
v0.2.2
2019-10-04 22:12:00 +09:00
Raúl Kripalani
e216d3cf6c
dep: upgrade xerrors and other dependencies. ( #393 )
v0.2.1
2019-09-07 18:38:47 +01:00
Steven Allen
96d9823513
Merge pull request #390 from libp2p/fix/389
...
metrics: fix memory leak
2019-09-04 17:06:20 -07:00
Steven Allen
3d68f5bf1f
metrics: fix memory leak
...
fixes #389
Credit goes to @sidenaio for finding this.
2019-09-04 16:06:10 -07:00
bigs
a12e621d84
Merge pull request #380 from libp2p/feat/update-tests
...
Update tests to use Ed25519 when acceptable.
v0.2.0
2019-08-02 15:54:02 -08:00
Cole Brown
3f53841bef
Bump go-libp2p, go-libp2p-swarm
2019-08-02 19:43:29 -04:00
Cole Brown
2ed899539c
Remove weak rsa key flag
2019-08-02 14:19:58 -04: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
Thomas Preindl
8a40bef78c
fix deadline calculation in Provide function of routing.go ( #377 )
2019-07-23 15:19:50 -07:00
Aarsh Shah
36578e2be3
Striped locks for atomic Dht updates ( #374 )
...
Implement striped locking for datastore puts.
2019-07-22 20:47:45 -07:00
Steven Allen
3c72a7c61f
Merge pull request #351 from libp2p/fix/hanging-provide
...
Add timeout
2019-06-30 10:20:23 +02:00