Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: Flag to disable Bitswap client and server #10717

Open
3 tasks
lidel opened this issue Feb 14, 2025 · 0 comments
Open
3 tasks

config: Flag to disable Bitswap client and server #10717

lidel opened this issue Feb 14, 2025 · 0 comments
Labels
help wanted Seeking public contribution on this issue kind/feature A new feature need/triage Needs initial labeling and prioritization P2 Medium: Good to have, but can wait until someone steps up topic/bitswap Topic bitswap topic/config Topic config

Comments

@lidel
Copy link
Member

lidel commented Feb 14, 2025

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 (Flag, depends on Bitswap.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.Enabled=false
  • Bitswap.ServerEnabled=false
    • The main user of this would be IPFS Desktop. 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.
  • 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.
@lidel lidel added help wanted Seeking public contribution on this issue kind/feature A new feature need/triage Needs initial labeling and prioritization P2 Medium: Good to have, but can wait until someone steps up topic/bitswap Topic bitswap topic/config Topic config labels Feb 14, 2025
@lidel lidel changed the title config: Bitswap.Enabled config: disable Bitswap client and server Feb 14, 2025
@lidel lidel changed the title config: disable Bitswap client and server config: Flag to disable Bitswap client and server Feb 14, 2025
@lidel lidel moved this to Todo in @lidel's IPFS wishlist Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Seeking public contribution on this issue kind/feature A new feature need/triage Needs initial labeling and prioritization P2 Medium: Good to have, but can wait until someone steps up topic/bitswap Topic bitswap topic/config Topic config
Projects
None yet
Development

No branches or pull requests

1 participant