~ knotless Search/
↑↓ move↵ open⇧↵ all results

zat.dev/zds

atproto pds · mirror of https://tangled.org/zat.dev/zds

0
0
33 lines · 1.9 KB Raw History

Record size enforcement

ZDS limits public repository records to 1,000,000 DAG-CBOR bytes, inclusive. The check applies to createRecord, putRecord, and each create/update in applyWrites, including validate=false. Oversized writes return HTTP 400 InvalidRequest before storing blocks, changing the repository, or publishing an event. A batch containing an oversized record is rejected atomically. Import checks MST-referenced record blocks before replacing the repository; unreferenced CAR blocks are not treated as records. Existing records can still be read and deleted.

The sync specification sets one million bytes per record block. Its two-million-byte CAR limit is a separate aggregate limit. The informal guide's 1 MiB recommendation and the HTTP request-body cap do not override the encoded record limit. The limit does not alter batch-to-sync behavior or relay reconnect policy.

commit limits

A write's #commit event can carry at most 200 ops and 2,000,000 bytes of blocks, the limits the subscribeRepos lexicon puts on ops and blocks; relays drop larger frames. ZDS refuses an applyWrites with more than 200 writes, and any createRecord, putRecord or applyWrites whose event CAR (commit, record and changed MST blocks) would exceed 2,000,000 bytes, with HTTP 400 InvalidRequest and the reference PDS's messages, "Too many writes. Max: 200" and "Too many writes. Max event size: 2MB". The check runs before anything is stored. The reference measures the sum of block bytes; ZDS measures the CAR itself, the field the lexicon limits, which adds a few dozen bytes per block. importRepo is not limited this way.

The reference comparison and verification from when the limit was added are in history.