storacha / freeway

🛣 Experimental IPFS HTTP gateway providing access to UnixFS data via CAR CIDs.
Other
14 stars 5 forks source link

Support `car-scope` param #33

Closed olizilla closed 1 year ago

olizilla commented 1 year ago

?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) or all 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 of car-scope.

?car-scope=block|file|all supersedes ?depth=0|1|all. Both may need to be supported in the short term but car-scope is where the work is going.

see: https://github.com/ipfs/bifrost-gateway/issues/80 see: https://github.com/filecoin-saturn/L1-node/pull/324#discussion_r1160386359 (note lassie has implemented block as root 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)

All traversals will include the content at the termination of the path specifier, as well as all blocks from the root CID to the path terminus where a path is provided. At the termination of a provided path, or from the root CID where no path is provided, the depth of the DAG returned may vary depending on the request or available data. – https://github.com/filecoin-project/lassie/blob/main/docs/CAR.md#dag-depth

### Tasks
- [ ] https://github.com/web3-storage/dagula/pull/8
- [ ] https://github.com/web3-storage/gateway-lib/pull/21
- [x] update freeway
- [x] deploy freeway
olizilla commented 1 year ago

Completed in #35 Deployed as #36