-
Notifications
You must be signed in to change notification settings - Fork 228
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
p2p: use async bipipe #853
Conversation
Closes #841 I had to clone the original crate to introduce 4 additional methods: 1. async_pipe 2. async_pipe_buffered 3. async_bipipe 4. async_bipipe_buffered The difference is they all use unbounded `crossbeam` channel rather then `bounded(0)` which makes them async. And we need pipe to be async because of how the handshake is written currently.
I will see if this could be upstreamed (I doubt that, but I will try nonetheless) arcnmx/pipe-rs#10 |
If we have doubts that it will be upstream-ed should we just maintain a pipe implementation in the p2p package for our testing purposes? |
Yeah this makes sense to me 👍 |
done 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛋 🐻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🌭 🎃 🍘 🗽
Closes #841
A copy of the
pipe
crate (https://github.com/arcnmx/pipe-rs) is added to thetendermint-p2p
crate. I had to add a new method -async_bipipe_buffered
to make the handshake tests always pass.async_bipipe_buffered
method uses theunbounded
channel (rather than the blocking one) for communication - hence the prefix. Note I also removed the methods and structures frompipe
clone that we're not using at the moment.Updated all relevant documentation in docsUpdated CHANGELOG.md