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

feat(yamux): auto-tune (dynamic) stream receive window #4970

Merged
merged 25 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ unsigned-varint = { version = "0.8.0" }
# we import via `rust-multiaddr`.
# This is expected to stay here until we move `libp2p-identity` to a separate repository which makes the dependency relationship more obvious.
libp2p-identity = { path = "identity" }
yamux = { git = "https://github.com/libp2p/rust-yamux", branch = "dynamic-stream-window" }
mxinden marked this conversation as resolved.
Show resolved Hide resolved

[workspace.lints]
rust.unreachable_pub = "warn"
Expand Down
6 changes: 6 additions & 0 deletions muxers/yamux/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
It does not enforce flow-control, i.e. breaks backpressure.
Use `WindowUpdateMode::on_read` instead.
See `yamux` crate version `v0.12.1` and [Yamux PR #177](https://github.com/libp2p/rust-yamux/pull/177).
- `yamux` `v0.13` enables auto-tuning for the Yamux stream receive window.
While preserving small buffers on low-latency and/or low-bandwidth connections, this change allows for high-latency and/or high-bandwidth connections to exhaust the available bandwidth on a single stream.
Have `libp2p-yamux` use `yamux` `v0.13` (new version) by default and fall back to `yamux` `v0.12` (old version) when setting any configuration options.
Thus default users benefit from the increased performance, while power users with custom configurations maintain the old behavior.
`libp2p-yamux` will switch over to `yamux` `v0.13` entirely with the next breaking release.
See [PR 4970](https://github.com/libp2p/rust-libp2p/pull/4970).

## 0.45.0

Expand Down
4 changes: 3 additions & 1 deletion muxers/yamux/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ keywords = ["peer-to-peer", "libp2p", "networking"]
categories = ["network-programming", "asynchronous"]

[dependencies]
either = "1"
futures = "0.3.29"
libp2p-core = { workspace = true }
thiserror = "1.0"
yamux = "0.12"
yamux012 = { version = "0.12.1", package = "yamux" }
yamux013 = { version = "0.13", package = "yamux" }
tracing = "0.1.37"

[dev-dependencies]
Expand Down
Loading
Loading