-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
chore(net): support multiple eth protocol versions. #1152
Conversation
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.
ty
pending @Rjected
// Before trying status handshake, set up the version to shared_capability | ||
let status = Status { version: p2p_stream.shared_capability().version(), ..status }; |
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 looks correct.
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 add a test for this, agree with the fix, testing the PR now
follow it up w/ b4d6880 |
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #1152 +/- ##
==========================================
+ Coverage 74.75% 75.27% +0.51%
==========================================
Files 333 335 +2
Lines 35442 36373 +931
==========================================
+ Hits 26495 27380 +885
- Misses 8947 8993 +46
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Closes #1101
Motivation
Direction
Alternative idea to direction
Note
geth
negotiateseth
protocol and it selectshighest
version.https://github.com/ethereum/go-ethereum/blob/d0a4989a8def7e6bad182d1513e8d4a093c1672d/cmd/devp2p/internal/ethtest/helpers.go#L130-L132
reth/crates/net/eth-wire/src/p2pstream.rs
Lines 562 to 567 in a55e7fd
MismatchedProtocolVersion
issue before Support for multiple devp2p capabilities #791 is completed.