Commit Graph

2378 Commits

Author SHA1 Message Date
Hector Sanjuan
1952693ab5 Feat #1374: ipfshttp: do not swarm connect to more than 10 origins.
Disallow silly behaviours by default.
2021-07-02 16:38:04 +02:00
Hector Sanjuan
625b344cb7 Feat #1374: ipfshttp: support pin.Origins and swarm-connect to them
This allows the ipfshttp IPFS-connector to support pin origins.

When present, it will issue "swarm connect" requests to IPFS, in the
background, with 0 weight (unsupported in go-ipfs yet) to a maximum of 10
peers. Errors are ignored.

branch feat/1374-providers # Changes to be committed: # modified: ipfshttp.go
../../cmd/ipfs-cluster-service/export.json #
../../cmd/ipfs-cluster-service/test/ #
2021-07-02 02:09:27 +02:00
Hector Sanjuan
e07f30b2ab Feat #1374: Only accept Origins that have a p2p component 2021-07-02 01:49:30 +02:00
Hector Sanjuan
7e26ca8fc6 Feat #1374: Add Origins option to pins
This adds a new pin option called Origins, consisting of a slice of multiaddresses.
2021-07-02 01:42:51 +02:00
Hector Sanjuan
f7a2e4a3fc
Merge pull request #1373 from ipfs/feat/docker-select-ds
Docker: allow controlling datastore backend via IPFS_CLUSTER_DATASTORE
2021-06-29 16:14:01 +02:00
Hector Sanjuan
74e4dfb2e4 Docker: allow controlling datastore backend via IPFS_CLUSTER_DATASTORE 2021-06-29 15:44:24 +02:00
Hector Sanjuan
55a6271c28
Merge pull request #1371 from ipfs/feat/fix-1366
Fix #1366: IPFS Proxy API serializes wrong error types
2021-06-29 15:38:01 +02:00
Hector Sanjuan
81d5759cc8 Fix #1366: IPFS Proxy API serializes wrong error types
The errors returned by the IPFS Proxy API are not understood by IPFS.

This was caused by go-ipfs-cmds setting an API error format which requires the
errors to have a type: "error" field.

This commit brings this up to speed.
2021-06-28 22:42:47 +02:00
Hector Sanjuan
d37df4fd95
Merge pull request #1364 from ipfs/feat/custom-backends
Support a levelDB backend for cluster
2021-06-28 19:21:52 +02:00
Hector Sanjuan
099e23cbd1 Run tests also using leveldb backend 2021-06-11 18:43:54 +02:00
Hector Sanjuan
0eef0ede89 Support a levelDB backend for cluster
Badger can take 1000x the amount of needed space if not GC'ed or compacted
(#1320), even for non heavy usage. Cluster has no provisions to run datastore
GC operations and while they could be added, they are not ensured to
help. Improvements on Badger v3 might help but would still need to GC
explicitally.

Cluster was however designed to support any go-datastore as backend.

This commit adds LevelDB support. LevelDB go-datastore wrapper is mature, does
not need GC and should work well for most cluster usecases, which are not
overly demanding.

A new `--datastore` flag has been added on init. The store backend is selected
based on the value in the configuration, similar to how raft/crdt is. The
default is set to leveldb. From now on it should be easier to add additional
backends, i.e. badgerv3.
2021-06-09 19:40:36 +02:00
Hector Sanjuan
8454cd6383
Merge pull request #1363 from vasco-santos/chore/use-latest-go-ipfs-in-docker-compose
chore: use latest go ipfs in docker compose
2021-06-09 19:08:19 +02:00
Vasco Santos
f98701507d chore: use latest in all instances 2021-06-09 15:39:34 +02:00
Vasco Santos
b58a032f0d chore: use latest go ipfs in docker compose 2021-06-09 15:35:14 +02:00
Hector Sanjuan
c5d0695c0a
Merge pull request #1361 from ipfs/fix/irc
Update IRC link in repository badges
2021-06-01 14:31:06 +02:00
Hector Sanjuan
75cc71420e Update IRC link in repository badges 2021-06-01 14:29:47 +02:00
Hector Sanjuan
55516fe7c6
Fix #1358: Set RawLeaves to true when unset and CidVersion=1 (#1359)
Fixes #1358. Mimics go-ipfs defaults.

Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
2021-05-19 23:56:30 +02:00
Hector Sanjuan
bfe179e943
Set development version v0.13.3-next 2021-05-14 19:04:01 +02:00
Hector Sanjuan
dd87dba323
Release v0.13.3 2021-05-14 19:03:15 +02:00
Hector Sanjuan
f7c78df418
Dependency upgrades (#1357)
* build(deps): bump github.com/multiformats/go-multiaddr-dns

Bumps [github.com/multiformats/go-multiaddr-dns](https://github.com/multiformats/go-multiaddr-dns) from 0.2.0 to 0.3.1.
- [Release notes](https://github.com/multiformats/go-multiaddr-dns/releases)
- [Commits](https://github.com/multiformats/go-multiaddr-dns/compare/v0.2.0...v0.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* build(deps): bump github.com/hashicorp/go-hclog from 0.15.0 to 0.16.0

Bumps [github.com/hashicorp/go-hclog](https://github.com/hashicorp/go-hclog) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/hashicorp/go-hclog/releases)
- [Commits](https://github.com/hashicorp/go-hclog/compare/v0.15.0...v0.16.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* build(deps): bump github.com/ipfs/go-unixfs from 0.2.4 to 0.2.5

Bumps [github.com/ipfs/go-unixfs](https://github.com/ipfs/go-unixfs) from 0.2.4 to 0.2.5.
- [Release notes](https://github.com/ipfs/go-unixfs/releases)
- [Commits](https://github.com/ipfs/go-unixfs/compare/v0.2.4...v0.2.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* build(deps): bump github.com/libp2p/go-libp2p-peerstore

Bumps [github.com/libp2p/go-libp2p-peerstore](https://github.com/libp2p/go-libp2p-peerstore) from 0.2.6 to 0.2.7.
- [Release notes](https://github.com/libp2p/go-libp2p-peerstore/releases)
- [Commits](https://github.com/libp2p/go-libp2p-peerstore/compare/v0.2.6...v0.2.7)

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump go.uber.org/multierr from 1.6.0 to 1.7.0

Bumps [go.uber.org/multierr](https://github.com/uber-go/multierr) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/uber-go/multierr/releases)
- [Changelog](https://github.com/uber-go/multierr/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber-go/multierr/compare/v1.6.0...v1.7.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Chore: update deps

* Update changelog

* Update to go1.16. Downgrade unixfs.

* go mod tidy

* travis: use go install

* golint no more

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-14 19:01:18 +02:00
Hector Sanjuan
15d2846306 Finish changelog for v0.13.3 release 2021-05-14 17:02:52 +02:00
Hector Sanjuan
49dd205168
Merge pull request #1356 from ipfs/fix/err-msg
fix: error message for LogPin
2021-05-12 15:55:58 +02:00
Alan Shaw
275d01efb6
fix: error message for LogPin 2021-05-12 14:26:51 +01:00
Hector Sanjuan
656317d523
Release candidate v0.13.3-rc1 2021-05-03 17:56:24 +02:00
Hector Sanjuan
1707c43b8f
Merge pull request #1351 from ipfs/fix/1350-dial-timeouts
Better timeouts
2021-05-03 17:55:25 +02:00
Hector Sanjuan
952602848a Update changelog 2021-05-03 17:46:22 +02:00
Hector Sanjuan
5419d0ff7c Issue #1350: Ensure CID status and Peers do not take too long
StatusCID() and Peers() are calls that should return relatively quickly.

If they don't, it means they are hanging for some reason. We cannot let the
whole Multicall request hang waiting on a single peer, therefore, set a
hardcoded 15 second deadline for both.
2021-05-03 17:39:33 +02:00
Hector Sanjuan
8cd9e7928d cluster: new dial_peer_timeout option (3 seconds)
This commits allows to set the default libp2p DialPeerTimeout.

By default it is one minute, which means that a broadcast operation to a
non-responsive peer may take just that, and will block until the failure
happens.

Fixes #1350.
2021-05-03 17:16:35 +02:00
Hector Sanjuan
adff9a744e
Merge pull request #1349 from ipfs/v0.13.3/changelog
Changelog for v0.13.3
2021-04-30 20:15:41 +02:00
Hector Sanjuan
3e0f3f1be1
Merge pull request #1346 from ipfs/feat/1008-crdt-batch
crdt: Add batching support
2021-04-30 20:15:28 +02:00
Hector Sanjuan
3fc8879eb5 Changelog for v0.13.3 2021-04-30 20:10:26 +02:00
Hector Sanjuan
3ce8a5d461
Merge pull request #1347 from ipfs/dependabot/add-v2-config-file
Upgrade to GitHub-native Dependabot
2021-04-30 19:52:38 +02:00
Hector Sanjuan
8b33264a29 crdt: add test for batching items 2021-04-30 19:45:01 +02:00
Hector Sanjuan
d7e46f9e36 crdt: Increase default MaxQueueSize to 50000 2021-04-30 19:38:48 +02:00
dependabot-preview[bot]
0ea1ca4ad2
Upgrade to GitHub-native Dependabot 2021-04-29 15:36:12 +00:00
Hector Sanjuan
b5cc68a321 Feat #1008: Support pin-batching with CRDT consensus.
This adds batching support to crdt-consensus per #1008 . The crdt component can now take
advantage of the BatchingState, which uses the batching-crdt datastore. In
batching mode, the crdt datastore groups any Add and Delete operations
in a single delta (instead of just 1, as it does by default).

Batching is enabled in the crdt configuration section by setting MaxBatchSize
**and** MaxBatchAge. These two settings control when a batch is committed,
either by reaching a maximum number of pin/unpin operations, or by reaching a
maximum age.

Batching unlocks large pin-ingestion scalability for clusters, but should be
set according to expected work loads. An additional, hidden MaxQueueSize
parameter provides the ability to perform backpressure on Pin/Unpin
requests. When more than MaxQueueSize pin/unpins are waiting to be included in
a batch, the LogPin/LogUnpin operations will fail. If this happens, it is
means cluster cannot commit batches as fast as pins are arriving. Thus,
MaxQueueSize should be increase (to accommodate bursts), or the batch size
increased (to perform less commits and hopefully handle the requests faster).

Note that the underlying CRDT library will auto-commit when batch deltas reach
1MB of size.
2021-04-29 01:18:37 +02:00
Hector Sanjuan
75cf1b32c7 Feat #1008: Add batching configuration options and parsing 2021-04-29 01:08:46 +02:00
Hector Sanjuan
70096efa1b
Merge pull request #1343 from ipfs/feat/car-add
Feat: support adding CAR files
2021-04-22 22:15:44 +02:00
Hector Sanjuan
aaf30ba20a car: Add sharness test for adding car file 2021-04-21 13:55:06 +02:00
Hector Sanjuan
072f0bc722 Feat: support adding CAR files
This commit adds a new add option: "format".

This option specifies how IPFS Cluster is expected to build the DAG when
adding content. By default, it takes a "unixfs", which chunks and DAG-ifies as
it did before, resulting in a UnixFSv1 DAG.

Alternatively, it can be set to "car". In this case, Cluster will directly
read blocks from the CAR file and add them.

Adding CAR files or doing normal processing is independent from letting
cluster do sharding or not. If sharding is ever enabled, Cluster could
potentially shard a large CAR file among peers.

Currently, importing CAR files is limited to a single CAR file with a single
root (the one that is pinned). Future iterations may support multiple CARs
and/or multiple roots by transparently wrapping them.
2021-04-21 13:55:06 +02:00
Hector Sanjuan
51eed2f679
Set development version v0.13.2-next 2021-04-06 14:09:40 +02:00
Hector Sanjuan
812c8e3631
Release v0.13.2 2021-04-06 14:08:45 +02:00
Hector Sanjuan
7b0b3aab91 chore: dependency upgrades 2021-04-06 14:07:44 +02:00
Hector Sanjuan
5b697dd329 Changelog for v0.13.2 2021-04-06 14:07:44 +02:00
Hector Sanjuan
741ce19eea
Merge pull request #1335 from ipfs/dependency-upgrades
Dependency upgrades
2021-04-05 21:22:17 +02:00
Hector Sanjuan
a7bf407411 Revert go-libp2p-http version 2021-04-05 20:38:50 +02:00
Hector Sanjuan
36568b8179 Merge branch 'master' into dependency-upgrades 2021-04-05 20:37:22 +02:00
Hector Sanjuan
c303fbf38a go mod tidy 2021-04-05 20:35:45 +02:00
Hector Sanjuan
ceca45be83
Merge pull request #1333 from ipfs/dependabot/go_modules/dependency-upgrades/github.com/golang/protobuf-1.5.2
build(deps): bump github.com/golang/protobuf from 1.4.3 to 1.5.2
2021-04-05 20:34:48 +02:00
dependabot-preview[bot]
d73a0b8806
build(deps): bump github.com/golang/protobuf from 1.4.3 to 1.5.2
Bumps [github.com/golang/protobuf](https://github.com/golang/protobuf) from 1.4.3 to 1.5.2.
- [Release notes](https://github.com/golang/protobuf/releases)
- [Commits](https://github.com/golang/protobuf/compare/v1.4.3...v1.5.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-05 17:42:06 +00:00