This fixes an issue of json/hex inputs being truncated for very long transactions. Fix core#17618
Rationale for the value:
The largest p2p message type is a 4 MB block? With hex encoding that should be 8 MB. Wrapped again in json, that should be less than 16 MB.
This is a backport of core#18993