Skip to content

Support car-scope param #33

@olizilla

Description

@olizilla

?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: ipfs-inactive/bifrost-gateway#80
see: filecoin-saturn/L1-node#324 (comment) (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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions