-
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
Lassie compatible http api for fetching CARs #34
Comments
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]>
|
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]>
- 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]>
- 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]>
update `dagula` and `gateway-lib` to add supoport for car-scope and verifiable paths for cars see: #34 License: MIT Signed-off-by: Oli Evans <[email protected]>
update `dagula` and `gateway-lib` to add supoport for car-scope and verifiable paths for cars see: #34 License: MIT Signed-off-by: Oli Evans <[email protected]>
@willscott is "Announce HTTP endpoint as an extended family member to the indexer" required before we can test against lassie? |
I don't think so! Lassie as a CLI App allows retrieval against a manually specified provider endpoint, skipping the indexer lookup. |
ah, i see, something something |
you'll want to be on the http retrieval branch filecoin-project/lassie#204 in order to test cc @rvagg |
Success!? ✨ 🎷 🐩
Minor: you get an error if you try and provide a more succinct http flavour multiaddr sans p2p like
|
cid+path works
|
|
How to announce what we have over http to the indexers needs some discussion as we only support dag roots via http today storacha/w3up#786 |
Offer an http api that Lassie / Saturn could use to fetch CARs from us. Tweak our existing CAR responses to match the Lassie spec.
We already support CAR responses, we just need to tweak the existing code to write traversed blocks to the CAR to make them verifiable, and handle sending subsets of the total dag when directed to by the
?car-scope
param.The text was updated successfully, but these errors were encountered: