-
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: make reth-stages
independent of concrete DatabaseProvider
#10934
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.
this is pretty cool, this removes the hardcoded db type and instead relies on trait bounds for the various stages impl.
this will be more flexible
very nice.
pending @joshieDo
@@ -11,26 +10,26 @@ use std::{ | |||
/// individual stage sets to determine what kind of configuration they expose. | |||
/// | |||
/// Individual stages in the set can be added, removed and overridden using [`StageSetBuilder`]. | |||
pub trait StageSet<DB: Database>: Sized { | |||
pub trait StageSet<Provider>: Sized { |
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.
cool
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
alike #10921
DbTxMut
extension traitDbTxUnwindExt
Stage
generic fromDB
toProvider
take_state
andremove_state
methods toStateChangeWriter
, unsure what's best place for those, lmk if they should be somewhere elseNext step could be to make
Pipeline
generic over provider factory, removing its dependency onNodeTypesWithDB
. However, this would make scope of the PR bigger without much benefit, so can be done in a follow up