pub const MAX_BODY_BYTES: usize = _; // 4_194_304usizeExpand description
The largest dig-profile body the control plane accepts or returns, in bytes: 4 MiB.
§Why the contract carries the cap instead of the implementation
A client that learns the bound by exceeding it learns it as a failed round trip, after paying to serialize and send megabytes. Stated here, an app checks before it sends and can tell a person this profile is too large rather than something went wrong.
§Why this number
It is HALF of dig-gossip’s WS_MAX_MESSAGE_BYTES (8 MiB), the frame ceiling a body must fit
inside when a node serves it to a peer over PROFILE_BODY (opcode 225). A body accepted here
but unservable there would be stored and then permanently unsyncable — accepted by the node the
app talks to and invisible to every other node. The halving leaves room for the framing,
envelope and base64 expansion that sit around the bytes on that hop.
The cap is on the DECODED body, not on the base64 text that carries it.