-
Notifications
You must be signed in to change notification settings - Fork 14
fix: do not download all blocks when listing dir #261
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
Conversation
SgtPooki
left a comment
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.
self review
| listing: items.map((item) => { | ||
| return { | ||
| size: item.size.toString(), | ||
| size: item.size?.toString() ?? '?', |
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.
we no longer have the sizes.. we will need to either fetch them with stat or decide on a better default.
|
@SgtPooki can I help resolve this with feedback from a user perspective? |
|
change in ipfs/js-ipfs-unixfs#440 should fix passing |
|
we chatted about this in ipfs/helia#850 and just setting |
|
currently running into issues with gateway conformance hanging.. i'm investigating |
|
tested this branch vs main (using @parkan let me know if anything seems off here.. Ideally we would add some configurability to the dir-index-html plugin to support getting the sizes of children when necessary.. This PR:Server timing (1.78s to load large dir)
Screenshot
Main:Server timing (times out due to basic-server 10s timeout)
Screenshot
|
## [@helia/verified-fetch-v3.2.2](https://github.com/ipfs/helia-verified-fetch/compare/@helia/verified-fetch-3.2.1...@helia/verified-fetch-3.2.2) (2025-09-15) ### Bug Fixes * do not download all blocks when listing dir ([#261](#261)) ([356e62c](356e62c))
|
🎉 This PR is included in version @helia/verified-fetch-v3.2.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
beautiful! will test and report but the numbers are already looking good 👍 |




Title
fix: do not download all blocks when listing dir
Description
Fixes #260
Related ipfs/helia#836
Related ipfs/js-ipfs-unixfs#439
Related ipfs/js-ipfs-unixfs#440
Notes & open questions
Two things:
extended: falseoption.extended: falseoption.Other places we may want to use
extended: falseThere are multiple places where we use
unix-fs-exporter.. these were added and commented out in the initial commit in this PR:e4d7a15(#261)./packages/verified-fetch/src/utils/walk-path.tsconst entry of exporterWalk(path, blockstore, options)do we need to call it here?./packages/verified-fetch/src/plugins/plugin-handle-dag-pb.tsplaces where we call
() => exporterBug with
extended: falseLooking at these lines in
plugin-handle-dag-pb:helia-verified-fetch/packages/verified-fetch/src/plugins/plugin-handle-dag-pb.ts
Lines 96 to 101 in cd5a103
When
extended: true, and added a console.log forentry,I get the following output:When
extended: false, I get the following:The exporter is not reporting on the path passed to it.. instead taking the root and seeming to stop. This is tested with:
in /packages/verified-fetch
At the most, this seems like a bug.. at the least, it’s unexpected that passing extended: false would change the CID the response is giving back
In summary:
Passing
extended: falseon a path that exists,<CID>/index.htmlin this case, to the exporter returns only the CID of the directory, not of the file at the path I give it.Change checklist