You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- TODO Planned: https://github.com/ipfs/go-ipfs/issues/8769
218
-
- `selector=<cid>` can be used for passing a CID with [IPLD selector](https://ipld.io/specs/selectors)
219
-
- Selector should be in dag-json or dag-cbor format
220
-
- This is a powerful primitive that allows for fetching subsets of data in specific order, either as raw bytes, or a CAR stream. Think “HTTP range requests”, but for IPLD, and more powerful.
221
-
-->
218
+
### `dag-scope` (request query parameter)
219
+
220
+
Only used on CAR requests, same as :ref[dag-scope] from :cite[trustless-gateway].
221
+
222
+
### `entity-bytes` (request query parameter)
223
+
224
+
Only used on CAR requests, same as :ref[entity-bytes] from :cite[trustless-gateway].
222
225
223
226
# HTTP Response
224
227
@@ -592,7 +595,11 @@ The following response types require an explicit opt-in, can only be requested w
592
595
- Raw Block (`?format=raw`)
593
596
- Opaque bytes, see [application/vnd.ipld.raw](https://www.iana.org/assignments/media-types/application/vnd.ipld.raw).
594
597
- CAR (`?format=car`)
595
-
- Arbitrary DAG as a verifiable CAR file or a stream, see [application/vnd.ipld.car](https://www.iana.org/assignments/media-types/application/vnd.ipld.car).
598
+
- A CAR file or a stream that contains all blocks required to trustlessly verify the requested content path query, see [application/vnd.ipld.car](https://www.iana.org/assignments/media-types/application/vnd.ipld.car) and :cite[trustless-gateway].
599
+
-**Note:** by default, block order in CAR response is not deterministic,
600
+
blocks can be returned in different order, depending on implementation
601
+
choices (traversal, speed at which blocks arrive from the network, etc).
602
+
An opt-in ordered CAR responses MAY be introduced in a future IPIP.
596
603
- TAR (`?format=tar`)
597
604
- Deserialized UnixFS files and directories as a TAR file or a stream, see :cite[ipip-0288].
field MUST match the `version` parameter returned in `Content-Type` header.
210
+
211
+
#### CAR roots
212
+
213
+
The behavior associated with the
214
+
[`CarV1Header.roots`](https://ipld.io/specs/transport/car/carv1/#header) field
215
+
is not currently specified.
216
+
217
+
Clients MAY ignore it.
218
+
219
+
:::issue
220
+
221
+
As of 2023-06-20, the behavior of the `roots` CAR field remains an [unresolved item within the CARv1 specification](https://web.archive.org/web/20230328013837/https://ipld.io/specs/transport/car/carv1/#unresolved-items).
222
+
223
+
:::
224
+
225
+
#### CAR determinism
226
+
227
+
The default CAR header and block order in a CAR response is not specified and is non-deterministic.
228
+
229
+
Clients MUST NOT assume that CAR responses are deterministic (byte-for-byte identical) across different gateways.
230
+
231
+
Clients MUST NOT assume that CAR includes CIDs and their blocks in the same order across different gateways.
232
+
233
+
:::issue
234
+
235
+
In controlled environments, clients MAY choose to rely on undocumented CAR determinism,
236
+
subject to the agreement of the following conditions between the client and the
237
+
gateway:
238
+
- CAR version
239
+
- content of [`CarV1Header.roots`](https://ipld.io/specs/transport/car/carv1/#header) field
240
+
- order of blocks
241
+
- status of duplicate blocks
242
+
243
+
In the future, there may be an introduction of a convention to indicate aspects
244
+
of determinism in CAR responses. Please refer to
245
+
[IPIP-412](https://github.com/ipfs/specs/pull/412) for potential developments
0 commit comments