Commit Graph

466 Commits

Author SHA1 Message Date
Jorropo
fd7af6a733 chore: update go-libp2p-asn-util to make it init faster 2022-04-21 16:10:35 -04:00
Lucas Molas
7b5fe809f0
fix(cmds): CIDv1 and correct multicodecs in 'block put' and 'cid codecs' (#8568)
BREAKING CHANGES: 
- see https://github.com/ipfs/go-ipfs/pull/8568#issue-1063653194

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-04-21 18:19:40 +02:00
Adin Schmahmann
d59730f51e
Update Go version to 1.17 (#8815)
* remove building the pre-bundled plugins as shared objects in makefile

* chore: update go version to minimum of 1.17
2022-04-15 14:32:00 -04:00
Franky W
9210c08fa6 Remove gobindata
Since go1.16, there are built in tools that allow for embeding
filesystem inside the binary. We now make use of the `embed` package to
have all files put into the binary, removing the need to generate the
files and removes dependencies

Co-authored-by: Jorropo <jorropo.pgm@gmail.com>
2022-04-12 02:36:19 +02:00
Adin Schmahmann
e1c8d78d7d
chore: update deps (#8859) 2022-04-08 22:31:26 +02:00
Adin Schmahmann
d18f1f7ea9 Merge branch 'release' 2022-04-08 15:23:32 -04:00
Adin Schmahmann
2685983536 chore: update go-codec-dagpb 2022-04-08 14:42:41 -04:00
Marcin Rataj
5d712166b2
feat: detect changes in go-libp2p-resource-manager (#8857)
This adds simple check that will scream loud and clear every time
go-libp2p libraries change any of the implicit defaults
related to go-libp2p-resource-manager
2022-04-08 17:43:30 +02:00
Marten Seemann
514411bedb
feat: opt-in Swarm.ResourceMgr (go-libp2p v0.18) (#8680)
* update go-libp2p to v0.18.0

* initialize the resource manager

* add resource manager stats/limit commands

* load limit file when building resource manager

* log absent limit file

* write rcmgr to file when IPFS_DEBUG_RCMGR is set

* fix: mark swarm limit|stats as experimental

* feat(cfg): opt-in Swarm.ResourceMgr

This ensures we can safely test the resource manager without impacting
default behavior.

- Resource manager is disabled by default
    - Default for Swarm.ResourceMgr.Enabled is false for now
- Swarm.ResourceMgr.Limits allows user to tweak limits per specific
  scope in a way that is persisted across restarts
- 'ipfs swarm limit system' outputs human-readable json
- 'ipfs swarm limit system new-limits.json' sets new runtime limits
  (but does not change Swarm.ResourceMgr.Limits in the config)

Conventions to make libp2p devs life easier:
- 'IPFS_RCMGR=1 ipfs daemon' overrides the config and enables resource manager
- 'limit.json' overrides implicit defaults from libp2p (if present)

* docs(config): small tweaks

* fix: skip libp2p.ResourceManager if disabled

This ensures 'ipfs swarm limit|stats' work only when enabled.

* fix: use NullResourceManager when disabled

This reverts commit b19f7c9eca.
after clarification feedback from
https://github.com/ipfs/go-ipfs/pull/8680#discussion_r841680182

* style: rename IPFS_RCMGR to LIBP2P_RCMGR

preexisting libp2p toggles use LIBP2P_ prefix

* test: Swarm.ResourceMgr

* fix: location of opt-in limit.json and rcmgr.json.gz

Places these files inside of IPFS_PATH

* Update docs/config.md

* feat: expose rcmgr metrics when enabled (#8785)

* add metrics for the resource manager
* export protocol and service name in Prometheus metrics
* fix: expose rcmgr metrics only when enabled

Co-authored-by: Marcin Rataj <lidel@lidel.org>

* refactor: rcmgr_metrics.go

* refactor: rcmgr_defaults.go

This file defines implicit limit defaults used when Swarm.ResourceMgr.Enabled

We keep vendored copy to ensure go-ipfs is not impacted when go-libp2p
decides to change defaults in any of the future releases.

* refactor: adjustedDefaultLimits

Cleans up the way we initialize defaults and adds a fix for case
when connection manager runs with high limits.

It also hides `Swarm.ResourceMgr.Limits` until we have a better
understanding what syntax makes sense.

* chore: cleanup after a review

* fix: restore go-ipld-prime v0.14.2

* fix: restore go-ds-flatfs v0.5.1

Co-authored-by: Lucas Molas <schomatis@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-04-07 21:06:35 -04:00
Marcin Rataj
7871a0beb7
feat(cmds): add support for CAR v2 imports (#8854)
* feat: add support for carv2 import
* update to multicodec 0.4.0
* add sharness test for carv2

Co-authored-by: Keenan Nemetz <keenan.nemetz@gmail.com>
2022-04-07 04:33:13 +02:00
Jorropo
4df7b7922f
Merge pull request #8838 from Jorropo/fix/ErrNotFound-hopefully-final
chore: bump go-ipld-format v0.4.0 and fix related sharness tests
2022-04-05 21:07:15 +02:00
Gus Eggert
f855bfe6ef
feat: add basic gateway tracing (#8595)
* add deprecation warning when tracer plugins are loaded
* add response format attribute to span in gateway handler
* add note about tracing's experimental status in godoc
* add nil check for TTL when adding name span attrs
* add basic sharness test for integration with otel collector
* add nil check in UnixFSAPI.processLink
* test: sharness check all json objs for swarm span
* add env var docs to docs/environment-variables.md
* chore: pin the otel collector version
* add tracing spans per response type (#8841)
* docs: tracing with jaeger-ui

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-04-04 19:24:05 +02:00
Lucas Molas
282ac7f1f5
fix(cli): ipfs add with multiple files of same name (#8493) 2022-04-03 10:40:38 -04:00
Jorropo
e36f28d581 chore: bump go-ipld-format v0.4.0 and fix related sharness tests 2022-04-02 05:07:51 +02:00
Marcin Rataj
a61c53f87f
feat(cmds): document deprecated RPC API commands (#8802)
* feat(cmds): add deprecated and experimental status

Added programmatic state annotation introduced in
https://github.com/ipfs/go-ipfs-cmds/pull/225
for already deprecated / experimental commands.

* chore: go-ipfs-cmds v0.7.0

Co-authored-by: Lucas Molas <schomatis@gmail.com>
2022-03-22 20:46:32 +01:00
Hector Sanjuan
943187d001 ErrNotFound changes: bubble tagged libraries.
Additionally fixes tests for new error message which went from

`ipld: <cid> not found`

to

`<cid> not found`
2022-03-19 00:16:45 +01:00
Jorropo
09aed2d63b
Merge pull request #8757 from ipfs/feat/err-not-found
Bubble ErrNotFound improvements.

The is a really nice UX improvement because it know tell you which ipld block is missing instead of a generic "not found".
2022-03-18 00:42:40 +01:00
Jorropo
7c2033f215 chore: update deps
The commits has been moved from the PR to master to avoid the deps breaking when github is gonna GC the PR commits.
2022-03-18 00:28:29 +01:00
Lucas Molas
519863ecab fix(core/node): unwrap fx error in node construction 2022-03-16 19:32:31 -03:00
Laurent Senta
8d549f03f3 fix: rewrite dependencies over the go-ipfs-config package 2022-03-04 09:45:16 +01:00
Laurent Senta
c9cf47dad5 config: remove go-ipfs-config code 2022-03-04 09:45:16 +01:00
Hector Sanjuan
7bb3bfbc33 Bubble ErrNotFound improvements 2022-03-02 18:29:29 +01:00
dependabot[bot]
5922eab08f
chore(deps): bump go.uber.org/fx from 1.15.0 to 1.16.0 (#8681)
Bumps [go.uber.org/fx](https://github.com/uber-go/fx) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/uber-go/fx/releases)
- [Changelog](https://github.com/uber-go/fx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber-go/fx/compare/v1.15.0...v1.16.0)

---
updated-dependencies:
- dependency-name: go.uber.org/fx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-16 09:16:30 -05:00
Adin Schmahmann
ebf86718c8 chore: update go-path 2022-02-11 09:19:20 -05:00
Thibault Meunier
a93907a40f
feat: DNS.MaxCacheTTL for DNS-over-HTTPS resolvers (#8615)
* feat: Add MaxCacheTTL option for DNS-over-HTTPS resolvers
* Update libp2p/go-doh-resolver dependencies to support Options
* feat: Add `DNS.MaxCacheTTL` config documentation
* docs: DNS.MaxCacheTTL
* chore: go-ipfs-config@v0.19.0
Co-authored-by: Gus Eggert <gus@gus.dev>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-02-10 22:26:14 +01:00
dependabot[bot]
556c03848f
chore(deps): bump go.uber.org/zap from 1.19.1 to 1.21.0 (#8721)
Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.19.1 to 1.21.0.
- [Release notes](https://github.com/uber-go/zap/releases)
- [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber-go/zap/compare/v1.19.1...v1.21.0)

---
updated-dependencies:
- dependency-name: go.uber.org/zap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-10 11:54:23 -05:00
Adin Schmahmann
1a040b016d
Merge pull request #6816 from ipfs/feat/mh-backed-datastore
feat: switch to raw multihashes for blocks
2021-12-13 15:37:16 -05:00
Adin Schmahmann
9913183038 chore: update go-ipfs-blockstore 2021-12-09 12:07:09 -05:00
Adin Schmahmann
615fb80d37 chore: update go-ipld-prime 2021-12-08 12:46:03 -05:00
Gus Eggert
024e84adec fix: update go-ds-flatfs to v0.5.1
Fixes #8579
2021-12-03 15:08:41 -05:00
Hector Sanjuan
b55a9435d5 Bump go-filestore and go-blockstore dependencies 2021-12-02 09:50:55 -05:00
Adin Schmahmann
d83e3149c5 chore: update deps 2021-11-30 14:45:43 -05:00
Mohsin Zaidi
ecd2628a16
Integrate go-dag-jose plugin (#8569)
* feat(dag-jose): integrate `go-dag-jose` plugin
* test(dag-jose): sharness test for dag-jose plugin

Co-authored-by: Eric Myhre <hash@exultant.us>
2021-11-30 10:58:15 -08:00
dependabot[bot]
4fb4c2dd48 chore(deps): bump github.com/gabriel-vasile/mimetype from 1.1.2 to 1.4.0
Bumps [github.com/gabriel-vasile/mimetype](https://github.com/gabriel-vasile/mimetype) from 1.1.2 to 1.4.0.
- [Release notes](https://github.com/gabriel-vasile/mimetype/releases)
- [Commits](https://github.com/gabriel-vasile/mimetype/compare/v1.1.2...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/gabriel-vasile/mimetype
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 19:18:52 -05:00
Adin Schmahmann
52c177ced9
feat: go-libp2p 0.16, UnixFS autosharding and go-datastore with contexts (#8563)
* plumb through go-datastore context changes

* update go-libp2p to v0.16.0
* use LIBP2P_TCP_REUSEPORT instead of IPFS_REUSEPORT
* use relay config
* making deprecation notice match the go-ipfs-config key
* docs(config): circuit relay v2
* docs(config): fix links and headers
* feat(config): Internal.Libp2pForceReachability

This switches to config that supports setting and reading
Internal.Libp2pForceReachability OptionalString flag

* use configuration option for static relays

* chore: go-ipfs-config v0.18.0

https://github.com/ipfs/go-ipfs-config/releases/tag/v0.18.0

* feat: circuit v1 migration prompt when Swarm.EnableRelayHop is set (#8559)
* exit when Swarm.EnableRelayHop is set
* docs: Experimental.ShardingEnabled migration

This ensures existing users of global sharding experiment get notified
that the flag no longer works + that autosharding happens automatically.

For people who NEED to keep the old behavior (eg. have no time to
migrate today) there is a note about restoring it with
`UnixFSShardingSizeThreshold`.

* chore: add dag-jose code to the cid command output

* add support for setting automatic unixfs sharding threshold from the config
* test: have tests use low cutoff for sharding to mimic old behavior
* test: change error message to match the current error
* test: Add automatic sharding/unsharding tests (#8547)
* test: refactored naming in the sharding sharness tests to make more sense

* ci: set interop test executor to convenience image for Go1.16 + Node
* ci: use interop master

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Gus Eggert <gus@gus.dev>
Co-authored-by: Lucas Molas <schomatis@gmail.com>
2021-11-29 19:58:05 +01:00
Rod Vagg
9e8b6e5b50
chore: replace go-merkledag walk with go-ipld-prime traversal for dag export (#8506)
* chore: replace go-merkledag walk with go-ipld-prime traversal for dag export

This is "safe" now because we can limit duplicate block loads like
go-merkledag does and won't get trapped taking a long time for complex
DAGs. We can do this while we're using an exhaustive selector (like
ExploreAll here) but will need an alternative strategy when we go for
arbitrary selectors.
2021-10-26 14:07:31 -04:00
Marcin Rataj
8b7432d6e8
chore: go-ipfs-files v0.0.9 (#8488)
Closes #8445
Closes #8406
2021-10-05 23:53:52 +02:00
Adin Schmahmann
85e30b9b36 fuse: load unixfs adls as their dagpb substrates 2021-09-27 17:50:44 -04:00
Adin Schmahmann
5471092d85 chore: update go-path 2021-09-27 15:50:23 -04:00
Marten Seemann
4969ed2b17 chore: update go-libp2p to v0.15.0 2021-09-27 11:12:42 -04:00
Daniel Martí
d6127b062c make json, cbor, and git codecs error on empty input 2021-09-23 13:01:50 -04:00
Adin Schmahmann
0bd3d068f6 chore: update deps 2021-08-19 16:50:59 -04:00
Marten Seemann
c95d6ca08c update go-libp2p to v0.15.0-rc.1 2021-08-19 18:05:04 +02:00
Adin Schmahmann
7448340d20
support bitswap configurability (#8268)
* feat: extract Bitswap fx initialization to its own file
* chore: bump go-bitswap dependency
* feat: bump go-ipfs-config dependency and utilize the new Internal.Bitswap configuration options. Add documentation around the new OptionalInteger config type as well as the Internal.Bitswap options.
* docs(docs/config.md): move the table of contents towards the top of the document and update it

Co-authored-by: Petar Maymounkov <petarm@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Gus Eggert <877588+guseggert@users.noreply.github.com>
2021-08-18 14:15:16 -04:00
Hannah Howard
f63a997c35
IPLD Prime In IPFS: Target Merge Branch (#7976)
* feat: switch to using go-ipld-prime for codecs, path resolution, and the `dag put/get` commands
* fix: `dag put/get` not roundtripping due to an extra new line being added (https://github.com/ipfs/go-ipfs/issues/3503)

More detailed information is in the CHANGELOG.md file. Very high level:
* IPLD codecs (and their plugins) must use go-ipld-prime
* Added support for the dag-json codec
* `dag get/put` use IPLD codec names from the multicodec table
* `dag get` defaults to dag-json output instead of json, but may output with other codecs
* Data model pathing can be achieved using the /ipld prefix. For example, you can use `/ipld/QmFoo/Links/0/Hash` to traverse through a DagPB node
* With `dag get/put` the DagPB field names have been changed to match the ones in the protobuf listed in the specification

Co-authored-by: hannahhoward <hannah@hannahhoward.net>
Co-authored-by: Daniel Martí <mvdan@mvdan.cc>
Co-authored-by: acruikshank <acruikshank@example.com>
Co-authored-by: Steven Allen <steven@stebalien.com>
Co-authored-by: Will Scott <will.scott@protocol.ai>
Co-authored-by: Will Scott <will@cypherpunk.email>
Co-authored-by: Rod Vagg <rod@vagg.org>
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
Co-authored-by: Eric Myhre <hash@exultant.us>
2021-08-17 13:32:49 -04:00
dependabot[bot]
88367e38e7
build(deps): bump go.uber.org/zap from 1.16.0 to 1.19.0
Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.16.0 to 1.19.0.
- [Release notes](https://github.com/uber-go/zap/releases)
- [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber-go/zap/compare/v1.16.0...v1.19.0)

---
updated-dependencies:
- dependency-name: go.uber.org/zap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-12 11:26:26 +00:00
Petar Maymounkov
cab67f6b66
point ipfs to pinner that syncs on every pin (#8231)
Pinner upgrades and fixes. Faster reindexing. Syncing while reindexing. Syncing on every pin operation. Logging all pin operations.

Co-authored-by: gammazero <gammazero@users.noreply.github.com>
2021-07-29 10:27:05 -07:00
dependabot[bot]
848cf690b5
build(deps): bump github.com/ipfs/go-fs-lock from 0.0.6 to 0.0.7
Bumps [github.com/ipfs/go-fs-lock](https://github.com/ipfs/go-fs-lock) from 0.0.6 to 0.0.7.
- [Release notes](https://github.com/ipfs/go-fs-lock/releases)
- [Commits](https://github.com/ipfs/go-fs-lock/compare/v0.0.6...v0.0.7)

---
updated-dependencies:
- dependency-name: github.com/ipfs/go-fs-lock
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-22 15:08:42 +00:00
Marten Seemann
d2ec458e6f update go-libp2p to v0.14.4 2021-07-17 09:41:04 +02:00
Adin Schmahmann
9599ad5d7d chore: update deps 2021-07-16 09:35:06 -07:00