-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Labels
P2Medium: Good to have, but can wait until someone steps upMedium: Good to have, but can wait until someone steps uphelp wantedSeeking public contribution on this issueSeeking public contribution on this issuekind/featureA new featureA new featureneed/triageNeeds initial labeling and prioritizationNeeds initial labeling and prioritizationtopic/bitswapTopic bitswapTopic bitswaptopic/configTopic configTopic config
Description
Kubo needs an explicit configuration Flag
for controlling if Bitswap protocol is enabled, and also if we enabled only Client or also Client+Server.
Proposed feature
Add top level Bitswap
to the config with two flags
-
Bitswap.Enabled
controls both client and server (Flag
, enabled by default) -
Bitswap.ServerEnabled
controls if node responds to WANTs, it disables announcing bitswap protocol in libp2p identify (ipfs id
) responses (Flag
, depends onBitswap.Enabled
, enabled by default) - basic regression tests in
kubo/test/cli
to ensure flags truly disable it
Notes:
- we have
Internal.Bitswap
but that is for super low level knobs. we keep them there. - we have some code prior art in rainbow/setup_bitswap.go where Bitswap server is opt-in
- when in doubt, follow convention we already have for things like AutoNAT, Relays, AutoTLS.
Use cases
Bitswap.Libp2pEnabled=false
- Bootstrappers, Relays, libp2p proxies and various other pieces of infra don't need bitswap at all.
- HTTP-only low-power web hosting that already runs with
Reprovide.Interval=0
andGateway.NoFetch=true
and usesdag import
for populating data.- This will increase in utility and priority as HTTP retrieval (bitswap: opportunistic block fetch over /http* boxo#608, HTTP retrieval proposal boxo#747) lands in boxo
Bitswap.ServerEnabled=false
- The main user of this would be HTTP-only storage providers who want to avoid bitswap cost
- part of Reduce the amount of spamming (aka network noise) of non-LAN nodes in kubo’s downloading system — IPFS/2025 ipshipyard/roadmaps#10
- part of Native HTTP across the IPFS Stack, to enable Filecoin direct retrieval — IPFS/2025 ipshipyard/roadmaps#9
- part of Kubo users can more directly control which data is advertised — IPFS/2025 ipshipyard/roadmaps#8
- Other user type are IPFS Desktop only users. There would be an option to disable Server.
- Rationale: In some jurisdictions fetching content is legal, but providing the same content to others may no longer be legal.
- The main user of this would be HTTP-only storage providers who want to avoid bitswap cost
- Simplify user onboarding story
- Ability to turn bitswap off will save many human hours across ecosystem. Instead of telling people to build custom binaries and maintaining them, already existing orchestration and docker images for Kubo can be used for tasks like HTTP provider, Relay or a Bootstrapper.
Metadata
Metadata
Assignees
Labels
P2Medium: Good to have, but can wait until someone steps upMedium: Good to have, but can wait until someone steps uphelp wantedSeeking public contribution on this issueSeeking public contribution on this issuekind/featureA new featureA new featureneed/triageNeeds initial labeling and prioritizationNeeds initial labeling and prioritizationtopic/bitswapTopic bitswapTopic bitswaptopic/configTopic configTopic config