Problem: Outbound transports encode message types in a fixed 12-byte field without checking that internal callers respect the limit.
An oversized type can abort V1 or overwrite V2's encoding buffer.
The testing-only sendmsgtopeer RPC also accepts payloads above the 4 MB protocol limit, which makes the receiving peer disconnect.
Fix: Treat oversized types and payloads reaching the internal send path as failed assumptions before messages are queued or encoded.
Release builds still drop these messages, while sendmsgtopeer rejects oversized payloads as invalid parameters.