webrtc: Decode webrtc message from multiple SCTP messages#594
Open
lexnv wants to merge 14 commits into
Open
Conversation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
messages Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
channels Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
…ction" This reverts commit ca90d49.
dmitry-markin
approved these changes
Jun 1, 2026
| tracing::trace!( | ||
| target: LOG_TARGET, | ||
| buffered = self.noise_recv_buffer.len(), | ||
| "incomplete noise frame, waiting for more bytes", |
Collaborator
There was a problem hiding this comment.
It would be good to also log peerid/remote endpoint here and in other logs.
Co-authored-by: Dmitry Markin <dmitry@markin.tech>
Co-authored-by: Dmitry Markin <dmitry@markin.tech>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR extends WebRTC's compatibility to support interaction with libp2p-go clients.
The libp2p-go implementation makes two separate write calls on the substream:
This then translates over the wire into two SCTP messages. The current implementation only accepts
WebRTC::Messagesif it can be decoded from a single SCTP message.This breaks the WebRTC spec compatibility at two levels:
To align the WebRTC impl to be spec-compliant, this PR adds a buffer for both places, ensuring the decoding acts immediately on:
cc @gab8i @dmitry-markin @skunert