Implement SSV Handshake Protocol#125
Conversation
jxs
left a comment
There was a problem hiding this comment.
Hi Diego, thanks for starting this.
Left some comments
| } | ||
|
|
||
| /// Network behaviour handling the handshake protocol. | ||
| pub struct HandshakeBehaviour { |
There was a problem hiding this comment.
skimming through the NetworkBehaviour implementation, and without knowing much about the requirements I wonder if we can suffice our needs by just implementing the Codec trait and not needing to have request-response as a sub behaviour
There was a problem hiding this comment.
What would this approach look like?
There was a problem hiding this comment.
using the request-response Behaviour and then doing the validation envelope signing validation logic in the Codec implementation.
Does that make sense Diego?
There was a problem hiding this comment.
Yes, having the validation in the codec is the way to go. About only one behavior, I'll need to think more about it.
There was a problem hiding this comment.
I think it's nice to keep the behavior and centralize everything related to the handshake there, exposing only the events to the main behavior.
fdd1b40 to
949101a
Compare
# Conflicts: # Cargo.lock # anchor/network/Cargo.toml
Co-authored-by: João Oliveira <hello@jxs.pt>
2d73969 to
6ed5a32
Compare
6ed5a32 to
495b2ea
Compare
67c7cab to
7f74282
Compare
7f74282 to
266c4e5
Compare
eacbd88 to
b6666c7
Compare
cdb441b to
dcf9727
Compare
|
Hey @diegomrsantos, hey @jxs, thank you for your discussion in this PR. You are both making a good case for your proposed variants. To better visualise the changes proposed by João (as I understand them), I implemented them here based on this PR. To summarize the changes:
Overall, I think I personally prefer this approach. Please take a look at my changes. Of course, I am fine with iterating more on the design. Looking forward to your thoughts. |
0270621 to
7d3f32d
Compare
a452805 to
b155c64
Compare
dknopik
left a comment
There was a problem hiding this comment.
Thanks for implementing this, especially with the lack of a pre-existing spec! It's also great that we now have a spec.
We'll handle potential improvements separately.
Issue Addressed
Implements #116
Proposed Changes
Dependencies:
Handshake Protocol:
Network Behaviour:
Network Implementation:
Additional Info
There's a spec in README.md file