The size of a serialised transaction is stored in 6 bytes: https://microsoft.github.io/CCF/main/architecture/ledger.html#transaction-format
We have no further restriction on the size, which means corrupt ledger files can produce a fatal bad_alloc error. We should allow this to be set, and error-or-adjust that based on the allocator metadata's, and then throw clear errors on serialization or deserialisation if this is breached.