-
Notifications
You must be signed in to change notification settings - Fork 17
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
HTTP Block-retrieval support for rainbow #242
Open
hsanjuan
wants to merge
4
commits into
main
Choose a base branch
from
http-retr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This adds http retrieval support based on latest boxo. It needs explicit enabling with an "--http-retrieval-enable" flag. Allowlist and number of workers can be configured with additional flags. A provider-ignore flag has been added as well. Example: - http-retrieval-allowlist: [dag.w3s.link] - routing-ignore-providers: [QmQzqxhK82kAmKvARFZSkUVS6fo9sySaiogAnx5EnZ6ZmC] (w3s elastic ipfs peer)
gammazero
approved these changes
Feb 11, 2025
@@ -15,6 +15,8 @@ The following emojis are used to highlight certain changes: | |||
|
|||
### Added | |||
|
|||
- HTTP block retrieval support: rainbow can know use trustless http gateways to perform block retrievals, in parallel to bitswap. This takes advantage of peers with HTTP endpoints and provider records of "transport-ipfs-gateway-http" type. You can enable http retrievals with `--http-retrieval-enable`, and limit it to urls of specific hostnames with `--http-retrieval-allowlist <hostname>`. You can also ignore provider records from certain peer IDs with `--routing-ignore-providers <peerID>` (for example to ignore peer IDs from bitswap endpoints of providers that offer HTTP). Note this works in the same way as bitswap: known http-peers will receive optimistic block requests even for content that they are not announcing. See [Boxo's CHANGELOG](https://github.com/ipfs/boxo/blob/main/CHANGELOG.md) for more information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
- HTTP block retrieval support: rainbow can know use trustless http gateways to perform block retrievals, in parallel to bitswap. This takes advantage of peers with HTTP endpoints and provider records of "transport-ipfs-gateway-http" type. You can enable http retrievals with `--http-retrieval-enable`, and limit it to urls of specific hostnames with `--http-retrieval-allowlist <hostname>`. You can also ignore provider records from certain peer IDs with `--routing-ignore-providers <peerID>` (for example to ignore peer IDs from bitswap endpoints of providers that offer HTTP). Note this works in the same way as bitswap: known http-peers will receive optimistic block requests even for content that they are not announcing. See [Boxo's CHANGELOG](https://github.com/ipfs/boxo/blob/main/CHANGELOG.md) for more information. | |
- HTTP block retrieval support: rainbow can now use trustless http gateways to perform block retrievals in parallel to bitswap. This takes advantage of peers with HTTP endpoints and provider records of "transport-ipfs-gateway-http" type. You can enable http retrievals with `--http-retrieval-enable`, and limit it to urls of specific hostnames with `--http-retrieval-allowlist <hostname>`. You can also ignore provider records from certain peer IDs with `--routing-ignore-providers <peerID>` (for example to ignore peer IDs from bitswap endpoints of providers that offer HTTP). Note this works in the same way as bitswap: known http-peers receive optimistic block requests even for content that they are not announcing. See [Boxo's CHANGELOG](https://github.com/ipfs/boxo/blob/main/CHANGELOG.md) for more information. |
Comment on lines
+845
to
+846
resolverURL := strings.TrimSpace(split[1]) | ||
customDNSResolverMap[domain] = resolverURL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe worth parsing the URL
Suggested change
resolverURL := strings.TrimSpace(split[1]) | |
customDNSResolverMap[domain] = resolverURL | |
resolverURL, err := url.Parse(strings.TrimSpace(split[1])) | |
if err != nil { | |
return nil, err | |
} | |
customDNSResolverMap[domain] = resolverURL.String() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds http retrieval support based on latest boxo.
It needs explicit enabling with an "--http-retrieval-enable" flag.
Allowlist and number of workers can be configured with additional flags.
A provider-ignore flag has been added as well. Example: