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

muxers/mplex: Allow up to 60 bit long stream IDs #2061

Closed
mxinden opened this issue Apr 28, 2021 · 2 comments
Closed

muxers/mplex: Allow up to 60 bit long stream IDs #2061

mxinden opened this issue Apr 28, 2021 · 2 comments
Labels
bug difficulty:moderate getting-started Issues that can be tackled if you don't know the internals of libp2p very well

Comments

@mxinden
Copy link
Member

mxinden commented Apr 28, 2021

According to the mplex specification a stream ID embedded in an mplex header can be up to 60 bit long.

The maximum header length is 9 bytes (per the unsigned-varint spec). With 9 continuation bits and 3 message flag bits the maximum stream ID is 60 bits (maximum value of 2^60 - 1).

Today, Rust libp2p-mplex restricts mplex headers to 32 bit.

HasHeader(u32),

The rust libp2p-mplex implementation should support up 60 bit long stream IDs like specified in the mplex specification.

See libp2p/specs#317 for details.

@mxinden mxinden added bug difficulty:moderate getting-started Issues that can be tackled if you don't know the internals of libp2p very well labels Apr 28, 2021
@whereistejas
Copy link

Hi @mxinden ! If possible, I would love to take up this issue.

whereistejas pushed a commit to whereistejas/rust-libp2p that referenced this issue Jun 5, 2021
mxinden added a commit that referenced this issue Jun 28, 2021
Resolving issue: #2061

Co-authored-by: Max Inden <mail@max-inden.de>
@mxinden
Copy link
Member Author

mxinden commented Jun 28, 2021

Closing here since #2094 is merged.

@mxinden mxinden closed this as completed Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug difficulty:moderate getting-started Issues that can be tackled if you don't know the internals of libp2p very well
Projects
None yet
Development

No branches or pull requests

2 participants