Make webrtc-specific multistream-select negotiation spec compliant#537
Closed
haikoschol wants to merge 28 commits intoparitytech:masterfrom
Closed
Make webrtc-specific multistream-select negotiation spec compliant#537haikoschol wants to merge 28 commits intoparitytech:masterfrom
haikoschol wants to merge 28 commits intoparitytech:masterfrom
Conversation
… for acknowledgment
…f inbound to self
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
Author
|
I meant to open this in our fork first and get a review from @timwu20. Will convert this to draft because it builds on work that should reviewed first in a PR that hasn't been opened in this repo yet. |
Contributor
Author
|
After syncing with @timwu20 we decided that opening a PR for these changes based off master easier for everyone. |
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 brings the WebRTC-specific multistream-select implementation in line with the spec. Before this change, the header, the desired protocol and all fallback protocols were sent in a single multistream-select message. The spec mandates that only the desired protocol is to be sent instead. If the peer responds with a
na, indicating it does not support this protocol, another multistream-select message should be sent, containing the first fallback protocol. This is to be repeated until the peer accepts a protocol or the dialer runs out of fallbacks.This fix is required for interop with smoldot. Without this fix, the following happens:
/multistream/1.0.0\n/c7fd75141ca230c62e99af66d68f9d1f84b0821bcc1e17d2be92aaf5602d1c0e/block-announces/1\n/dot/block-announces/1\n)./c7fd75141ca230c62e99af66d68f9d1f84b0821bcc1e17d2be92aaf5602d1c0e/block-announces/1\nand sends back a confirmation.DecodeBlockAnnounceError(Verify).This PR builds on ChainSafe/litep2p#6 to incorporate the changes to WebRTC protobuf flag handling.
closes #75