From bf4936d6d7269834690e1eaf2fb2b6686a5201ca Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Sun, 15 Oct 2017 22:18:10 +0100 Subject: [PATCH] Specify max event size more precisely This is somewhat inelegant, and will please nobody, but I think it's more important that we specify the current state of the onion than worry about what would have been nice, and introduce incompatibilities while we do so. --- specification/events.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/specification/events.rst b/specification/events.rst index 91b837c6..69a87927 100644 --- a/specification/events.rst +++ b/specification/events.rst @@ -32,8 +32,11 @@ server-server API. Size limits ----------- -The total size of any event MUST NOT exceed 65 KB. There are additional -restrictions on sizes per key: +The complete event MUST NOT be larger than 65535 bytes, when formatted as a +`PDU for the Server-Server protocol <../server_server/SERVER_RELEASE_LABEL%#pdus>`_, +including any signatures, and encoded as `Canonical JSON`_. + +There are additional restrictions on sizes per key: - ``sender`` MUST NOT exceed 255 bytes (including domain). - ``room_id`` MUST NOT exceed 255 bytes. @@ -67,3 +70,4 @@ prefixed with ``m.`` {{m_room_redaction_event}} +.. _`Canonical JSON`: ../appendices.html#canonical-json