While working on https://github.com/tendermint/tendermint/pull/5321, I saw that we're stopping the peer if it sends us a message bigger than maxMsgSize.
maxMsgSize = MaxBatchBytes + proto overhead
maxMsgSize = 10MB + 4 bytes
Because MaxBatchBytes is a config parameter (defined locally and not agreed by all nodes), peers can break the connection with our node if we increase this parameter and send them bigger messages.
I prefer specifying it in the handshake; why guess when we can know?
Most helpful comment
I prefer specifying it in the handshake; why guess when we can know?