211 Commits

Author SHA1 Message Date
Łukasz Magiera
307660c78d SearchValue: Make -1 quorum mean infinite on get 2018-08-10 12:06:32 +02:00
Łukasz Magiera
e28b133f80 SearchValue: add backward-compatible GetValues 2018-08-10 12:06:32 +02:00
Łukasz Magiera
547c0a7170 SearchValue: simplify error handling further 2018-08-10 12:06:32 +02:00
Łukasz Magiera
64d1622c72 SearchValue: simplify error handling 2018-08-10 12:06:32 +02:00
Łukasz Magiera
e260fe510f Implement SearchValue 2018-08-10 12:06:32 +02:00
Steven Allen
4d76fd28ed upgrade protobuf and switch to bytes keys
fixes #177
2018-08-07 18:50:04 -07:00
Steven Allen
993399a183 don't treat a canceled context as a successful query
fixes #172
2018-07-10 17:29:02 +02:00
Steven Allen
97131ef4c2 remove random print from test 2018-06-15 14:13:07 -07:00
Steven Allen
ed35a2d66c return ErrNotFound when offline routing is requested and we have no local value
err is nil in this case
2018-06-13 19:20:00 -07:00
Steven Allen
6c4aa35c94 validate and compare record on local put 2018-06-13 17:01:53 -07:00
Steven Allen
39907a7658 reuse getRecordFromDatastore in getValue
Also, double check the key (should be impossible but the check is cheep).
2018-06-13 16:59:12 -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
cad57471f5 update for the routing refactor
GetValues was very DHT specific so the routing interface has been updated to
remove that function. Instead, it has introduced general-purpose options.

This is a minimal alternative to #141 to avoid bundling too many changes
together.
2018-05-31 17:47:35 -07:00
vyzo
ae5dd23eb2 mutex protect peersSeen map in FindPeersConnectedToPeer 2018-04-29 21:53:34 +03:00
Steven Allen
058c472825
Merge pull request #134 from MichaelMure/review
document and clean small things
2018-04-01 17:08:02 +00:00
Michael Muré
2026fcb558
document and clean small things 2018-04-01 12:38:15 +02:00
Lars Gierth
db3b915a17 docs: remove mentions of coral, it's not implemented 2018-03-28 03:44:49 +02:00
Dirk McCormick
7808271093 Ensure that records published by this peer do not immediately expire 2018-03-12 13:45:02 -04:00
Dirk McCormick
a9c59f3f15 Remove record signature verification 2018-02-07 14:52:15 -08:00
Forrest Weston
70fc1084b6 Add Event logging to dht routing
License: MIT
Signed-off-by: ForrestWeston <forrest@protocol.ai>
2017-12-11 14:00:16 -08:00
Steven Allen
491afc8e27 optimize allocations
Try to preallocate slices up-front instead of repeatedly reallocating.
2017-12-05 15:46:24 -08:00
Herman Junge
655ea5e262 Add queried peer ID to query event 2017-07-14 22:08:13 -04:00
Jeromy
04ee593ef6 update to use no-broadcast option 2017-05-16 18:23:18 -07:00
Jeromy
52e620c6ef Add addresses from received provider records
Thanks @mildred for catching this and providing a patch.
2017-03-24 10:28:37 -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
6894f33507 update dependencies after package extraction funtime 2016-10-05 12:34:28 -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
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
be1a0dd77a dht: add in code to detect and diagnose #3032
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-08-03 18:19:47 -07:00
Jeromy Johnson
034ee297f2 Merge pull request #2941 from ipfs/feat/backoff-clear-connect
Feat/backoff clear connect
2016-07-05 15:19:31 -07:00
Jeromy
c3a2a104b9 fix handling of dht records and local fixups
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-07-05 12:34:03 -07:00
Jeromy
95553964a2 update go-libp2p
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-07-04 12:27:26 -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 Johnson
3f05aa0579 Merge pull request #2853 from ipfs/feature/decapitalize-Debug
Decapitalized log.Debug messages
2016-06-17 10:26:20 -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
Richard Littauer
2203d3b1fe Decapitalized log.Debug messages
According to golang standards, these should not be capitalized nor having a trailing period, AFAIK.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-06-15 08:56:34 +01:00
Jeromy
9f37aaa272 a few small changes to make the dht more efficient
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-06-11 17:08:34 -07: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
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
Richard Littauer
761f5c277e Capitalized NOTE, first letter of following word
License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-04-29 16:57:19 -04: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
Lars Gierth
38ff911ada Use extracted go-libp2p-crypto, -secio, -peer packages
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-04-16 21:48:06 -07:00