-
Notifications
You must be signed in to change notification settings - Fork 105
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!: add @helia/http to monorepo #372
Conversation
Add info about relation to Helia
889086d
to
e52e6d3
Compare
Besides libp2p being required for @helia/ipns, what's the reason you'd still want libp2p? If you're only fetching from gateways, you shouldn't even need delegated routing. |
Basically anything that uses peer/content routing, which is most things outside of block retrieval. The future is for PUTs on gateways so by configuring HTTP peer/content routers we can use the same code paths as everything else and not need to maintain extra libraries. |
The whole point of @helia/http is to be focused solely on verified block retrieval from gateways, which wouldn't use peer/content routing.
What's the source for this? (are you referring to data onboarding via gateways?). This sounds like a premature optimisation for a use-case that hasn't even been planned. |
If this is the case then maybe it doesn't belong in the I think it's completely reasonable for a user to assume that I'm interested in the resistance to this, could you speak a bit more to that? |
That's an important point to consider. This idea for the package started initially with discussions around verified retrieval in browsers for dapp developers.
I agree. The boundaries between libp2p and Helia are a bit blurry. I presumed that you'd be able to use delegated routing too, without libp2p, but that may arise from a misunderstanding of the boundaries between the two.
|
@2color I've opened #378 - I think it might draw a bit more of a dividing line between them?
Ah, ok cool - this sounds like the sort of use case we'd be encouraging people to use https://github.com/ipfs/web3-fetch/ for? Obviously this PR is needed to implement that functionality but it's got the nice familiar fetch-style API, etc. |
Thank you!
Exactly!
Yep! 💯 |
Removes all libp2p/bitswap deps from `@helia/interface` but retains them in `helia`. Adds a general `Routing` interface to `@helia/interface` that can be used to resolve IPNS names amoung other things. This means `@helia/http` can be libp2p-free.
9d3317d
to
26f4327
Compare
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.
Neat having the routers abstraction, thanks for getting this in shape!
I left some a few cosmetic comments, but looks generally good.
1ac91b6
to
67bbef3
Compare
I'm going to merge this so we get RCs published for further experimentation. |
Adds code from https://github.com/meandavejustice/helia-http to the monorepo, preserving commit history.
Fixes: #289 and #344
BREAKING CHANGE: the
libp2p
property has been removed from theHelia
interface in@helia/interface
- it is still present on the return type ofcreateHelia
from thehelia
module