-
Notifications
You must be signed in to change notification settings - Fork 5
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
Support car-scope
param
#33
Comments
olizilla
added a commit
to storacha/dagula
that referenced
this issue
Apr 17, 2023
add getPath method as a generator that returns blocks for the targeted dag and all blocks traversed while resolving a cid+path string supports carScope to specify what blocks to return for the resolved dag - 'all': return the entire dag starting at path. (default) - 'block': return the block identified by the path. - 'file': Mimic gateway semantics: Return All blocks for a multi-block file or just enough blocks to enumerate a dir/map but not the dir contents. see: storacha/freeway#33 see: storacha/freeway#34 TODO: - [] find out how to identify the boundaries of a unixfs hamt (unixfs-exported seems to define it as "not having an empty or null Link.Name after the first 2 chars are stripped, which seems risky... what happens if the actual dir listing has 2 char long link names? see: https://github.com/ipfs/js-ipfs-unixfs/blob/e853049bd63d6773442e1540ae49b6a443ca8672/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/hamt-sharded-directory.ts#L20-L42 License: MIT Signed-off-by: Oli Evans <[email protected]>
1 task
olizilla
added a commit
to storacha/dagula
that referenced
this issue
May 1, 2023
add getPath method as a generator that returns blocks for the targeted dag and all blocks traversed while resolving a cid+path string supports carScope to specify what blocks to return for the resolved dag - `'all'`: return the entire dag starting at path. (default) - `'block'`: return the block identified by the path. - `'file'`: Mimic gateway semantics: Return All blocks for a multi-block file or just enough blocks to enumerate a dir/map but not the dir contents. see: storacha/freeway#33 see: storacha/freeway#34 see: ipfs/specs#402 TODO: - [x] find out how to identify the boundaries of a unixfs hamt ...unixfs-exporter seems to define it as "not having an empty or null Link.Name after the first 2 chars are stripped, which seems loose... what happens if the actual dir listing has 2 char long link names? see: https://github.com/ipfs/js-ipfs-unixfs/blob/e853049bd63d6773442e1540ae49b6a443ca8672/packages/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/hamt-sharded-directory.ts#L20-L42 License: MIT --------- Signed-off-by: Oli Evans <[email protected]> Co-authored-by: Alan Shaw <[email protected]>
olizilla
added a commit
to storacha/gateway-lib
that referenced
this issue
May 1, 2023
- update dagula to get `getPath` with carScope support https://github.com/web3-storage/dagula/releases/tag/v6.0.0 - update handleCar to extract ?car-scope query and use `dagula.getPath` BREAKING CHANGE: CARs returned for cid+path will now be rooted at the root cid rather than the resovled cid for the end of the path and include all blocks needed to verify the path was traveresed correctly. see: storacha/freeway#33 see: storacha/freeway#34 License: MIT Signed-off-by: Oli Evans <[email protected]>
olizilla
added a commit
to storacha/gateway-lib
that referenced
this issue
May 2, 2023
- update dagula to get `getPath` with carScope support https://github.com/web3-storage/dagula/releases/tag/v6.0.0 - update handleCar to extract ?car-scope query and use `dagula.getPath` BREAKING CHANGE: CARs returned for cid+path will now be rooted at the root cid rather than the resovled cid for the end of the path and include all blocks needed to verify the path was traveresed correctly. see: storacha/freeway#33 see: storacha/freeway#34 License: MIT --------- Signed-off-by: Oli Evans <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
?car-scope=block|file|all
lets the user state if they want a single block , or the subset of blocks needed for a file or complete dir listing (could be single unixfs directory block or all hamt shards required to construct dir list) orall
the blocks for the dag (traditional flavour, how freeway works today for CAR responses)... note that #32 still applies and CARs should also contain all additional blocks required to verify any path provided, regardless ofcar-scope
.?car-scope=block|file|all
supersedes?depth=0|1|all
. Both may need to be supported in the short term butcar-scope
is where the work is going.see: ipfs-inactive/bifrost-gateway#80
see: filecoin-saturn/L1-node#324 (comment) (note lassie has implemented
block
asroot
currently.For context, from the Lassie car spec (which then goes on to describe the params in terms of
depthType
which seems to be another previous iteration on this)The text was updated successfully, but these errors were encountered: