Commit Graph

1753 Commits

Author SHA1 Message Date
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
Hector Sanjuan
2e05583bb4
Merge pull request #429 from ipfs/fix/StatusSync
StateSync(): some improvements
2018-05-25 10:29:40 +02:00
Hector Sanjuan
5e6f73bdc1
Merge pull request #430 from ipfs/fix/data-folder
Fix/data folder
2018-05-25 10:12:23 +02:00
Hector Sanjuan
4d8f975d9b StateSync(): some improvements
This commit:

* Does not collect and return changed items when doing StateSync (they are
not used)
* Removes the StateSync RPC method (no longer used)
* Uses tracker.StatusAll() rather than requesting Status on each Cid (should
be faster with upcoming pintracker)
* Does not launch a go-routine to track every item. Track is an async
operation. This likely causes 1000s goroutines to be started with no good
reason.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-25 09:58:18 +02:00
Hector Sanjuan
7638fabe1e Fix sharness
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-25 09:54:52 +02:00
Hector Sanjuan
6d9ddfaf85
Merge pull request #427 from ipfs/fix/pin-context-timeout
ipfshttp: Use custom http clients for pin/unpin
2018-05-25 09:44:53 +02:00
Hector Sanjuan
4942ddc6d4 Raft: automatically rename ipfs-cluster-data folder to "raft"
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-24 17:03:05 +02:00
Hector Sanjuan
aeb6b005d1 Consensus: Make the default Raft data folder name "raft"
This is a breaking change.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-24 16:54:24 +02:00
Hector Sanjuan
9336097791
Merge pull request #426 from MichaelMure/fix/make-rebuild
Makefile: add a source target to properly trigger a build on source change
2018-05-24 09:24:53 +02:00
Hector Sanjuan
9662bb27f9
Merge pull request #418 from ipfs/update/gx
Update to latest gx version. Be more verbose when installing.
2018-05-24 09:23:06 +02:00
Hector Sanjuan
2f2a70b4ba
Merge pull request #420 from ipfs/feat/pin-method-default-refs
Set refs as default pinning method, with 10 parallel pins
2018-05-24 09:20:26 +02:00
Adrian Lanzafame
80e7baca91
ipfshttp: hande request timeouts to ifps daemon correctly
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
2018-05-24 17:13:56 +10:00
Michael Muré
047fa48ec9
Makefile: add a source target to properly trigger a build on source change
Fix #425

License: MIT
Signed-off-by: Michael Muré <batolettre@gmail.com>
2018-05-18 01:46:19 +02:00