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

deps(yamux): update yamux to v0.12 #3013

Merged
merged 50 commits into from
Aug 2, 2023
Merged

deps(yamux): update yamux to v0.12 #3013

merged 50 commits into from
Aug 2, 2023

Conversation

thomaseizinger
Copy link
Contributor

@thomaseizinger thomaseizinger commented Oct 12, 2022

Description

Notes

As discussed in libp2p/rust-yamux#142 (comment), I would suggest to release this as an alpha and then ask our users to depend on that alpha directly instead of using libp2p::yamux so we can get some feedback on how this implementation performs in the wild.

I think we should probably hold off on merging this but keep this PR to discuss any feedback that we might get. Perhaps the changelog entry should be merged to ensure that one is correct.

Thoughts?

Open Questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

@thomaseizinger
Copy link
Contributor Author

The inter-op tests fail because we are patching yamux in the entire workspace and testground doesn't seem to like that as it is now failing to compile the previous rust-libp2p version.

All local tests are green though which is exciting 😊

@mxinden
Copy link
Member

mxinden commented Oct 17, 2022

Cross referencing libp2p/rust-yamux#142 (comment) here for visibility.

@thomaseizinger thomaseizinger changed the title muxers/yamux: Update yamux deps(yamux): update yamux to v0.11.0 Dec 7, 2022
@thomaseizinger thomaseizinger marked this pull request as ready for review December 7, 2022 04:25
@thomaseizinger
Copy link
Contributor Author

@mxinden: In case you are happy with the changes, can you release this on crates.io please? I'll then write a "call for testing" comment on #3202.

@thomaseizinger
Copy link
Contributor Author

The last commit is required so that our test suite actually runs.

@rkuhn
Copy link
Contributor

rkuhn commented Dec 7, 2022

Since I won’t be able to do a full review of the underlying changes: is my assumption correct that the new version shall be 100% network compatible with the current version?

@thomaseizinger
Copy link
Contributor Author

Since I won’t be able to do a full review of the underlying changes: is my assumption correct that the new version shall be 100% network compatible with the current version?

Yes, should be 100% network compatible.

@thomaseizinger
Copy link
Contributor Author

@mxinden: In case you are happy with the changes, can you release this on crates.io please? I'll then write a "call for testing" comment on #3202.

@mxinden: Friendly ping.

@mxinden
Copy link
Member

mxinden commented Dec 12, 2022

Tagged and published.

I think we should probably hold off on merging

👍

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes (excluding dependency override) look good to me.

Thank you for debugging this across implementations!

interop-tests/src/lib.rs Show resolved Hide resolved
@thomaseizinger
Copy link
Contributor Author

@mxinden can you give libp2p/rust-yamux#153 another review?

@mxinden
Copy link
Member

mxinden commented Jul 7, 2023

Blocked on libp2p/rust-yamux#166.

@mxinden
Copy link
Member

mxinden commented Jul 7, 2023

@mxinden can you give libp2p/rust-yamux#153 another review?

Done. Approved.

@thomaseizinger thomaseizinger changed the title deps(yamux): update yamux to v0.11.1 deps(yamux): update yamux to v0.12 Jul 20, 2023
@thomaseizinger
Copy link
Contributor Author

Something is not quite right, still. For some reason, the kademlia test two_servers_add_each_other_to_routing_table now always fails.

It seems like some of the events now happen in a different order. Interestingly, we already seem to be receiving events for kademlia before event emitting the ConnectionEstablished event. I am guessing this happens because the connection tasks are actually running parallel in the background. For Swarm::new_ephemeral though, we don't use an executor so there is no actual background work happening.

@mxinden
Copy link
Member

mxinden commented Jul 31, 2023

@thomaseizinger do you have time this or next week to look into the above libp2p-kad failures? I think realizing the many improvements in yamux v0.12 in libp2p is worth the additional effort.

@thomaseizinger
Copy link
Contributor Author

@thomaseizinger do you have time this or next week to look into the above libp2p-kad failures? I think realizing the many improvements in yamux v0.12 in libp2p is worth the additional effort.

I'll have a look.

@thomaseizinger
Copy link
Contributor Author

@mxinden I adapted the tests so they are passing now. I ended up being as simple as removing two events from the match that are now (consistently) emitted earlier and thus "swallowed" by the swarm.listen call whilst waiting for the connection to be fully setup.

This is ready for review / merge now!

mxinden added a commit to libp2p/test-plans that referenced this pull request Aug 1, 2023
Benchmark performance impact of rust-yamux v0.12 upgrade on rust-libp2p, more
specifically libp2p/rust-libp2p#3013.
Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me. Unless the performance benchmarks (see link above) show any regressions, this is good to merge from my end.

muxers/yamux/CHANGELOG.md Outdated Show resolved Hide resolved
@thomaseizinger
Copy link
Contributor Author

Can't see a regression but also unfortunately no improvement in performance: https://observablehq.com/@libp2p-workspace/performance-dashboard?branch=perf-rust-libp2p-yamux-v0.12#branch

I am guessing we are just severely limited by the initial receive window.

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

With the above results, I am merging here!

@mergify mergify bot merged commit cb8a920 into master Aug 2, 2023
67 of 68 checks passed
@mergify mergify bot deleted the bump-yamux branch August 2, 2023 15:02
hanabi1224 pushed a commit to hanabi1224/rust-libp2p that referenced this pull request Aug 3, 2023
@mxinden
Copy link
Member

mxinden commented Aug 4, 2023

I am guessing we are just severely limited by the initial receive window.

I am operating under the same assumption.

thomaseizinger added a commit that referenced this pull request Aug 20, 2023
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 this pull request may close these issues.

6 participants