Aggregate TCP chunks with unmarshal protobuf retry #903
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #729
After successful internal testing on sei-testnet, we've decided to suggest this fix to tmkms upstream.
I've read all the previous discussions and understand the concern that this should belong to tendermint_p2p rather. I'm also agree that tendermint_p2p uses the wrong abstraction in a first place: a stream for a message-oriented protocol.
However, I don't see how it can be fixed inside of tendermint_p2p also: while tendermint / cometbft divides the data by chunks, it doesn't send the full length of data in advance, which means, it is not possible to glue these chunks together.
While his issue was seen only on Sei network, I think that it is rather an issue of tendermint TCP protocol design: it has implicit requirement for length over TCP which was not obvious even for authors of tendermint, it seems. Extending the message size shouldn't break the communication (see expanded below).
Here is the original message from a PR to our fork for the reference: