Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protocols/plaintext: Incompatible UVI encoding with Go implementation #1760

Closed
mxinden opened this issue Sep 15, 2020 · 0 comments · Fixed by #1765
Closed

protocols/plaintext: Incompatible UVI encoding with Go implementation #1760

mxinden opened this issue Sep 15, 2020 · 0 comments · Fixed by #1765
Labels

Comments

@mxinden
Copy link
Member

mxinden commented Sep 15, 2020

The Golang /plaintext/2.0.0 implementation uses UVI encoding for the handshake messages only, not for the actual goodput of the protocol.

https://github.com/libp2p/go-libp2p-core/blob/master/sec/insecure/insecure.go

The Rust /plaintext/2.0.0 implementation uses UVI encoding for both the handshake messages as well as all further messages exchanged over the protocol.

https://github.com/libp2p/rust-libp2p/blob/master/protocols/plaintext/src/lib.rs#L174

The /plaintext/2.0.0 specification is somewhat vague, saying all messages should be UVI encoded, but not whether that includes messages send after the handshake (goodput):

Message Framing

All messages sent over the wire are prefixed with the message length in bytes, encoded as an unsigned variable length integer as defined by the multiformats unsigned-varint spec.

https://github.com/libp2p/specs/tree/master/plaintext

@mxinden mxinden added the bug label Sep 15, 2020
@mxinden mxinden changed the title protocols/plaintext: Resolve incompatibility with Go implementation protocols/plaintext: Incompatible UVI encoding with Go implementation Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant