-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: NetworkPrimitives
#12435
feat: NetworkPrimitives
#12435
Conversation
f74161b
to
565d52d
Compare
impl NetworkPrimitives for EthNetworkPrimitives { | ||
type BlockHeader = reth_primitives::Header; | ||
type BlockBody = reth_primitives::BlockBody; | ||
type Block = reth_primitives::Block; | ||
type BroadcastedTransaction = reth_primitives::TransactionSigned; | ||
type PooledTransaction = reth_primitives::PooledTransactionsElement; | ||
} |
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 is basically double up of NodePrimitives
, why the redundancy?
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 we can always make NodePrimitives a supertrait if those actually end up same
the initial motivation was that transaction type is different so it would have to be a separate trait
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.
it is very similar and we could perhaps try to unify them but I feel like we should keep them separate for now because that makes it easier to transition the network component
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.
great!
Introduces
NetworkPrimitives
trait defining primitive types foreth
network messages. For now just adds generics to reth-eth-wire-types, introducing those reth-network would be a more massive change