Commit Graph

243 Commits

Author SHA1 Message Date
Whyrusleeping
41d82eeeb5
Merge pull request #4733 from dirkmc/feat/namesys-value-count
Add options for record count and timeout for resolving DHT paths
2018-03-23 09:59:26 -07:00
Dirk McCormick
32ef57c476 Return ErrNotFound when zero values are returned from DHT namesys resolve
License: MIT
Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>
2018-03-21 22:58:32 -04:00
Dirk McCormick
350362ca1a Fix namesys opts package name
License: MIT
Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>
2018-02-28 17:11:46 -05:00
Dirk McCormick
d47ff797d0 Document namesys options
License: MIT
Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>
2018-02-28 17:06:31 -05:00
Dirk McCormick
e8f79c8803 Use variadic options
License: MIT
Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>
2018-02-28 16:57:58 -05:00
Jeromy
2e77f73d53 remove a spurious debug message
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2018-02-26 10:27:06 -08:00
Dirk McCormick
1abf8366ee Add options for record count and timeout for resolving DHT paths
License: MIT
Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>
2018-02-23 11:47:30 -05:00
Hector Sanjuan
54d87b4ce0 Extract: routing package to github.com/ipfs/go-ipfs-routing
This extracts the routing package to its own repository
(https://github.com/ipfs/go-ipfs-routing). History has
been preserved. The new module has been gx'ed and published.

Imports have been rewritten and re-ordered accordingly.

An internal dependency to go-ipfs/repo has been removed
by substituting it with the go-datastore.Batching interface.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2018-02-14 18:33:52 +01:00
Hector Sanjuan
7406a5f1b2 Extract: thirdparty/ds-help submodule
It has been moved to its own repository:

    * github.com/ipfs/go-ipfs-ds-help

History has been preserved. It has been published
with gx. Imports have been updated and re-ordered
accordingly.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2018-02-12 22:51:03 +01:00
Dirk McCormick
f829093c63 go fmt
License: MIT
Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>
2018-02-07 16:28:40 -05:00
Dirk McCormick
7b99538f3c namesys: discard records with invalid EOL in record selection
License: MIT
Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>
2018-02-07 16:18:12 -05:00
Dirk McCormick
84fe5827b9 namesys: more comments
License: MIT
Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>
2018-02-07 16:18:12 -05:00
Dirk McCormick
dbedee5940 namesys: differentiate between validation errors
License: MIT
Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>
2018-02-07 16:18:12 -05:00
Dirk McCormick
e980e68f86 Comment fixes
License: MIT
Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>
2018-02-07 16:18:12 -05:00
Dirk McCormick
dafa140e1f Code cleanup
License: MIT
Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>
2018-02-07 16:18:12 -05:00
Dirk McCormick
5e8c9481ee namesys: verify signature in ipns validator
License: MIT
Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>
2018-02-07 16:18:12 -05:00
Steven Allen
b2cbfd299c gx: update go-log
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-31 21:54:22 -08:00
Steven Allen
faae63fcf1 handle error from changed NewFloodSub method
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-28 14:11:05 -08:00
Steven Allen
5acbecc26b update go-lib2p-loggables
fixes a UUID bug I introduced (UUIDs were always an error value)

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-27 18:05:30 -08:00
Steven Allen
118ecb22cd remove new DHT record author check
We're going to just fix this a future commit. *This* change breaks publishing
IPNS records using alternative IPNS keys (because the author signature (peer ID)
differs from the record signature).

We're going to fix it by validating the IPNS signature and ditching the
author/signature fields.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-27 13:45:36 -08:00
Steven Allen
0d12a971ad namesys: remove unecessary peerID cast
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-25 15:13:20 -08:00
Dirk McCormick
fdb0046a17 Fix ipns validator key parsing
License: MIT
Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>
2018-01-25 15:13:19 -08:00
Dirk McCormick
f6d507b203 go fmt
License: MIT
Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>
2018-01-25 15:13:19 -08:00
Dirk McCormick
b90d7bd7b0 Remove unneccesary split in IpnsValidator
License: MIT
Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>
2018-01-25 15:13:19 -08:00
Dirk McCormick
281d5eafb4 Update ipns validator
License: MIT
Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>
2018-01-25 15:13:18 -08:00
Steven Allen
fe8846fcd7 gx: mass update
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-24 15:58:44 -08:00
Steven Allen
dfe7ef4fcf gx: update go-multihash
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-12-14 13:09:51 -08:00
Lars Gierth
5d6b3c5701 namesys: degrade most logging to debug level
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2017-12-07 00:21:57 +01:00
Steven Allen
924b2a0a34 don't add nodes to DAG twice.
Now that we add nodes to the DAG when pinning, don't bother adding them twice.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-12-03 19:02:09 -08:00
Łukasz Magiera
6401a9191e gx: Update go-datastore to 1.4.0
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-12-02 14:55:26 -08:00
Whyrusleeping
bc7124226c
Merge pull request #4440 from ipfs/fix/ipns-repub
Fix various IPNS issues
2017-12-01 17:30:06 +01:00
Steven Allen
228c5552ab always obey the IPNS rebroadcast interval if it's smaller
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-11-29 15:54:06 -08:00
Steven Allen
fd2d63c5ba document ipns republisher variables
(makes code climate happy)

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-11-29 15:46:34 -08:00
Steven Allen
40b3a72498 retry publishing IPNS records every 5 minutes on failure
This way, if we *happen* to be offline while attempting a publish, we don't wait
the full interval.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-11-29 15:29:25 -08:00
Steven Allen
d8de88c4b6 publish ipns records on start
(after a delay of 1 minute)

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-11-29 15:24:27 -08:00
vyzo
e45df729be namesys/pubsub: publisher and resolver
Commits:
namesys: pubsub Publisher and Resolver
namesys/pubsub: pacify code climate.
namesys/pubsub: timeout for rendezvous
namesys/pubsub: filter self in bootstrap connections
namesys/pubsub: Publish to the correct topic

License: MIT
Signed-off-by: vyzo <vyzo@hackzen.org>

namesys/pubsub: unit  test

Commits:
namesys/pubsub: test
namesys/pubsub_test: pacify code climate
namesys/pubsub: update test to use extant mock routing

License: MIT
Signed-off-by: vyzo <vyzo@hackzen.org>

namesys/pubsub: integrate namesys pubsub

namesys: integrate pubsub resolvers
namesys/pubsub_test: tweak delays
- trying to make travis happy.
namesys/pubsub: fix duplicate bootstraps
- subscription key is topic, not ipnskey.
namesys/pubsub: no warning needed on cancellation
namesys/pubsub: warning for receive errors
- and more informative error messages at that.
namesys/pubsub_test: smaller test
- make it work with seemingly low fdlimits in travis/macosx.
  also, more informative test failures.
namesys/pubsub: add delay to let pubsub perform handshake
namesys/pubsub: update gx imports
namesys/pubsub_test: preconnect publisher, reduce delays
- preconnects the publisher to the receivers in order to avoid bootstrap
  flakiness with connectivity problems in travis.
  reduces sleeps to 1s for flood propagation (3s seems excessive with 5 hosts).
namesys/pubsub: drop named return values in resolveOnce
- per review comment.
namesys/pubsub: check errors
namesys/pubsub: store bytes in resolver datastore
namesys/pubsub: resolver Cancel
- for canceling subscriptions, pre whyrusleeping's request.
namesys/pubsub: fix resolution without /ipns prefix
- also improve the logging a bit.
namesys/pubsub: don't resolve own keys through pubsub
namesys/pubsub: signal ErrResolveFailed on resolution failure
namesys/pubsub: use sync datastore, resolver lock only for subs
namesys/pubsub_test: coverage for Cancel

License: MIT
Signed-off-by: vyzo <vyzo@hackzen.org>

namesys/pubsub: parallelize dht and pubsub publishing

Commits:
namesys/pubsub: code cosmetics
namesys: parallelize publishing with dht and pubsub
namesys/pubsub: periodically reprovide topic rendezvous
namesys/pubsub: cancelation for rendezvous goroutine
namesys/pubsub: log ipns record seqno on publish

License: MIT
Signed-off-by: vyzo <vyzo@hackzen.org>

namesys/pubsub: error checking

License: MIT
Signed-off-by: vyzo <vyzo@hackzen.org>

namesys/pubsub: --enable-namesys-pubsub option and management

Commits:
package.json: update go-libp2p-blankhost
namesys: fix stale package imports
update go-testutil
namesys/pubsub: reduce bootstrap provide period to 8hr
namesys/pubsub: try to extract the key from id first
option to enable ipns pubsub: --enable-namesys-pubsub
ipfs name pubsub management subcommands
corehttp/gateway_test: mockNamesys needs to implement GetResolver
pacify code climate

License: MIT
Signed-off-by: vyzo <vyzo@hackzen.org>

namesys/pubsub: pubsub sharness test

test/sharness: test for ipns pubsub
namesys/pubsub: return boolean indicator on Cancel
package.json: remove duplicate entry for go-testutil
update gx deps, testutil to 1.1.12
fix jenkins failure: use tabs in t0183-namesys-pubsub
t0183: use 4 spaces for tabification

License: MIT
Signed-off-by: vyzo <vyzo@hackzen.org>

namesys/pubsub: update for new command interface

License: MIT
Signed-off-by: vyzo <vyzo@hackzen.org>

namesys/pubsub: fix sharness test for broken MacOS echo

echo -n "" should print -n, but hey it's a mac.

License: MIT
Signed-off-by: vyzo <vyzo@hackzen.org>
2017-11-21 14:55:54 -08:00
Steven Allen
76e1da02a8 gx: massive update
Note: This commit is technically broken. However, I need to make a bunch of
cmds changes to make this work and I'd rather not bundle both changes into a
single commit.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-11-20 22:20:27 -08:00
keks
0d9d21875c compatible to js-ipfs-api
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2017-11-17 15:22:42 +01:00
Jan Winkelmann
f287524949 cmd: use go-ipfs-cmds
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2017-11-17 15:22:41 +01:00
Steven Allen
2f9e9ec571 gx update go-peerstream, go-libp2p-floodsub
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-10-19 08:20:35 -07:00
Jeromy
94ec788555 update deps for new connmgr code
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-10-14 05:38:52 -07:00
vyzo
4f1edf2570 update go-testutil to 1.1.12
License: MIT
Signed-off-by: vyzo <vyzo@hackzen.org>
2017-10-05 17:11:39 +03:00
Steven Allen
3f6df3a5f4 update yamux
We need to cancel out all readers/writers on stream reset.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-09-15 18:56:44 -07:00
Steven Allen
8deaaa8d8c gx: update go-stream-muxer
Introduces a new Reset method on streams that kills both sides of the
connection. Close now officially just closes the write side (what it did all
along...)

* Also pull through shiny new go-multiplexer fixes.
* Also pull in go-reuseport update.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-09-14 12:06:44 -07:00
Jeromy
0eba4f3138 gx: update go-ws-transport
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-09-05 16:18:19 -07:00
Steven Allen
70d6629940 gx: update go-cid, go-multibase, base32
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-09-01 17:46:49 -07:00
Kevin Atkinson
90d9c95240 Fix broken import in publisher_test.go.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-08-30 00:27:54 -04:00
Jeromy Johnson
d50a2b56a8 Merge pull request #4020 from JustinDrake/master
Do not publish public keys extractable from ID
2017-08-29 16:39:30 -07:00
Łukasz Magiera
e34a5e9c0d gx: update go-reuseport
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-08-23 16:32:32 +02:00
Justin Drake
cf5618c211 Do not publish public keys extractable from ID (with tests)
License: MIT
Signed-off-by: Justin Drake <drakefjustin@gmail.com>
2017-08-17 08:10:42 +01:00