-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat(net): support eth/68 #1361
Merged
Merged
Changes from 26 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
aab2d1c
chore: impl eth/68
jinsankim 736c57d
fix: clippy and nits
jinsankim f0b2f92
chore: check version for GetNodeData, NodeData
jinsankim 6e0c6f4
chore: remove TODOs, check NewPooledTransactionHashes68 len of fields
jinsankim e3d2cad
chore: revise Capabilities & fix tests
jinsankim 7ade142
test: capabilities_supports_eth()
jinsankim 9c74b82
chore: revise types
jinsankim 46963e0
fix: EthStream::new()
jinsankim 012ef53
fix: fuzz tests
jinsankim 9e8543a
chore: revise error handling for GetNodeData, NodeData
jinsankim 651fc4d
chore: not enable Eth68
jinsankim 6e0c51d
fix: test_session_established_with_highest_version
jinsankim ca74056
chore: use EthVersion instead of u8
jinsankim 5ba25a6
Merge remote-tracking branch 'upstream/main' into feat-eth68
jinsankim b7b4b14
chore: change eth versions order as desc
jinsankim 011eb73
chore: revise `EthMessage` doc
jinsankim a94b1da
chore: rename `NewPooledTransactionHashes` with `NewPooledTransaction…
jinsankim 46e438c
fix: doc lint
jinsankim a8a6ec8
chore: revise comment on `version()`
jinsankim a9de801
chore: `PooledTransactions66` is not emitted by network
jinsankim 12cc2a0
fix(test): test_send_at_capacity()
jinsankim 6dad68b
chore: re-intro `NewPooledTransactionHashes` message
jinsankim e3eb950
fix(test): test_send_at_capacity
jinsankim f0f41fe
chore: use `NewPooledTransactionHashes` internally
jinsankim 63abb51
chore: clean up and revert unnecessary changes
jinsankim 03beade
chore: revert unnecessary change
jinsankim e124f9a
Update crates/net/network/src/session/active.rs
jinsankim d5da4f6
chore: use `match` for `try_into()`
jinsankim e1d007b
chore: rename `pooled_transactions` with `pooled_transaction_hashes` …
jinsankim 231f460
chore: revise EthStreamError::TransactionHashesInvalidLenOfFields
jinsankim acb0d81
chore: remove `From impls for tuples`
jinsankim fb528ed
chore(nit): remove explicit type
jinsankim c70e2d2
chore: revise decode_message Result
jinsankim 517380e
chore(nit): revise debug message
jinsankim f53e2a7
chore: remove outgoing feature
jinsankim d43efa0
fix: remove unused imports in test
jinsankim 3227771
test: test_removed_message_at_eth67()
jinsankim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//! Error handling for (`EthStream`)[crate::EthStream] | ||
use crate::{errors::P2PStreamError, DisconnectReason}; | ||
use crate::{errors::P2PStreamError, version::ParseVersionError, DisconnectReason}; | ||
use reth_primitives::{Chain, ValidationError, H256}; | ||
use std::io; | ||
|
||
|
@@ -10,9 +10,13 @@ pub enum EthStreamError { | |
#[error(transparent)] | ||
P2PStreamError(#[from] P2PStreamError), | ||
#[error(transparent)] | ||
ParseVersionError(#[from] ParseVersionError), | ||
#[error(transparent)] | ||
EthHandshakeError(#[from] EthHandshakeError), | ||
#[error("message size ({0}) exceeds max length (10MB)")] | ||
MessageTooBig(usize), | ||
#[error("TransactionHashes invalid len of fields: {0} {1} {2}")] | ||
TransactionHashesInvalidLenOfFields(usize, usize, usize), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd like to use named fields here, otherwise it's harder to understand what the different usizes are There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. follow it up with 231f460. |
||
} | ||
|
||
// === impl EthStreamError === | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 part of the greater multi-capability feature let's refactor this into an enum as this is not a very rusty way of doing things
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.
I think it's better to open another issue for it because it could be broader than intuition.