Commit Graph

1065 Commits

Author SHA1 Message Date
Wyatt Daviau
9025baa12a streaming bugs fixed
dummy echo server implemented on cluster service api
manual tests with files work
wireshark examination shows transfer-encoding = chunked

License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2018-08-07 20:11:23 +02:00
Wyatt Daviau
9e3e42b19d client streams files
License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2018-08-07 20:11:23 +02:00
Wyatt Daviau
9521885b63 ipfs-cluster-ctl add
parse file path arguments to cmdkit.File objects
no support for directories, symlinks or recursive add

License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2018-08-07 20:11:13 +02:00
Hector Sanjuan
ac082929a9
Merge pull request #492 from ipfs/doc/user-registry
Readme: add link to user registry form
2018-07-30 14:55:26 +02:00
Hector Sanjuan
173dd14f4b Readme: add link to user registry form
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-07-24 17:17:45 +02:00
Hector Sanjuan
d3d1f960f5 Feat: Enable DHT-based peer discovery and routing for cluster peers
This uses go-libp2p-kad-dht as routing provider for the Cluster Peers.

This means that:

* A cluster peer can discover other Cluster peers even if they are
not in their peerstore file.
* We remove a bunch of code sending and receiving peers multiaddresses
when a new peer was added to the Cluster.
* PeerAdd now takes an ID and not a multiaddress. We do not need to
ask the new peer which is our external multiaddress nor broadcast
the new multiaddress to everyone. This will fix problems when bootstrapping
a new peer to the Cluster while not all the other peers are online.
* Adding a new peer does not mean to open connections to all peers
anymore. The number of connections will be made according to the DHT
parameters (this is good to have for future work)

The that detecting a peer addition in the watchPeers() function does
no longer mean that we have connected to it or that we know its
multiaddresses. Therefore it's no point to save the peerstore in these
events anymore.

Here a question opens, should we save the peerstore at all, and should we
save multiaddresses only for cluster peers, or for everyone known?
Currently, the peerstore is only updated on clean shutdown,
and it is updated with all the multiaddresses known, and not limited to
peer IDs in the cluster, (because, why not).

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-07-24 15:33:41 +02:00
Hector Sanjuan
99aea7ba79
Merge pull request #482 from ipfs/update/libp2p-6
Update the libp2p dependency to version 6.0.5
2018-06-29 10:25:37 +02:00
Hector Sanjuan
df5544952a Update the libp2p dependency to version 6.0.5
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-06-28 13:27:02 +02:00
Hector Sanjuan
8682780cde
Merge pull request #472 from Laevos/fix/traviscifork_1
Fix #465: Remove unneeded repotoken from goveralls
2018-06-22 21:39:54 +02:00
Lilith McMullen
5f3d95e51c remove env/secure section from travis yml
License: MIT
Signed-off-by: Lilith McMullen <iggnsthe@live.com>
2018-06-21 13:02:42 -05:00
Lilith McMullen
5100fe7b08 Fix #465: Remove unneeded repotoken from goveralls
License: MIT
Signed-off-by: Lilith McMullen <iggnsthe@live.com>
2018-06-20 12:34:33 -05:00
Hector Sanjuan
ac989dcd7b
Merge pull request #469 from Laevos/feat/increaseStateSyncInterval
Fix #468: Increase StateSyncInterval to 10 minutes
2018-06-20 11:25:30 +02:00
Laevos
1b0eb8d27a Fix #468: Increase StateSyncInterval to 10 minutes
License: MIT
Signed-off-by: Lilith McMullen <iggnsthe@live.com>
2018-06-19 19:42:29 -05:00
Hector Sanjuan
6e760a72fd
Merge pull request #464 from whilei/gofmt-2018-Jun-13-23-06
all: gofmt
2018-06-14 12:01:54 +02:00
ia
3c1bd32e8b all: gofmt
Run standard gofmt command on project root.

License: MIT
Signed-off-by: Isaac Henri Ardis <isaac.ardis@gmail.com>
2018-06-14 11:55:03 +02:00
Hector Sanjuan
1f51038d93
Merge pull request #463 from ipfs/fix/462-dns-ipfs-api
Fix #462: Support DNS multiaddresses for node_multiaddress
2018-06-12 17:03:56 +02:00
Hector Sanjuan
78a25e38f8 Fix #462: Support DNS multiaddresses for node_multiaddress
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-06-12 10:09:03 +02:00
Hector Sanjuan
fa4ddca5d7
Merge pull request #455 from ipfs/fix/api-consts
Fix: API constants should explicit their type
2018-06-02 10:21:47 +02:00
Hector Sanjuan
a668414609
Merge pull request #456 from ipfs/gx/update-mudygh
gx: update go-libp2p
2018-06-01 18:19:44 +02:00
Hector Sanjuan
a0b0b56529 gx: update go-libp2p
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-06-01 17:47:53 +02:00
Hector Sanjuan
218ee0260b Fix: API constants should explicit their type
Otherwise, they are int. This forces API users to do manual variable
type declaration when initializing something to one of these constants

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-06-01 17:27:21 +02:00
Hector Sanjuan
f7b9fa53fd
Merge pull request #442 from ipfs/fix/412-template-for-issues
Fix #412: Add an issue template
2018-05-30 14:47:09 +02:00
Hector Sanjuan
ab237ae5cc Fix #412: Add an issue template
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-30 14:43:04 +02:00
Hector Sanjuan
510ed23686
gx publish 0.4.0
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-30 13:26:31 +02:00
Hector Sanjuan
0889302c8d
Release 0.4.0
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-30 13:26:10 +02:00
Hector Sanjuan
1116b4bbb0
Merge pull request #419 from ipfs/0.4.0/changelog
0.4.0: Changelog
2018-05-30 13:25:19 +02:00
Hector Sanjuan
3a9b746d7f 0.4.0: Changelog
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-30 13:24:22 +02:00
Hector Sanjuan
24b64927d5
Merge pull request #443 from ipfs/fix/433-floodsub-panic
Fix #433: Use new floodsub version
2018-05-30 13:17:43 +02:00
Hector Sanjuan
5a7c31a7a1 Fix #433: Use new floodsub version
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-29 20:53:45 +02:00
Hector Sanjuan
c10494f522
gx publish 0.4.0-rc2
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-28 12:46:04 +02:00
Hector Sanjuan
5b114383e6
Release 0.4.0-rc2
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-28 12:45:10 +02:00
Hector Sanjuan
d3bffc2dba Make release script more verbose
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-28 12:42:09 +02:00
Hector Sanjuan
3ed9034799 Improve release script
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-28 12:40:35 +02:00
Hector Sanjuan
9e241203d2
Merge pull request #432 from ipfs/fix/pintracker-data-races
Fix: maptracker data-race issues
2018-05-28 12:22:56 +02:00
Hector Sanjuan
de56cf166e Address comments
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-28 11:59:26 +02:00
Hector Sanjuan
01f7a9e4e8 Fix: maptracker race issues
This commit attempts to fix race issues in the maptracker since the
introduction of the OperationTracker.

There were two main problems:
 * Duplicity tracking the state both in the state map and the opTracker
 * Non atomiciy of operations with different threads being able to affect
 other threads operations.

A test performing random Track/Untracks on the same Cid quickly showed
that items would sometimes stay as pin_queued or pin_unqueued. That happened
because operations could be cancelled under the hood by a different request,
while leaving the map status untouched.

It was not simply to deal with this issues without a refactoring.

First, the state map has been removed, and the operation tracker now provides
status information for any Cid. This implies that the tracker keeps all
operations and operations have a `PhaseDone`. There's also a
new `OperationRemote` type.

Secondly, operations are only created in the tracker and can only be removed
by their creators (they can be overwritten by other operations though).
Operations cannot be accessed directly and modifications are limited to setting
Error for PhaseDone operations.

After created, *Operations are queued in the pinWorker queues which handle any
status updates. This means, that, even when an operation has been removed from
the tracker, status updates will not interfere with any other newer operations.

In the maptracker, only the Unpin worker Cleans operations once processed. A
sucessful unpin is the only way that a delete() happens in the tracker map.
Otherwise, operations stay there until a newer operation for the Cid arrives
and 1) cancels the existing one 2) takes its place. The tracker refuses to
create a new operation if a similar "ongoing" operation of the same type
exists.

The final change is that Recover and RecoverAll() are not async and play by the
same rules as Track() and Untrack(), queueing the items to be recovered.

Note: for stateless pintracker, the tracker will need to Clean() operation
of type OperationPin as well, and complement the Status reported
by the tracker with those coming from IPFS.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-28 11:59:26 +02:00
Hector Sanjuan
acc8366f58 Rename optracker to pintracker/optracker
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-28 11:59:26 +02:00
Adrian Lanzafame
c89508035a Maptracker: extract optracker and make improvements
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-28 11:59:26 +02:00
Hector Sanjuan
d92751a0d0
Merge pull request #439 from ipfs/go-1.10
Test with Go 1.10
2018-05-28 10:19:35 +02:00
Hector Sanjuan
9d278cbb44
Merge pull request #441 from ipfs/fix/host-nat
Fix #346: Enable NAT hole punching for libp2p host
2018-05-28 10:19:17 +02:00
Hector Sanjuan
530c23f7b4
Merge pull request #440 from ipfs/gx/update-psxsm3
Go-libp2p: update to 5.0.17
2018-05-28 10:18:51 +02:00
Hector Sanjuan
926a5e28cc Remove coverage.sh. Go 1.10 supports a coverprofile from multiple packages.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-27 18:19:14 +02:00
Hector Sanjuan
37a75e5e38 Test with Go 1.10
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-27 18:11:05 +02:00
Hector Sanjuan
47f7fe7d92 Fix #346: Enable NAT hole punching for libp2p host
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-27 17:47:46 +02:00
Hector Sanjuan
059fcdaa42 Go-libp2p: update to 5.0.17
Among other things, this fixes race condition test failures in libp2p and
random panics in go-log.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-27 17:30:47 +02:00
Hector Sanjuan
c4c6e17ccf
Merge pull request #436 from Laevos/fix/indirectpinstatus
fix #428: Use a regexp to match for indirect status in IPFSPinStatusF…
2018-05-27 12:06:18 +02:00
Hector Sanjuan
41552621e6
Merge pull request #437 from Laevos/fix/lockfile
fix #423: Remove lock file when daemon force quits
2018-05-27 12:04:02 +02:00
Laevos
a01ecab3a7 fix #423: Remove lock file when daemon force quits
License: MIT
Signed-off-by: Lilith McMullen <iggnsthe@live.com>
2018-05-25 21:01:46 -05:00
Laevos
a3c77dafb8 fixed formatting issues
License: MIT
Signed-off-by: Lilith McMullen <iggnsthe@live.com>
2018-05-25 20:38:47 -05:00
Laevos
e62c4171ef fix #428: Use a regexp to match for indirect status in IPFSPinStatusFromString()
Since indirect pins are of the form `indirect through <cid>`, let's use
a regexp to match them instead of an equality operator.

License: MIT
Signed-off-by: Lilith McMullen <iggnsthe@live.com>
2018-05-25 20:08:45 -05:00