-
Notifications
You must be signed in to change notification settings - Fork 999
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
refactor(rendezvous): rewrite using libp2p-request-response
#4051
refactor(rendezvous): rewrite using libp2p-request-response
#4051
Conversation
@thomaseizinger |
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.
Amazing work! I'll do an in-depth review early next week!
Clippy seems to be unhappy :) |
Clippy is satisfied now |
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.
Thank you! This is a really high-quality contribution!
A few minor comments but overall this looks really good :)
Co-authored-by: Thomas Eizinger <[email protected]>
Co-authored-by: Thomas Eizinger <[email protected]>
libp2p-request-response
Thanks for your high estimation of my contribution, it really motivates me! |
@thomaseizinger |
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.
Thanks! I am looking forward to merging this.
A few more comments.
@thomaseizinger I fixed your comments, please, take a look. |
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.
Thanks for the follow-up commits. A few more things but this is very close to being ready :)
} | ||
_ => unreachable!(), | ||
_ => unreachable!("rendezvous clients never receive requests"), |
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.
This isn't safe. We cannot statically ensure that we don't receive a request, the remote could send us any message.
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.
In follow-up work, we could redesign this to have two enums: one for requests and one for responses. Then our codec could ensure that and inbound message on the client is always a response.
I removed |
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.
Nicely done, just one final comment!
Good idea!! |
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.
Thanks a lot for doing this refactoring!
It is one of the main remaining blockers for #3268 which is an improvement I am very much looking forward to!
We didn't have to touch a single line in the tests! A picture-perfect refactoring! |
Thank you a lot for the review! |
Description
Fixes #3878.
Notes & open questions
Change checklist