Commit Graph

232 Commits

Author SHA1 Message Date
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
Jorropo
7220409394 feat: remove Mplex
Mplex does not implement backpressure, our implementation will randomly reset streams if buffers overflow instead of risking deadlocks.

In the past we had a bug where kubo nodes would prefer mplex over yamux. Turning off mplex make our connections to thoses nodes negociate yamux.

Closes #9958
2023-08-15 11:35:45 +02:00
Marco Munizaga
9013cf9956 Fix usage numbers 2023-07-31 16:16:00 +02:00
Mohamed MHAMDI
4c35289556 fix(relay): apply user provider options 2023-07-26 15:57:52 +02:00
Marco Munizaga
649283bb6c chore: update go-libp2p to v0.29.0 2023-07-26 14:48:19 +02:00
Jorropo
9c02eecad7
fix: mark all routers DoNotWaitForSearchValue (#10020)
* fix: mark ipns pubsub router DoNotWaitForSearchValue

That means if the DHT has finished searching and no one responded over pubsub *yet*, we will not spend 1 minute searching for no reason.

This also include other error handling bug fixes inside `go-libp2p-routing-helpers`.

Fixes: #9927

* routing: bring back the old IPNS behaviour

Stop making this configurable let everything race like it used to do.
2023-07-25 19:39:21 +02:00
Jorropo
b55cd72657 fix: print rcmgr to logger 2023-06-12 16:25:22 +02:00
Jorropo
e7294cbdff feat: warn users who are falling behind reprovides
Fixes: #9704
Fixes: #9702
Fixes: #9703
Fixes: #9419
2023-06-08 10:05:30 +02:00
Ivan Schasny
e5b33924a7
fix: correct list of addresses for delegated routing (#9920) 2023-06-07 17:59:55 +02:00
Henrique Dias
c178c51835
fix: deadlock on retrieving WebTransport addresses (#9857)
Co-authored-by: Marco Polo <git@marcopolo.io>
2023-05-08 16:11:03 +02:00
Gus Eggert
4ca36c41b6
fix: use default HTTP routers when FullRT DHT client is used (#9841) 2023-05-01 15:29:34 -04:00
Gus Eggert
0e55ca9377 feat: add experimental optimistic provide
This adds the ability to enable "optimistic provide" to the default
DHT client, which enables faster provides and reprovides.

For more information about optimistic provide, see:

https://protocollabs.notion.site/Optimistic-Provide-2c79745820fa45649d48de038516b814

Note that this feature only works when using non-custom router
types. This does not include the ability to enable optimistic provide
on custom routers for now, to minimize the footprint of this
experimental feature. We intend on continuing to test this and improve
the UX, which may or may not involve adding configuration for it to
custom routers. We also plan on refactoring/redesigning custom routers
more broadly so I don't want this to add more effort for maintainers
and confusion for users.
2023-04-06 16:49:46 -04:00
Hector Sanjuan
027c5b1a09
feat: allow injecting custom path resolvers (#9750)
In order to make it possible to easily-overwrite the path Resolvers (i.e. via
plugins), this creates resolvers as part of the Node rather than creating them
ad-hoc.
2023-04-04 18:11:32 +00:00
Gus Eggert
a09c8df24d
fix: remove timeout on default DHT operations (#9783)
* fix: remove timeout on default DHT operations

This removes the timeout by default for DHT operations. In particular
this causes issues with ProvideMany requests which can take an
indeterminate amount of time, but really these should just respect
context timeouts by default. Users can still specify timeouts here if
they want, but by default they will be set to "0" which means "no
timeout".

This is unlikely to break existing users of custom routing, because
there was previously no utility in configuring a router with timeout=0
because that would cause the router to immediately fail, so it is
unlikely (and incorrect) if anybody was using timeout=0.

* fix: remove 5m timeout on ProvideManyRouter

For context see
5fda291b66

---------

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-03-30 16:08:43 -04:00
Adin Schmahmann
353dd49be2
refactor: switch gateway code to new API from go-libipfs (#9681)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Henrique Dias <hacdias@gmail.com>
2023-03-30 13:20:37 +00:00
Jorropo
3ab1086f71 chore: migrate go-libipfs to boxo
Resolves #9677, #9676, #9675, #9736
2023-03-28 22:05:25 -04:00
Jorropo
a3b417779c fix: future proof with > rcmgr.DefaultLimit for new enum rcmgr values 2023-03-16 13:41:24 +01:00
Jorropo
e870dcdc0e fix: preserve Unlimited StreamsInbound in connmgr reconciliation
Fixes #9695
2023-03-16 13:41:24 +01:00
Gus Eggert
0d94bac30c feat: add "autoclient" routing type
This routing type is the same as "auto" but it creates the DHT in
"client" mode and hence does not start a DHT server.
2023-03-09 08:18:14 -05:00
Jorropo
7986196414 feat: Reduce RM code footprint
Co-Authored-By: Antonio Navarro Perez <antnavper@gmail.com>
2023-03-06 12:46:58 +01:00
Marten Seemann
a3366c522a
chore: update go-libp2p to v0.26 (#9656)
Co-authored-by: Henrique Dias <hacdias@gmail.com>
2023-02-24 10:34:10 +01:00
Jorropo
0ff406170d fix: update rcmgr for go-libp2p v0.25 2023-02-14 22:19:46 +01:00
Marten Seemann
a00f5cae23 chore: update go-libp2p to v0.25.1 2023-02-14 22:19:46 +01:00
Antonio Navarro Perez
633c497f63 Adjust inbound connection limits depending on memory. 2023-01-30 11:01:03 +01:00
Jorropo
b3c98bb085 chore: bump go-libipfs remove go-bitswap 2023-01-27 23:07:01 +01:00
Mohsin Zaidi
9652f24f6c
feat: Pubsub.SeenMessagesStrategy (#9543)
* feat: expire messages from the cache based on last seen time
* docs: Pubsub.SeenMessagesStrategy

Ref. https://github.com/libp2p/go-libp2p-pubsub/pull/513

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-01-27 00:24:35 +01:00
Steve Loeppky
9327ee64ce
fix: clarity: no user supplied rcmgr limits of 0 (#9563)
Co-authored-by: Antonio Navarro Perez <antnavper@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-01-22 20:04:18 +01:00
Jorropo
8328bab28d fix: ensure connmgr is smaller then autoscalled ressource limits
Fixes #9545
2023-01-20 19:25:38 +01:00
Jorropo
b84cd11566
fix: typo in ensureConnMgrMakeSenseVsResourcesMgr 2023-01-20 15:29:54 +01:00
Jorropo
73ebad1892 fix: refuse to start if connmgr is smaller than ressource limits and not using none connmgr
Fixes: #9548
2023-01-19 01:40:48 +01:00
Antonio Navarro Perez
3bc9b675a0
fix: stats dht command when Routing.Type=auto (#9538)
Fixes default auto mode, but Routing.Type=custom needs more work.
Continued in https://github.com/ipfs/kubo/issues/9482
2023-01-13 00:38:38 +01:00
Antonio Navarro Perez
8cdc86d8c4 fix: disable provide over HTTP with Routing.Type=auto (#9511)
Closes https://github.com/ipfs/kubo/issues/9504
2023-01-04 13:56:15 +01:00
Jorropo
e927dc8e59 fix: correct libp2p transports TODO comments 2022-12-12 22:26:48 +01:00
Jorropo
16d189b8b8 feat: turn on WebTransport by default
Fixes #9292
2022-12-12 21:56:55 +01:00
Jorropo
f08b439d48 update go-libp2p to v0.24.0 2022-12-12 03:47:17 +01:00
Marcin Rataj
70e604ff99
feat: Routing.Type=auto (DHT+IPNI) (#9475)
This changes the default routing to use both DHT and IPNI
at the same time. Closes #9454 Closes #9422

Full context:
https://github.com/ipfs/kubo/issues/9454
https://github.com/ipfs/kubo/issues/9422

Co-authored-by: Steve Loeppky <biglep@protocol.ai>
Co-authored-by: Gus Eggert <gus@gus.dev>
Co-authored-by: Steve Loeppky <biglep@protocol.ai>
2022-12-08 23:20:24 +01:00
Mikel Cortes
72bad5c060
feat: increase default Reprovider.Interval (#9326)
* increase republish interval based on RFM17
* refactor(config): switch to implicit default

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-12-08 21:28:40 +01:00
Steve Loeppky
01e0bfa359
docs: libp2p resource management (#9468)
Co-authored-by: Antonio Navarro Perez <antnavper@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-12-08 16:18:04 +01:00
Antonio Navarro Perez
9662c8e3f9 Fix sharness test
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
2022-12-07 18:30:21 +01:00
Antonio Navarro Perez
be9539db03 Added a message when RM is disabled.
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
2022-12-07 18:30:21 +01:00
Antonio Navarro Perez
a54cf2a95a Requested changes.
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
2022-12-07 18:30:21 +01:00
Antonio Navarro Perez
67886f7bd3 Fix: RM: Improve init RM message and fix final memory value.
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
2022-12-07 18:30:21 +01:00
Antonio Navarro Perez
d16e63a23e Fix: Resource Manager: Filter stats correctly by %
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
2022-12-07 18:05:15 +01:00
Antonio Navarro Perez
7a8639ee33 Apply suggestions from code review
Co-authored-by: Steve Loeppky <biglep@protocol.ai>
2022-12-07 16:47:37 +01:00
Antonio Navarro Perez
22a03bda6d Increase MaxMemory param to use half of total memory.
Previously it was using 1/8 of the total memory.

Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
2022-12-07 16:47:37 +01:00
Antonio Navarro Perez
df828c0a47 feature: delegated-routing: Add HTTP delegated routing.
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
2022-12-07 16:34:59 +01:00