refactor(rendezvous): rewrite using libp2p-request-response#4051
refactor(rendezvous): rewrite using libp2p-request-response#4051mergify[bot] merged 37 commits intolibp2p:masterfrom dgarus:3878-rendezvous-based-on-req-resp
libp2p-request-response#4051Conversation
|
@thomaseizinger |
thomaseizinger
left a comment
There was a problem hiding this comment.
Amazing work! I'll do an in-depth review early next week!
|
Clippy seems to be unhappy :) |
Clippy is satisfied now |
thomaseizinger
left a comment
There was a problem hiding this comment.
Thank you! This is a really high-quality contribution!
A few minor comments but overall this looks really good :)
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
libp2p-request-response
Thanks for your high estimation of my contribution, it really motivates me! |
|
@thomaseizinger |
thomaseizinger
left a comment
There was a problem hiding this comment.
Thanks! I am looking forward to merging this.
A few more comments.
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
|
@thomaseizinger I fixed your comments, please, take a look. |
thomaseizinger
left a comment
There was a problem hiding this comment.
Thanks for the follow-up commits. A few more things but this is very close to being ready :)
| None | ||
| } | ||
| _ => unreachable!(), | ||
| _ => unreachable!("rendezvous clients never receive requests"), |
There was a problem hiding this comment.
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.
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 |
thomaseizinger
left a comment
There was a problem hiding this comment.
Nicely done, just one final comment!
Good idea!! |
thomaseizinger
left a comment
There was a problem hiding this comment.
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