Commit Graph

520 Commits

Author SHA1 Message Date
Jorropo
baccaef1b5
Merge pull request #9293 from Jorropo/webtransport
feat: add webtransport as an optin transport
2022-09-23 20:09:33 +02:00
Jorropo
8baec10146 feat: add webtransport as an optin transport 2022-09-23 19:50:55 +02:00
Justin Johnson
bcaacdd6c3
feat(gateway): _redirects file support (#8890)
https://github.com/ipfs/kubo/pull/8890
https://github.com/ipfs/specs/pull/290
2022-09-23 18:44:19 +02:00
Antonio Navarro Perez
d1b9e41fc2
feat: Delegated routing with custom configuration. (#9274)
New multi-router configuration system based on https://hackmd.io/G1KRDEX5T3qyfoBMkIrBew#Methods

- Added a new routing type: "custom"
- Added specific struct types for different Routers (instead of map[string]interface{})
- Added `Duration` config type, to make easier time string parsing
- Added config documentation.
- Use the latest go-delegated-routing library version with GET support.
- Added changelog notes for this feature.

It:
- closes #9157
- closes #9079
- closes #9186
2022-09-22 15:47:45 +02:00
Jorropo
74aaf37cec chore: bump go-libp2p v0.23.1
This does not include any WebTransport config code in Kubo, this will be done later in an other PR.
2022-09-21 23:16:03 +02:00
Marcin Rataj
b6b97d90ac fix: require IPNS V2 signatures 2022-09-21 01:09:00 +02:00
Jorropo
aeaf57734a chore: bump go-bitswap v0.10.2 2022-09-13 19:21:18 +02:00
Jorropo
196887cbe5 chore: bump go-libp2p v0.22.0 & go1.18&go1.19
Fixes: #9225
2022-09-09 17:09:38 +02:00
Jorropo
849e0478b5 chore: bump go-pinning-service-http-client v0.1.2 to include up to nano precision 2022-09-01 15:36:25 +02:00
Jorropo
1236eb0f58 chore: update github.com/gabriel-vasile/mimetype
See the release notes: https://github.com/gabriel-vasile/mimetype/releases/tag/v1.4.1

This is a valuable release with already public security fixes (which don't affect us AFAIT but better safe than sorry).
More mimetypes and bug fixes.
2022-08-17 02:19:18 +02:00
Marcin Rataj
a42848ac62 chore: switch back to goleveldb v1.0.0
https://github.com/ipfs/kubo/pull/9074/files?diff=split&w=1#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6R97
2022-08-17 00:38:51 +02:00
Marco Munizaga
831135cc9b Update go-libp2p-kad-dht to v0.17.0 2022-08-15 14:14:00 -07:00
Marco Munizaga
3ed83e485b Update go-libp2p-resource-manager to v0.5.3 2022-08-15 14:12:21 -07:00
Marco Munizaga
3f42d96952 Use newer rcmgr 2022-08-15 14:12:21 -07:00
Marco Munizaga
629245a637 Use released version of rcmgr, use specific commit for kad-dht 2022-08-15 14:12:21 -07:00
Marco Munizaga
0c58d6e32b Use released version of go-libp2p v0.21; 2022-08-15 14:12:21 -07:00
Marco Munizaga
0b3c7bcc74 mod tidy 2022-08-15 14:12:21 -07:00
Marco Munizaga
dffdd35d99 Update go-libp2p to latest master 2022-08-15 14:12:21 -07:00
Marco Munizaga
f4f4128b9f Update rcmgr dep 2022-08-15 14:12:21 -07:00
Marco Munizaga
68d9073d29 Use RC version 2022-08-15 14:12:21 -07:00
Marten Seemann
c3589a1728 WIP rcmgr auto limit scaling 2022-08-15 14:12:18 -07:00
Jorropo
f9410dc99d chore: bump go-bitswap to use the splited code with polyfill 2022-08-13 20:22:49 +00:00
Gus Eggert
310dca55dd feat: add fx options plugin
This adds a plugin interface that lets the plugin modify the fx
options that are passed to fx when the app is initialized. This means
plugins can inject their own implementations of IPFS interfaces. This
enables granular customization of go-ipfs behavior by plugins, such
as:

- Bitswap with custom filters (e.g. for CID blocking) Custom interface

- implementations such as Pinner or DAGService

- Dynamic configuration of libp2p ...

One downside of this is that we're exposing the entire dependency
graph, init hooks, initialization, etc. to users, so this comes with a
caveat that we reserve the right to make breaking changes to the graph
structure and initialization logic (although this historically happens
rarely). If these things are changed, we should mention them in
release notes and changelogs though, since they could impact users of
this plugin interface.

I'm not particularly fond of DI frameworks (and neither are some of
the folks work on/near go-ipfs), but it seems unlikely that somebody
will rewrite the dependency wiring and lifecycle hooks of go-ipfs, and
add dynamic extension points, so this seems like a palatable
compromise.

There are also problems that we should clean up in how model the
go-ipfs app in fx, such as:

- We make extensive use of nested fx.Options, which fx itself
discourages because it "limits the user's ability to customize their
application". It should be easy to flatten these out into a single
[]fx.Option slice.

- We pass around a list of opaque libp2p opts, which makes it hard to
customize after-the-fact...we should consider naming each of these
opts and providing them to fx as proper dependencies, so that they can
be explicitly overridden.

- We call fx.Invoke() in some places with anonymous functions. We
should instead only pass exported functions to fx.Invoke(), so that
they have exported names, which would make it easier to remove/augment
the invocations that happen when the app is initialized.

These aren't blocking issues, they just make it harder and more
brittle to customize go-ipfs with this plugin.
2022-08-12 17:04:29 -04:00
Claudia Richoux
2fb7437e2a feat: add blake3 support
Support hashes from 20 <= x <= 128 bytes, but does not yet have any option to generate anything else than 32 bytes hashes.

This will be forward compatible when we add such option.
2022-08-12 16:45:42 +00:00
Jorropo
7ec0c245a4 chore: bump go-blockservice to only do put onces
Fixes: #7956
2022-07-28 14:41:46 +00:00
dependabot[bot]
a3bdea4ed4 build(deps): bump go.uber.org/dig from 1.14.0 to 1.14.1
Bumps [go.uber.org/dig](https://github.com/uber-go/dig) from 1.14.0 to 1.14.1.
- [Release notes](https://github.com/uber-go/dig/releases)
- [Changelog](https://github.com/uber-go/dig/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber-go/dig/compare/v1.14.0...v1.14.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25 15:45:11 +00:00
dependabot[bot]
8bc466f2ed build(deps): bump github.com/ipld/go-codec-dagpb from 1.4.0 to 1.4.1
Bumps [github.com/ipld/go-codec-dagpb](https://github.com/ipld/go-codec-dagpb) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/ipld/go-codec-dagpb/releases)
- [Commits](https://github.com/ipld/go-codec-dagpb/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: github.com/ipld/go-codec-dagpb
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25 15:32:02 +00:00
dependabot[bot]
f9a020a690 build(deps): bump github.com/multiformats/go-multiaddr
Bumps [github.com/multiformats/go-multiaddr](https://github.com/multiformats/go-multiaddr) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/multiformats/go-multiaddr/releases)
- [Commits](https://github.com/multiformats/go-multiaddr/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: github.com/multiformats/go-multiaddr
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25 15:31:20 +00:00
dependabot[bot]
0badd5015c build(deps): bump go.uber.org/fx from 1.16.0 to 1.17.1
Bumps [go.uber.org/fx](https://github.com/uber-go/fx) from 1.16.0 to 1.17.1.
- [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.16.0...v1.17.1)

---
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>
2022-07-25 15:29:46 +00:00
dependabot[bot]
5e9f2df0dd build(deps): bump github.com/fsnotify/fsnotify from 1.5.1 to 1.5.4
Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) from 1.5.1 to 1.5.4.
- [Release notes](https://github.com/fsnotify/fsnotify/releases)
- [Changelog](https://github.com/fsnotify/fsnotify/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fsnotify/fsnotify/compare/v1.5.1...v1.5.4)

---
updated-dependencies:
- dependency-name: github.com/fsnotify/fsnotify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 23:36:42 +02:00
Jorropo
cbb9aeec49 chore: update go-multibase 🚀
This add supports for base256emoji.
2022-07-07 23:29:47 +02:00
Antonio Navarro Perez
92c4dc61a8
feat(routing): Delegated Routing (#8997)
* Delegated Routing.

Implementation of Reframe specs (https://github.com/ipfs/specs/blob/master/REFRAME.md) using go-delegated-routing library.

* Requested changes.

* Init using op string

* Separate possible ContentRouters for TopicDiscovery.

If we don't do this, we have a ciclic dependency creating TieredRouter.
Now we can create first all possible content routers, and after that,
create Routers.

* Set dht default routing type

* Add tests and remove uneeded code

* Add documentation.

* docs: Routing.Routers

* Requested changes.

Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>

* Add some documentation on new fx functions.

* Add changelog entry and integration tests

* test: sharness for 'dht' in 'routing' commands

Since 'routing' is currently the same as 'dht' (minus query command)
we need to test both, that way we won't have unnoticed divergence
in the default behavior.

* test(sharness): delegated routing via reframe URL

* Add more tests for delegated routing.

* If any put operation fails, the tiered router will fail.

* refactor: Routing.Routers: Parameters.Endpoint

As agreed  in https://github.com/ipfs/kubo/pull/8997#issuecomment-1175684716

* Try to improve CHANGELOG entry.

* chore: update reframe spec link

* Update go-delegated-routing dependency

* Fix config error test

* use new changelog format

* Remove port conflict

* go mod tidy

* ProviderManyWrapper to ProviderMany

* Update docs/changelogs/v0.14.md

Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2022-07-07 17:10:25 -04:00
Marcin Rataj
82467bc936 refactor: rename to kubo 2022-07-06 18:40:37 +02:00
Jorropo
cbf5fdae55 chore: update go-car 2022-07-06 15:30:29 +02:00
Adin Schmahmann
123f1f61e0
Merge pull request #9038 from ipfs/update-libp2p-v020
update go-libp2p to v0.20.3
2022-06-30 15:21:23 -04:00
Marco Munizaga
9dcc4e224e Update go-libp2p and go-multistream 2022-06-28 14:46:33 -07:00
Marcin Rataj
61f0710100
fix: remove mdns_legacy & Discovery.MDNS.Interval
* fix: remove mdns_legacy

We've been running both implementations for a long, long time.
It is time to remove legacy version and lower the number of LAN packets
IPFS node produces.

See https://github.com/ipfs/go-ipfs/pull/9048#discussion_r906814717
for the Interval removal rational.
2022-06-27 04:17:40 +02:00
Marten Seemann
ec61dd410d update go-libp2p to v0.20.2 2022-06-24 19:48:11 +02:00
Jorropo
a3a6a59dbb chore: update go-multihash
This remove github.com/minio/blake2b-simd and replace it with golang.org/x/crypto/blake2b which slightly faster and reduce the code surface.

See https://github.com/multiformats/go-multihash/pull/157 for more info.
2022-06-22 16:03:28 -04:00
Adin Schmahmann
c4522199bd chore: update go-unixfs 2022-06-16 12:04:13 -04:00
Steven Allen
b38bbfa471 chore: update bitswap 2022-06-13 14:30:29 -04:00
Gus Eggert
2e170a4302
chore: upgrade to go-libp2p v0.19.4 2022-06-03 16:58:37 -04:00
Gus Eggert
8d7ed002df
feat: upgrade to go-libp2p-kad-dht@v0.16.0 (#9005)
* feat: upgrade to go-libp2p-kad-dht@v0.16.0

* rename "cid format --codec" to "cid format --mc"

* refactor(test): from --codec to --mc

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-06-03 16:56:30 -04:00
Marten Seemann
f720172a2a
chore: update go-libp2p to v0.19.3 (#8990) 2022-06-01 11:08:22 -04:00
Gus Eggert
5615715c55
feat: log when resource manager limits are exceeded (#8980)
This periodically logs how many times Resource Manager limits were
exceeded. If they aren't exceeded, then nothing is logged. The log
levels are at ERROR log level so that they are shown by default.

The motivation is so that users know when they have exceeded resource
manager limits. To find what is exceeding the limits, they'll need to
turn on debug logging and inspect the errors being logged. This could
collect the specific limits being reached, but that's more complicated
to implement and could result in much longer log messages.
2022-05-19 15:27:44 -04:00
Marcin Rataj
657d4f4dd9
fix: go-libp2p 0.19.2 with holepunch fixup (#8966)
https://github.com/libp2p/go-libp2p/releases/tag/v0.19.2
2022-05-12 14:52:17 +02:00
Adin Schmahmann
34aac1ee43 chore: update deps 2022-05-04 14:43:49 -04:00
Adin Schmahmann
be1acfa1c5 chore: update go-libp2p 2022-05-03 14:26:09 -04:00
Marten Seemann
232ccb4e55
feat: relay v2 discovery (go-libp2p v0.19.0) (#8868)
* update go-libp2p to v0.19.0
* chore: go-namesys v0.5.0
* refactor(config): cleanup relay handling
* docs(config): document updated defaults
* fix(tests): panic during sharness

* fix: t0160-resolve.sh
See https://github.com/ipfs/go-namesys/pull/32

* fix: t0182-circuit-relay.sh
* test: transport encryption

Old tests were no longer working because go-libp2p 0.19 removed
the undocumented 'ls' pseudoprotocol.

This replaces these tests with handshake attempt (name is echoed back on
OK or 'na' is returned when protocol is not available) for tls and noise
variants + adds explicit test that safeguards us against enabling
plaintext by default by a mistake.

* fix: ./t0182-circuit-relay.sh

test is flaky, for now we just restart the testbed when we get
NO_RESERVATION error

* refactor: AutoRelayFeeder with exp. backoff

It starts at feeding peers ever 15s, then backs off each time
until it is done once an hour

Should be acceptable until we have smarter mechanism in go-lib2p 0.20

* feat(AutoRelay): prioritize Peering.Peers

This ensures we feed trusted Peering.Peers in addition to any peers
discovered over DHT.

* docs(CHANGELOG): document breaking changes

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Gus Eggert <gus@gus.dev>
2022-04-28 17:13:15 +02:00
Lucas Molas
4e2028d19c fix(cmds): add: reject files with different import dir 2022-04-28 16:59:02 +02:00