From 742d64122db92827dca5525b59efad1c146aa576 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Mon, 15 May 2023 14:33:10 +0200 Subject: [PATCH] IPIP-412: Signaling Block Order in CARs on Gateways First draft based on various prior art and recent discussions cited in the header front matter. --- src/ipips/ipip-0412.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ipips/ipip-0412.md b/src/ipips/ipip-0412.md index 664d08b18..c0b20beda 100644 --- a/src/ipips/ipip-0412.md +++ b/src/ipips/ipip-0412.md @@ -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. @@ -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 @@ -127,6 +128,10 @@ value is set. ::: + + ### Signaling in Response The Trustless Gateway MUST always respond with a `Content-Type` header that includes