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

Interpret the initial WindowUpdate additive. #92

Closed
twittner opened this issue Aug 26, 2020 · 3 comments
Closed

Interpret the initial WindowUpdate additive. #92

twittner opened this issue Aug 26, 2020 · 3 comments

Comments

@twittner
Copy link
Contributor

twittner commented Aug 26, 2020

Issue #90 revealed a mismatch between go-yamux and this crate w.r.t. the initial window update: This crate understands the initial window update as the total receive window size whereas go-yamux adds the window update to the implicit default of 256 KiB. The spec should probably understood to mean the latter and the differences need to be resolved anyway, so this issue outlines a way forward.

We will publish four versions of this crate which move from the current interpretation to the additive one:

  1. yamux-0.5.0 checks the currently unused flag 0x8000. If present it interprets an initially received window update as additive.
  2. yamux-0.6.0 behaves like yamux-0.5.0 but also sets the flag 0x8000 when sending the initial window update. It deprecates the lazy_open flag and determines automatically if an initial window update needs to be sent based on the receive_window setting (i.e. if it is greater than the default window an initial window update will be sent, otherwise not).
  3. yamux-0.7.0 always interprets the initially received window update as additive and does not check for flag 0x8000. It still sets the flag itself to be compatible with yamux-0.6.0.
  4. yamux-0.8.0 behaves like yamux-0.7.0 but no longer sets the 0x8000 flag. It removes the lazy_open config setting.

Every released version is compatible only with its immediate predecessor.

Thanks to @romanb for suggesting the temporary use of unused flags.

CC: @pawanjay176, @AgeManning, @tomaka

@twittner
Copy link
Contributor Author

@pawanjay176: Would you mind checking if #96 (which represents the end of the transition) works with your go-libp2p-yamux setup?

@pawanjay176
Copy link

Can confirm, don't see the error anymore with go-libp2p-yamux 🎉

@twittner
Copy link
Contributor Author

twittner commented Sep 9, 2020

All relevant crates have all been updated and published on crates.io. See the yamux CHANGELOG and the correspnding libp2p-yamux CHANGELOG for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants