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
Copy file name to clipboardexpand all lines: src/routing/http-routing-v1.md
+7-13
Original file line number
Diff line number
Diff line change
@@ -114,9 +114,8 @@ Server SHOULD accept representing writes is [Announcement Schema](#announcement
114
114
115
115
:::warn
116
116
117
-
TODO: is below a sensible limit?
118
-
119
-
There SHOULD be no more than 100 `Providers` per request.
117
+
Since non-streaming results have to be buffered before sending,
118
+
server SHOULD be no more than 100 `Providers` per `application/json` response.
120
119
121
120
:::
122
121
@@ -195,10 +194,9 @@ Each object in the `Peers` list is a record conforming to the [Peer Schema](#pee
195
194
}
196
195
```
197
196
198
-
Each object in the `Providers` list is a *write provider record* entry.
197
+
Each object in the `Peers` list is a *write peer record* entry.
199
198
200
-
Server SHOULD accept writes represented with [Announcement Schema](#announcement-schema)
201
-
objects with `CID` list.
199
+
Server SHOULD accept writes represented with [Announcement Schema](#announcement-schema).
202
200
203
201
#### `POST` Response codes
204
202
@@ -396,9 +394,9 @@ The `announcement` schema can be used in `POST` operations to announce content p
396
394
397
395
-`Schema`: tells the server to interpret the JSON object as announce provider
398
396
-`Payload`: is a DAG-JSON-compatible object with a subset of the below fields
399
-
-`CID` is the CID being provided.
397
+
-`CID` is the CID being provided (`/routing/v1/providers` only).
400
398
- This field is not presend when used for `POST /routing/v1/peers`
401
-
-`Scope` is an optional hint that provides semantic meaning about announced identifies:
399
+
-`Scope` is an optional hint that provides semantic meaning about CID (`/routing/v1/providers` only):
402
400
-`block` announces only the individual block (this is the implicit default if `Scope` field is not present).
403
401
-`entity` announces CIDs required for enumerating entity behind the CID (e.g.: all blocks for UnixFS file or a minimum set of blocks to enumerate contents of HAMT-sharded UnixFS directory, only top level of directory tree, etc).
404
402
-`recursive` announces entire DAGs behind the CIDs (e.g.: entire DAG-CBOR DAG, or everything in UnixFS directory, including all files in all subdirectories).
@@ -422,11 +420,7 @@ The `announcement` schema can be used in `POST` operations to announce content p
422
420
If support for big keys is needed in the future, this spec can be updated to allow the client to provide the key and key type out-of-band by adding optional `PublicKey` fields, and if the Peer ID is a CID, then the server can verify the public key's authenticity against the CID, and then proceed with the rest of the verification scheme.
423
421
- A [400 Bad Request](https://httpwg.org/specs/rfc9110.html#status.400) response code SHOULD be returned if the `Signature` check fails.
424
422
425
-
:::warn
426
-
427
-
TODO: what should be the limits? Max number of CIDs per `announcement` ?
428
-
429
-
:::
423
+
Server SHOULD return HTTP 400 Bad Request when announcement `Payload` serizalized to DAG-CBOR is bigger than 2MiB.
0 commit comments