-
Notifications
You must be signed in to change notification settings - Fork 268
Adding SNAP capability #2628
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
Adding SNAP capability #2628
Conversation
df4836c to
b7c2bfc
Compare
b7c2bfc to
2dffc6a
Compare
asoto-iov
left a comment
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.
As a summary I think that before approve we should discuss about:
- having a snap sync versioning.
- Review if it has sense to finish the handshake if the RSK protocol is not supported.
rskj-core/src/main/java/org/ethereum/net/client/ConfigCapabilitiesImpl.java
Outdated
Show resolved
Hide resolved
rskj-core/src/main/java/org/ethereum/net/client/ConfigCapabilitiesImpl.java
Outdated
Show resolved
Hide resolved
rskj-core/src/main/java/org/ethereum/net/rlpx/HandshakeHandler.java
Outdated
Show resolved
Hide resolved
rskj-core/src/main/java/org/ethereum/net/client/ConfigCapabilitiesImpl.java
Outdated
Show resolved
Hide resolved
rskj-core/src/main/java/org/ethereum/net/client/ConfigCapabilitiesImpl.java
Outdated
Show resolved
Hide resolved
rskj-core/src/main/java/org/ethereum/net/client/ConfigCapabilitiesImpl.java
Outdated
Show resolved
Hide resolved
Vovchyk
left a comment
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.
now we would also need to filer snap-capable peers in here. And for that we'd need to extend Peer interface with new method - boolean isSnapCapable(), wdyt?
rskj-core/src/main/java/org/ethereum/net/client/ConfigCapabilitiesImpl.java
Outdated
Show resolved
Hide resolved
|
it is still missing what Vlad mentioned here: #2628 (review) |
rskj-core/src/main/java/org/ethereum/net/client/ConfigCapabilitiesImpl.java
Outdated
Show resolved
Hide resolved
rskj-core/src/main/java/org/ethereum/net/client/ConfigCapabilitiesImpl.java
Show resolved
Hide resolved
rskj-core/src/main/java/org/ethereum/net/rlpx/HandshakeHandler.java
Outdated
Show resolved
Hide resolved
rskj-core/src/test/java/org/ethereum/net/rlpx/HandshakeHandlerTest.java
Outdated
Show resolved
Hide resolved
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.
Good job. I have a few comments, some improvements suggestion and also other related with tests. Let me know what you think. 🙂
rskj-core/src/main/java/org/ethereum/net/client/ConfigCapabilitiesImpl.java
Outdated
Show resolved
Hide resolved
fmacleal
left a comment
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.
LGTM
asoto-iov
left a comment
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.
Please review the new comment. I think it is needed to review the getBestSnapPeer candidate filtering to avoid unnecessary communication with non snap capable peers.
|



Description
I have implemented the analysis documentation that explores various options for enabling SNAP feature discovery among connected peers. You can view the detailed analysis here: SNAP Feature Discovery Analysis
Motivation and Context
Establishing a decentralized approach for RSKj nodes to seamlessly discover and establish connections with SNAP-sync-provider peers during their initial connection phase. This enhancement will focus on integrating a new capability into the HelloMessage and HandshakeHandler classes, thereby facilitating efficient peer discovery and connectivity within the network
How Has This Been Tested?
Types of changes
Checklist: