Skip to content

Commit

Permalink
IPIP-412: Signaling Block Order in CARs on Gateways
Browse files Browse the repository at this point in the history
First draft based on various prior art and recent discussions cited in
the header front matter.
  • Loading branch information
lidel committed Jul 6, 2023
1 parent 51cc177 commit 742d641
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/ipips/ipip-0412.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ previously seen blocks for two reasons.

1. Blocks can arrive out of order, meaning when a block is consumed (data is
read and returned to the consumer) and when it's received might not match.

1. Blocks can be reused multiple times, this is handy for cases when you plan
to cache on disk but not at all when you want to process a stream with use &
forget policy.
Expand All @@ -56,9 +57,9 @@ CAR flavour is returned with the response.
The proposed solution introduces two new parameters for the content type headers
in HTTP requests and responses: `order` and `dups`.

The `order` parameter lets the client specify the desired block order in the
CAR response, while the `dups` parameter determines if a block is sent multiple
times when it appears more than once in the requested DAG.
The `order` parameter allows the client to indicate its preference for a
specific block order in the CAR response, and the `dups` parameter specifies
whether duplicate blocks are allowed in the response.

### Signaling in Request

Expand Down Expand Up @@ -127,6 +128,10 @@ value is set.

:::

<!-- TODO: do we need a parameter for inclusion of identity CIDs?
It seems to be only relevant in Filecoin due to legacy hiccup:
https://github.com/ipfs/specs/pull/330#issuecomment-1274106892 -->

### Signaling in Response

The Trustless Gateway MUST always respond with a `Content-Type` header that includes
Expand Down

0 comments on commit 742d641

Please sign in to comment.