Skip to content

Supporting multiple delegated routing endpoints #400

@2color

Description

@2color

Background

We currently support multiple routers, i.e., delegated routing endpoints.

In the past, these were passed directly to Verified Fetch, however, when we create Verified Fetch with js-libp2p, this becomes challenging, because we instantiate js-libp2p with the delegated routing service which only supports one endpoint.

The only way around this is to create js-libp2p without the delegated routing service and do something as we do in the Verified Fetch constructor:

routers: ...(config?.routers ?? ['https://delegated-ipfs.dev']).map((routerUrl) => delegatedHTTPRouting(routerUrl)),
..

Open questions

  • Is there really a use-case for multiple delegated routing endpoints? Is that something we want to support?
  • How will js-libp2p (that is passed into Helia) behave if it has neither a DHT Client nor a Delegated Routing service, while there is/are delegated router(s) in Helia (with delegatedHTTPRouting(routerUrl))). In other words, if Helia handles routing, does the underlying js-libp2p instance also need a routing mechanism?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions