-
Notifications
You must be signed in to change notification settings - Fork 9
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
Duplicate block requests #104
Comments
could this be due to the prefetch we do when config is reloaded? https://github.com/ipfs-shipyard/helia-service-worker-gateway/blob/089cacded5d0e74dce6548fa8484b973bbf15ebd/src/redirectPage.tsx#L35 When we implement caching (#73), no more duplicate requests should be sent |
FYI I think ipfs/helia#483 & ipfs/helia-verified-fetch#50 resolves this. |
I've been looking into this issue and wanted to point out that the CID in question: The problem is that the Service Worker intercepts 5 concurrent requests to load css (all under the
Because these are all handled concurrently when the block isn't retrieved and cached yet in the memory block store, the block is requested multiple times.
@SgtPooki Are you referring to any specific PR from that release?
My understanding is that sessions as implemented by ipfs/helia-verified-fetch#50 scope related requests to a specific set of block brokers. Having said that, I don't see how that would solve this problem where essentially 5 requests from the same root CID that share the path segment I may be wrong, though. |
There is some logic in helia sessions that append requests to inflight sessions based on root CID. My thought is that vfetch is kicking off multiple requests for the root because multiple subresources that need loaded (like you mention), and the session code would handle new "wants" by appending to inflight "want-sessions" |
It is worth mentioning that even without sessions we should have a way to handle duplicate block requests though. |
This may be the case for the Bitswap BlockBroker, but for the default Verified Fetch which uses
I agree. |
I believe that logic lives in ipfs/helia-verified-fetch#50 currently. but yes, we need something in trustless-gateay block broker that can determine whether to kick off a |
ipfs/helia#503 will fix this once it is approved, merged, and released. |
Fixes ipfs/service-worker-gateway#104 This PR fixes issues brought up in service-worker-gateway where sub-resources end up causing multiple requests to a trustless gateway for the root CID.
we need to make sure we get the latest block-brokers into helia-verified-fetch, and then pull that in here before this is resolved |
Opening https://vitalik-eth.ipns.inbrowser.link/ on empty cache and empty browser profile requests https://trustless-gateway.link/ipfs/QmNTP17BS7AEHn4TuiyKYtKq1StCMxxXRSt4gpiTdyuHRB?format=raw five times:
To see it, remember to preserve log, as SW will
The text was updated successfully, but these errors were encountered: