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(routing/http/client): DefaultProtocolFilter for IPIP-484 #689

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

lidel
Copy link
Member

@lidel lidel commented Oct 16, 2024

This PR makes routing/http/client initialize with implicit default protocol filter from IPIP-484 set to unknown + transport-bitswap, matching what we explicitly set in Kubo (ipfs/kubo#10534) and Rainbow (ipfs/rainbow#173).

Rationale

boxo users can change or disable default filter via WithProtocolFilter option, but the default should be filter that is optimized for golden path, which currently means bitswap. Processing peers that we know only support unsupported protocols is wasting resources and we should skip them.

Over time, we may add new protocols like http to boxo, and we will also adjust the default list accordingly.

TODO

  • refactor routing/http/client to use DefaultProtocolFilter
  • refactor examples/routing/delegated-routing-client to reflect implicit defaults

@lidel lidel force-pushed the feat/ipip-484-implicit-protocol-filter branch from 47928d1 to bda1247 Compare October 16, 2024 00:37
@lidel lidel changed the title feat(routing/http/client): DefaultProtocolFilter feat(routing/http/client): DefaultProtocolFilter for IPIP-484 Oct 16, 2024
Copy link

codecov bot commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.29%. Comparing base (08fb71d) to head (aa7b76a).
Report is 1 commits behind head on main.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #689   +/-   ##
=======================================
  Coverage   60.29%   60.29%           
=======================================
  Files         243      243           
  Lines       31018    31019    +1     
=======================================
+ Hits        18702    18704    +2     
  Misses      10649    10649           
+ Partials     1667     1666    -1     
Files with missing lines Coverage Δ
routing/http/client/client.go 70.83% <100.00%> (+0.08%) ⬆️

... and 11 files with indirect coverage changes

@lidel lidel marked this pull request as ready for review October 16, 2024 00:41
@lidel lidel requested a review from a team as a code owner October 16, 2024 00:41
@lidel lidel merged commit c2487a2 into main Oct 16, 2024
15 checks passed
@lidel lidel deleted the feat/ipip-484-implicit-protocol-filter branch October 16, 2024 20:31
gammazero pushed a commit that referenced this pull request Oct 22, 2024
@gammazero gammazero mentioned this pull request Oct 22, 2024
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