Skip to content

Commit f7daba8

Browse files
committed
docs(trustless-gateway): Add p2p usage section
Clarify caveats around utilizing trustless gateways within p2p networks
1 parent 110bf46 commit f7daba8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/http-gateways/trustless-gateway.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,3 +541,21 @@ identity CIDs MAY not be handled.
541541
MUST support [`HEAD` requests](#head-ipfs-cid-path-params).
542542

543543
The response is the same as [`GET`](#get-ipfs-bafkqaaa) but without body and all headers are optional.
544+
545+
## Usage Within Peer-to-Peer(p2p) Networks
546+
547+
While Trustless Gateways can be used as a verifiable gateway into a wider IPFS network, they can also be used as retrieval endpoints within a p2p IPFS network such as IPFS Mainnet.
548+
When in p2p environments there are additional constraints for implementers to be aware of
549+
550+
### Block Limits
551+
552+
Clients SHOULD NOT download unbounded amounts of data before being able to validate that data. The RECOMMENDED maximum block size for clients to accept is 2MiB.
553+
554+
### HTTPS and HTTP/2
555+
556+
Gateways serving data to non-LAN peers SHOULD support HTTPS and HTTP/2 or greater.
557+
Similarly, it is RECOMMENDED that clients restrict communications with non-LAN peers to HTTPS and HTTP/2 or greater.
558+
559+
### Recursion
560+
561+
Trustless Gateways meant to be used within p2p contexts SHOULD NOT themselves recursively search for content to return.

0 commit comments

Comments
 (0)