protocols/gossipsub: remove RPC message size check#1910
Conversation
Since df7e73e, a too large sized RPC message will be fragmented. Therefore, the old message size check should be removed.
mxinden
left a comment
There was a problem hiding this comment.
If I recall correctly this length check is still needed, given that one can not fragment a single message, but only a set of messages wrapped in a single rpc type.
This might be related to https://github.com/sigp/rust-libp2p/pull/93/files/73b4d9f21209214b0a93fff6f5c7b4b8295f9716#r528471904
@AgeManning would you mind taking a look?
|
Yep @mxinden is correct. A gossipsub RPC can contain many messages, control messages and subscriptions. If the total message is larger than the max transmit size the fragmentation splits these into to separate gossipsub RPCs. If the encoded message to be sent is larger than the maximum transmit size, then we cannot send that message and we can't fragment it. The check here is still relevant to catch these. @mxinden - Sorry even though you pinged me in that chain in the PR I seem to have missed it. The comments that say it is within 10% of the true value are old. They were related to a custom |
|
Thanks for the explanation. |
|
BTW, any chance to publish a new release of libp2p for gossipsub 1.1? |
|
Sure. I will cut a new release of |
Since df7e73e, a too large sized RPC message will be fragmented. Therefore, the old message size check should be removed.