Commit Graph

277 Commits

Author SHA1 Message Date
Marcin Rataj
00cb38865f fix(autotls): renewal and AutoTLS.ShortAddrs (#10669)
* fix(autotls): renewal and AutoTLS.ShortAddrs

updates to p2p-forge/client with fix from
https://github.com/ipshipyard/p2p-forge/pull/42

we also add AutoTLS.ShortAddrs flag and enable it by default
to benefit from shorter addrs discusses in
https://github.com/ipshipyard/p2p-forge/pull/40

* test: fix flaky NewRandPort

reducing chance of bind: address already in use

(cherry picked from commit 256a739e3b)
2025-01-22 17:41:03 +01:00
Andrew Gillis
3dd1232637 Upgrade to Boxo v0.27.0 (#10665)
* Upgrade to Boxo v0.27.0

(cherry picked from commit 332a9484eb)
2025-01-22 17:39:57 +01:00
Andrew Gillis
2e15a20c1c update dependencies (#10664)
(cherry picked from commit 104b661134)
2025-01-22 17:39:44 +01:00
Andrew Gillis
a0c57cba22 chore: fix typos and comment formatting (#10653)
* fix typos and comment formatting

(cherry picked from commit 7383e1ecbb)
2025-01-13 18:56:53 +01:00
Andrew Gillis
53792003bd collection of typo fixes (#10647)
(cherry picked from commit 9425421114)
2025-01-13 18:55:10 +01:00
Adin Schmahmann
397c346ae0
feat(libp2p): shared TCP listeners and AutoTLS.AutoWSS (#10565)
Some checks are pending
CodeQL / codeql (push) Waiting to run
Docker Build / docker-build (push) Waiting to run
Gateway Conformance / gateway-conformance (push) Waiting to run
Gateway Conformance / gateway-conformance-libp2p-experiment (push) Waiting to run
Go Build / go-build (push) Waiting to run
Go Check / go-check (push) Waiting to run
Go Lint / go-lint (push) Waiting to run
Go Test / go-test (push) Waiting to run
Interop / interop-prep (push) Waiting to run
Interop / helia-interop (push) Blocked by required conditions
Interop / ipfs-webui (push) Blocked by required conditions
Sharness / sharness-test (push) Waiting to run
* feat(libp2p): enable shared TCP listeners

* docs: switch mentions of /ws to /tcp/4001

* feat: AutoTLS.AutoWSS

This adds AutoTLS.AutoWSS flag that is set to true by default.

It will check if Addresses.Swarm contain explicit /ws listener,
and if not found, it will append one per every /tcp listener

This way existing TCP ports are reused without any extra configuration,
but we don't break user's who have custom / explicit /ws listener
already.

I also moved logger around, to include Addresses.Swarm inspection
results in `autotls` logger.

* chore: go-libp2p v0.38.1

https://github.com/libp2p/go-libp2p/releases/tag/v0.38.0
https://github.com/libp2p/go-libp2p/releases/tag/v0.38.1

* docs: AutoTLS.AutoWSS and go-libp2p v0.38.x

* chore: p2p-forge/client v0.2.0

https://github.com/ipshipyard/p2p-forge/releases/tag/v0.2.0

* fix: disable libp2p.ShareTCPListener() in PNET

* chore(ci): timeout sharness after 15m

average successful run is  <9 minutes, no need to wait for 20
https://github.com/ipfs/kubo/actions/workflows/sharness.yml?query=is%3Asuccess

---------

Co-authored-by: Andrew Gillis <11790789+gammazero@users.noreply.github.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-12-20 18:41:25 +01:00
Hector Sanjuan
519ae27dce
feat: expose BlockKeyCacheSize and enable WriteThrough datastore options (#10614)
* feat: expose BlockKeyCacheSize and enable WriteThrough when bloom filter disabled
* import/config: add BatchMaxSize and BatchMaxNodes
* config: make BlockKeyCacheSize an OptionalInteger
* config: add and wire datastore.WriteThrough option
* config: omitempty on BlockKeyCacheSize
* changelog: rewrite entry about new options for the datastore
* config: add docs for BatchMaxNodes and BatchMaxSize
* config: make WriteThrough an optional Flag
* changelog: improve description of new datastore/import options
* refactor: DefaultWriteThrough as bool
* chore: boxo v0.26.0
* docs: config and changelog fixes
2024-12-19 23:12:05 +00:00
Andi
642e58ef3b
chore: use errors.New to replace fmt.Errorf with no parameters (#10617)
Some checks failed
CodeQL / codeql (push) Has been cancelled
Docker Build / docker-build (push) Has been cancelled
Gateway Conformance / gateway-conformance (push) Has been cancelled
Gateway Conformance / gateway-conformance-libp2p-experiment (push) Has been cancelled
Go Build / go-build (push) Has been cancelled
Go Check / go-check (push) Has been cancelled
Go Lint / go-lint (push) Has been cancelled
Go Test / go-test (push) Has been cancelled
Interop / interop-prep (push) Has been cancelled
Sharness / sharness-test (push) Has been cancelled
Interop / helia-interop (push) Has been cancelled
Interop / ipfs-webui (push) Has been cancelled
2024-12-10 13:50:35 -08:00
Marten Seemann
778a418952
refactor(rcmgr): use default libp2p rcmgr metrics (#9947)
Some checks failed
CodeQL / codeql (push) Has been cancelled
Docker Build / docker-build (push) Has been cancelled
Gateway Conformance / gateway-conformance (push) Has been cancelled
Gateway Conformance / gateway-conformance-libp2p-experiment (push) Has been cancelled
Go Build / go-build (push) Has been cancelled
Go Check / go-check (push) Has been cancelled
Go Lint / go-lint (push) Has been cancelled
Go Test / go-test (push) Has been cancelled
Interop / interop-prep (push) Has been cancelled
Sharness / sharness-test (push) Has been cancelled
Interop / helia-interop (push) Has been cancelled
Interop / ipfs-webui (push) Has been cancelled
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-11-27 20:50:43 +01:00
Hector Sanjuan
37c5060742
Update to boxo with refactored providerQueryManager. (#10595)
Some checks are pending
CodeQL / codeql (push) Waiting to run
Docker Build / docker-build (push) Waiting to run
Gateway Conformance / gateway-conformance (push) Waiting to run
Gateway Conformance / gateway-conformance-libp2p-experiment (push) Waiting to run
Go Build / go-build (push) Waiting to run
Go Check / go-check (push) Waiting to run
Go Lint / go-lint (push) Waiting to run
Go Test / go-test (push) Waiting to run
Interop / interop-prep (push) Waiting to run
Interop / helia-interop (push) Blocked by required conditions
Interop / ipfs-webui (push) Blocked by required conditions
Sharness / sharness-test (push) Waiting to run
2024-11-26 03:34:06 -08:00
Marcin Rataj
d1f654148f
fix: increase provider sample size (#10589) 2024-11-25 09:03:42 -08:00
Andrew Gillis
3a1b8eed0f
refactor: update to boxo without goprocess (#10567)
* chore: update to boxo without goprocess
* Use boxo fix for registering metrics
* chore: switch to boxo main with PR 723

---------

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-11-19 18:04:22 +01:00
Marcin Rataj
e18fdf28d2
chore: label implicit loggers
this should help with debugging
https://github.com/ipshipyard/p2p-forge/issues/8
on boxes with debug log level
(and hide noise from normal users)
2024-11-07 20:53:05 +01:00
Adin Schmahmann
84345afcde fix(autotls): store certificates at the location from the repo path (#10566)
* fix(autotls): store certificates at the location from the repo path
* docs(autotls): cert storale and other caveats

---------

Co-authored-by: Marcin Rataj <lidel@lidel.org>
(cherry picked from commit 1ca0ae0af6)
2024-10-30 23:24:20 +01:00
Adin Schmahmann
3134fd246e
feat(AutoTLS): opt-in WSS certs from p2p-forge at libp2p.direct (#10521)
Some checks are pending
CodeQL / codeql (push) Waiting to run
Docker Build / docker-build (push) Waiting to run
Gateway Conformance / gateway-conformance (push) Waiting to run
Gateway Conformance / gateway-conformance-libp2p-experiment (push) Waiting to run
Go Build / go-build (push) Waiting to run
Go Check / go-check (push) Waiting to run
Go Lint / go-lint (push) Waiting to run
Go Test / go-test (push) Waiting to run
Interop / interop-prep (push) Waiting to run
Interop / helia-interop (push) Blocked by required conditions
Interop / ipfs-webui (push) Blocked by required conditions
Sharness / sharness-test (push) Waiting to run
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-10-29 22:37:33 +01:00
Marco Munizaga
56c68a1657
refactor: update to go-libp2p v0.37.0 (#10554)
Some checks failed
CodeQL / codeql (push) Has been cancelled
Docker Build / docker-build (push) Has been cancelled
Gateway Conformance / gateway-conformance (push) Has been cancelled
Gateway Conformance / gateway-conformance-libp2p-experiment (push) Has been cancelled
Go Build / go-build (push) Has been cancelled
Go Check / go-check (push) Has been cancelled
Go Lint / go-lint (push) Has been cancelled
Go Test / go-test (push) Has been cancelled
Interop / interop-prep (push) Has been cancelled
Sharness / sharness-test (push) Has been cancelled
Interop / helia-interop (push) Has been cancelled
Interop / ipfs-webui (push) Has been cancelled
https://github.com/libp2p/go-libp2p/releases/tag/v0.37.0

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-10-23 01:31:40 +02:00
Marcin Rataj
52ca370759
feat(routing/http): support IPIP-484 and streaming (#10534) 2024-10-03 22:58:25 +00:00
Lucas Molas
22aeb13124
fix(core): look for MFS root in local repo only (#8661)
Co-authored-by: Andrew Gillis <11790789+gammazero@users.noreply.github.com>
2024-10-03 21:38:16 +02:00
fengzie
a17830754c
Fix issue in ResourceManager and nopfsPlugin about repo path (#10492) 2024-09-28 20:58:24 -07:00
Andrew Gillis
9577527329
feat(bitswap): allow configuring WithWantHaveReplaceSize (#10512)
Allow configuration of the bitswap server's replace WantHave with WantBlock maximum block size using the Internal.Bitswap.WantHaveReplaceSize config item. This sets the maximum size of a block in bytes up to which we will replace a want-have with a want-block. Setting a size of 0 disables this replacement and means that block sizes are not read for WantHave requests.

See ipfs/boxo#672 for more details

Updated boxo to version with PR 672

---------

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-09-27 20:37:41 -07:00
Andrew Gillis
263edb251e
feat: Support storing UnixFS 1.5 Mode and ModTime (#10478)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-08-21 02:02:46 +02:00
Andrew Gillis
5c91fe655c
Merge branch 'master' into tls-by-default 2024-08-06 20:16:57 -07:00
Marcin Rataj
ffab7b271a
feat: run AutoNAT V2 service in addition to V1 (#10468)
* feat: libp2p.EnableAutoNATv2

Part of https://github.com/ipfs/kubo/issues/10091
We include a flag that allows shutting down V2 in case there are issues
with it.

* docs: EnableAutoNATv2
2024-08-06 21:51:45 +02:00
Marcin Rataj
feef0851bd
feat: go-libp2p 0.36 and /webrtc-direct listener (#10463)
Co-authored-by: Marco Munizaga <git@marcopolo.io>
2024-08-06 21:25:27 +02:00
Marco Munizaga
121c6023c3
chore: go-libp2p 0.35.1 (#10430)
https://github.com/libp2p/go-libp2p/releases/tag/v0.35.1

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-06-14 21:33:00 +02:00
Lukáš Lukáč
40cf630874
fix(libp2p): streams config validation in resource manager (#10435) 2024-06-03 21:13:30 +02:00
Henrique Dias
b79cedec73
chore: libp2p 0.34.1 (#10429) 2024-05-27 10:16:13 +02:00
Oleg Kovalov
75df4e8173
refactor: stop using github.com/pkg/errors (#10431) 2024-05-26 11:04:40 +00:00
Henrique Dias
ca1dc3a020
gofmt 2024-05-06 09:06:45 +02:00
dbeal
8ee5099002
fix divide by zero error for reprovide error 2024-04-25 20:53:51 +09:00
Henrique Dias
6f2a61e1df
core/node: prioritize announcing pin roots, and flat strategy (#10376)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-04-09 06:37:23 +00:00
Henrique Dias
11183bb2f5
chore: upgrade go-libp2p-kad-dht (#10378)
* chore: upgrade go-libp2p-kad-dht
* config: make LoopbackAddressesOnLanDHT a Flag
* config: add DefaultLoopbackAddressesOnLanDHT
* docs(config): Routing.LoopbackAddressesOnLanDHT

---------

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-04-04 12:56:19 +00:00
Henrique Dias
cd78f2eae3
chore(config): make Routing.AcceleratedDHTClient a Flag (#10384) 2024-04-04 13:59:31 +02:00
Michael Muré
a3483e352e coreapi/unixfs: don't create an additional IpfsNode for --only-hash 2024-03-19 12:37:23 +01:00
Henrique Dias
0ea879b4a1
feat: add Ipns.MaxCacheTTL 2024-01-26 11:20:34 +01:00
Henrique Dias
d1db95c447 config: remove all options that are marked as REMOVED
Most of the removed options are many years old. In addition, they've all been removed in past iterations of Kubo. Some options were marked as removed in the config.md, but we still had a warning in the code to let users know they have been removed.

I think it's been long enough for all of this options, and enough Kubo iterations in order to alert the users. It is good to keep it in the config.md for now so that people can actually check. However, I think it's time to remove them from the code itself.
2024-01-22 15:33:27 +01:00
Jorropo
6a51849c29 libp2p: remove mplex
Fixes: #10069
2023-11-22 08:06:39 +03:00
Jorropo
a617c52f57 libp2p: default to preffering TLS
See https://github.com/libp2p/go-libp2p/pull/2650.
2023-11-22 06:06:15 +01:00
Jorropo
2b347a914d graphsync: remove support for the server
Updates: #9396
Closes: #6831
Closes: #6208

Currently the Graphsync server is not widely used due to lack of compatible software.
There have been many years yet we are unable to find any production software making use of the graphsync server in Kubo.

There exists some in the filecoin ecosystem but we are not aware of uses with Kubo.
Even in filecoin graphsync is not the only datatransfer solution available like it could have been in the past.

`go-graphsync` is also developped on many concurrent branches.
The specification for graphsync are less clear than the trustless gateway one and lack a complete conformance test suite any implementation can run.
It is not easily extansible either because selectors are too limited for interesting queries without sideloading ADLs, which for now are hardcoded solutions.
Finaly Kubo is consistently one of the fastest software to update to a new go-libp2p release.
This means the burden to track go-libp2p changes in go-graphsync falls on us, else Kubo cannot compile even if almost all users do not use this feature.
We are then removing the graphsync server experiment.

For people who want alternatives we would like you to try the Trustless-Gateway-over-Libp2p experiment instead, the protocol is simpler (request-response-based) and let us reuse both clients and servers with minimal injection in the network layer.
If you think this is a mistake and we should put it back you should try to answer theses points:
- Find a piece of opensource code which uses a graphsync client to download data from Kubo.
- Why is Trustless-Gateway-over-Libp2p not suitable instead ?
- Why is bitswap not suitable instead ?

Implementation details such as go-graphsync performance vs boxo/gateway is not very interesting to us in this discussion unless they are really huge (in the range of 10x~100x+ more) because the gateway code is under high development and we would be interested in fixing theses.
2023-11-22 06:57:45 +03:00
Henrique Dias
9f3251c1b0 feat: add WebRTC Direct support 2023-11-03 14:43:42 +01:00
Andrew Gillis
ab7630fcd4
chore: migrate peering to ipfs/boxo (#10157)
Co-authored-by: Henrique Dias <hacdias@gmail.com>
2023-10-31 13:45:51 +00:00
Hector Sanjuan
a0f34b16dd
feat: built-in content blocking based on IPIP-383 (#10161)
Fixes #8492

This introduces "nopfs" as a preloaded plugin into Kubo
with support for denylists from https://github.com/ipfs/specs/pull/383

It automatically makes Kubo watch *.deny files found in:

- /etc/ipfs/denylists
- $XDG_CONFIG_HOME/ipfs/denylists
- $IPFS_PATH/denylists

* test: Gateway.NoFetch and GatewayOverLibp2p

adds missing tests for "no fetch" gateways one can expose,
in both cases the offline mode is done by passing custom
blockservice/exchange into path resolver, which means
global path resolver that has nopfs intercept is not used,
and the content blocking does not happen on these gateways.

* fix: use offline path resolvers where appropriate

this fixes the problem described in
https://github.com/ipfs/kubo/pull/10161#issuecomment-1782175955
by adding explicit offline path resolvers that are backed
by offline exchange, and using them in NoFetch gateways
instead of the default online ones

---------

Co-authored-by: Henrique Dias <hacdias@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-10-28 05:34:14 +02:00
Alejandro Criado-Pérez
cc3c224c62
docs: fix typos 2023-09-22 11:08:26 +00:00
Icarus9913
9fdb085605
refactor: stop using go-libp2p deprecated peer.ID.Pretty
Signed-off-by: Icarus9913 <icaruswu66@qq.com>
2023-09-18 15:58:15 +02:00
Kay
2c66ea6995
refactor: if statement (#10105) 2023-09-05 15:35:51 +02:00
Henrique Dias
4606586207
feat(gateway): expose /routing/v1 server (opt-in) (#9877) 2023-08-25 17:30:04 +02:00
Henrique Dias
5ea58251d5
chore: update boxo, go-libp2p, and internalize mplex (#10095) 2023-08-24 06:11:02 +00:00
Kay
f12b372af9
style: gofumpt and godot [skip changelog] (#10081) 2023-08-17 14:02:08 +02:00
Jorropo
9e078e6d46
chore: remove outdated comment (#10077)
The link is present line 100
2023-08-17 05:45:45 +00:00
Jorropo
f805b9fcda feat: allow users to optin again into mplex
This is a partial revert of 7220409394.

Closes #9958
2023-08-15 14:53:44 +02:00