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: race a http gateway with p2p in iroh-one's content loader #338

Merged
merged 1 commit into from
Oct 15, 2022

Conversation

fabricedesre
Copy link
Contributor

This adds to iroh-one a new optional configuration item: resolver_gateway
If resolver_gateway is set, the resolver will race the p2p node with fetching a raw block from the gateway.

A new source is also introduced to classify blocks coming from a gateway out from those fetched from p2p or store. Hits from the gateway are considered as not cached for telemetry purposes.

ping @b5

Copy link
Collaborator

@Arqu Arqu left a comment

Choose a reason for hiding this comment

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

Looks good, can we get the rustfmt in order and I can merge then.

@fabricedesre fabricedesre force-pushed the iroh-one-racing-gateway branch from c050acd to 72ff3c7 Compare October 14, 2022 23:14
@fabricedesre
Copy link
Contributor Author

Looks good, can we get the rustfmt in order and I can merge then.

fixed in latest push.

This adds to iroh-one a new optional configuration item: resolver_gateway
If resolver_gateway is set, the resolver will race the p2p node with
fetching a raw block from the gateway.

A new source is also introduced to classify blocks coming from a gateway out
from those fetched from p2p or store. Hits from the gateway are considered as
not cached for telemetry purposes.
@fabricedesre fabricedesre force-pushed the iroh-one-racing-gateway branch from 72ff3c7 to 5416108 Compare October 14, 2022 23:43
@Arqu Arqu merged commit 40cb232 into n0-computer:main Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants