Skip to content

Commit

Permalink
fix: refine only negative address filter behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
2color committed Sep 25, 2024
1 parent f585210 commit eb7add8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ipips/ipip-0484.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ The proposed change is to add a `?filter-addrs` parameter to the `GET /routing/v
- `unknown` can be be passed to include providers whose multiaddrs are unknown, e.g. `?filter-addrs=unknown`. This allows filtering providers whose multiaddrs are unknown at the time of filtering.
- Multiaddrs are filtered by checking if the protocol name appears in any of the multiaddrs (logical OR).
- Negative filtering is done by prefixing the protocol name with `!`, e.g. `?filter-addrs=!quic-v1,!tcp`. Note that negative filtering is done by checking if the protocol name does not appear in any of the multiaddrs (logical AND).
- For an address to pass the filter, it must pass all negative filters AND match at least one positive filter.
- Only multiaddrs that pass the filter are included in the response.
- If no parameter is passed, the default behavior is to return the original list of addresses unchanged.
- If only negative filters are provided, addresses not passing any of the negative filters are included.
- If positive filters are provided, only addresses passing at least one positive filter (and no negative filters) are included.
- If both positive and negative filters are provided, the address must pass all negative filters and at least one positive filter to be included.
- If there are no multiaddrs that match the passed transports, the provider is omitted from the response.
- Filtering is case-insensitive.
- If no parameter is passed, the default behavior is to not apply filtering by network transports.

### Transfer Protocol Filtering

Expand Down

0 comments on commit eb7add8

Please sign in to comment.