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

feat: enable filtering in delegated routing client #651

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

2color
Copy link
Member

@2color 2color commented Oct 15, 2024

Description

  • deps: upgrade delegated routing client
  • feat: leverage filtering for delegated routing in libp2p constructor

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

@2color 2color requested a review from a team as a code owner October 15, 2024 08:49
@@ -64,7 +64,10 @@ export function libp2pDefaults (options: Libp2pDefaultsOptions = {}): Libp2pOpti
services: {
autoNAT: autoNAT(),
dcutr: dcutr(),
delegatedRouting: () => createDelegatedRoutingV1HttpApiClient('https://delegated-ipfs.dev'),
delegatedRouting: () => createDelegatedRoutingV1HttpApiClient('https://delegated-ipfs.dev', {
filterProtocols: ['unknown', 'transport-bitswap', 'transport-ipfs-gateway-http'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does the unknown filter protocol give us here? will that increase unreachable peers?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See https://github.com/ipfs/specs/pull/484/files#diff-2f9905a73a1926c9149e7bab39df73763be227e2d6f54fd16b708ee605369905R69

TL;DR: it's to include DHT providers, whose protocol isn't explicitly bitswap (even though in almost all cases they support bitswap)

@@ -73,7 +73,10 @@ export function libp2pDefaults (options: Libp2pDefaultsOptions = {}): Libp2pOpti
services: {
autoNAT: autoNAT(),
dcutr: dcutr(),
delegatedRouting: () => createDelegatedRoutingV1HttpApiClient('https://delegated-ipfs.dev'),
delegatedRouting: () => createDelegatedRoutingV1HttpApiClient('https://delegated-ipfs.dev', {
filterProtocols: ['unknown', 'transport-bitswap', 'transport-ipfs-gateway-http'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto for unknown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants