171 Commits

Author SHA1 Message Date
Erin Swenson-Healey
15fe77a9f5 add test for DHTs using different protocols 2018-06-01 16:06:18 -07:00
Erin Swenson-Healey
3b148d2b88 make Protocols variadic, for usability 2018-06-01 15:54:53 -07:00
Erin Swenson-Healey
d94deae41d make DHT protocols pluggable 2018-06-01 14:55:16 -07:00
Steven Allen
c0d3351b8d revert interface changes and add options
Instead of changing the existing constructors, add a new DHT constructor that
takes options (and add DHT options).
2018-05-31 17:54:24 -07:00
Steven Allen
3befc403d7 require that the validator be explicitly passed in
Note: this does mean that the DHT won't work with peer keys by default and that
the constructor signature changes. Given all the changes that'll come with the
libp2p refactor, I don't feel too bad about this.
2018-05-31 17:54:19 -07:00
Steven Allen
97741ed0a8
Merge pull request #122 from dirkmc/fix/select-best-rec-on-put
Disallow overwriting new records with older records on DHT PUT
2018-03-15 02:10:31 +00:00
Steven Allen
b02b9245be correctly tear-down bootstrapper
1. We need to close the process to tear it down.
2. Closing the signal channel will cause the goprocess timer to fire repeatedly so let's not do that.
3. Don't leak a goroutine (the amplify one).
2018-03-14 14:03:22 -07:00
Steven Allen
87783c0ed0 better cancel/close after tests 2018-03-14 14:03:11 -07:00
Dirk McCormick
bdf2cdc986 Disallow overwriting new records with older records on DHT PUT 2018-03-05 15:13:12 -05:00
Steven Allen
1134fa1eb2 nit: be less noisy when testing
These aren't errors, don't log them as such.
2018-02-11 11:36:59 -08:00
Dirk McCormick
a9c59f3f15 Remove record signature verification 2018-02-07 14:52:15 -08:00
Dirk McCormick
ed147fe885 Use record ValidationRecord in tests 2018-01-19 20:12:15 -08:00
Dirk McCormick
ce278c1000 Just pass the record object to validation functions 2018-01-19 20:12:15 -08:00
Steven Allen
df33f2b6bf remove dead test code 2017-12-11 16:59:24 -08:00
Jeromy
4237ef0939 fix memory leak holding onto streams unnecessarily 2017-09-19 12:00:42 -07:00
Jeromy
04ee593ef6 update to use no-broadcast option 2017-05-16 18:23:18 -07:00
Jeromy
00b46e0cf7 Fixes for dht findpeer queries
First, we use Alpha instead of K as the number of peers we grab from the
routing table (as per the kademlia paper).

Second, we don't use a size limited set for the 'GetClosestPeers' query.
We're going to process more than K peers before we find the K closest
peers.

Third, Change GetClosestPeers to actually return the K Closest peers,
not a hodge podge of peers that it found on the way to finding the
closest peers.
2017-03-05 21:36:46 -08:00
Jeromy
eafc461af8 WIP: add test to reproduce getclosestpeers bug 2017-03-05 20:17:38 -08:00
Jeromy
9f89eb51a9 update base32 package and fix tests 2016-11-21 20:10:14 -08:00
Jeromy
9bd5c5d7e7 fix filtering bug in find closest peers 2016-11-01 13:42:22 -07:00
Jeromy
6894f33507 update dependencies after package extraction funtime 2016-10-05 12:34:28 -07:00
Jeromy
2604f3422f make go vet happy 2016-09-30 11:08:16 -07:00
Jeromy
e00b3ca0a4 use stdlib context and clean up deps 2016-09-30 10:24:03 -07:00
Jeromy
c372d79e42 switch to strings and cids instead of keys 2016-09-30 10:13:57 -07:00
Jeromy
5235d5f0d3 Implement 'client only' dht logic to not have to serve dht queries 2016-09-23 23:45:35 -07:00
Jeromy Johnson
13c18b0c54 Merge pull request #7 from libp2p/fix/dht-handle-panic
dht: protect against a panic in case record on pbmessage is nil
2016-09-13 16:45:37 -04:00
Jeromy
49aab9a2cc fix go vet issues and add go vet to CI scripts 2016-09-13 13:20:26 -07:00
Jeromy
d03fffba86 dht: protect against a panic in case record on pbmessage is nil
From ipfs/go-ipfs#8f362d2b1500809cbae2ee08c2b42a6f226a10b8
2016-09-13 13:14:39 -07:00
George Antoniadis
30d43d22e0 Fix dependencies 2016-09-02 20:21:23 +01:00
George Antoniadis
5f3e63aa46 Undo gx rewrites and add gx package.json 2016-08-21 17:18:58 +01:00
Jeromy
1bd98f05f4 use batching datastore for providers storage
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-07-26 10:48:25 -07:00
Jeromy
95553964a2 update go-libp2p
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-07-04 12:27:26 -07:00
Jeromy
29c36b20d8 update go-datastore changes 0.1.2
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-07-01 22:40:57 -07:00
Jeromy
7c91e7bdd1 encode keys to datastore with base32 standard encoding
Fixes #2601

Also bump version to 0.4.3-dev

License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-07-01 14:15:06 -07:00
Jakub Sztandera
22af8d1151 Update go-log in whole dependency tree (#2898)
* Update golog in go-ipfs

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update go-libp2p for go-log

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update go-libp2p-secio for go-log

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update go-libp2p-crypto for go-log

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update go-libp2p-peer for go-log

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Import peersore, it wasn't imported

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update peerstore

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update peer

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update secio

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update go-libp2p

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-06-24 09:38:07 -07:00
Jeromy
47d10d7be6 update go-libp2p to 3.3.4
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-06-15 13:04:49 -07:00
Jakub Sztandera
478d32510a Remove errors pointed out by govet
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-06-14 13:40:16 +02:00
Jakub Sztandera
3ac45d1425 Import go-datastore to gx
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-06-12 08:47:15 +02:00
Jakub Sztandera
441d33addf Remove go-datastore from Godeps
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-06-12 08:23:43 +02:00
Jeromy
63b6db0589 pull in libp2p updates with utp fixes
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-06-11 10:33:44 -07:00
Jakub Sztandera
3e1ec6172d Fix typo in test
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-06-10 00:50:50 +02:00
Jakub Sztandera
615497928c Add some sanity tests for the misdial failure
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-06-10 00:11:00 +02:00
Jeromy
71a8519372 update libp2p to version 3.2.2
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-06-07 00:20:06 -07:00
Jeromy
5f777f323b update libp2p to v3.3.1
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-06-01 16:45:46 -07:00
Jeromy
b0e5f253f9 update libp2p to v3.2.3
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-05-30 22:14:21 -07:00
Jeromy
26beb1f3d0 update go-libp2p 3.2.2, nil maddr fixes
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-05-17 10:23:10 -07:00
Jeromy
c81d962885 update libp2p to v3.2.1
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-05-16 11:22:36 -07:00
Jeromy
d6e7c3de0f update deps to introduce yamux hang fix
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-05-13 13:42:46 -07:00
Jeromy
b9f86c8c87 update libp2p with go-multiaddr and go-stream-muxer updates
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-05-10 16:06:28 -07:00
Jeromy
8cd54dd9d8 update libp2p with utp dep
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-04-27 14:10:54 -07:00