-
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: relax provider bounds #12857
feat: relax provider bounds #12857
Conversation
5c0b4a4
to
e57cc67
Compare
0c09103
to
0a84d44
Compare
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 otherwise
@@ -30,9 +31,18 @@ pub trait BlockBody: | |||
/// Ordered list of signed transactions as committed in block. | |||
type Transaction: Transaction; | |||
|
|||
/// Ommer header type. | |||
type Header; |
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.
lets rename this to Ommer
or similar in that case? for clarity
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
Based on #12855
This PR relaxes bounds for database providers and
BlockchainProvider2
wrapping up their abstraction over body and transaction. LegacyBlockchainProvider
is still bounded by concreteEthPrimitives
throughTreeNodeTypes
trait.We still need
Block = reth_primitives::Block
bounds for execution, engine and rpc types, so those bounds. are moved above from providers to those components.To fit into current providers and rpc structure, I've extended
BlockBody
with Ethereum-specific withdrawals and ommers methods. It might make sense to decouple them at some point to clean up the abstraction