-
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
feat: declarative builder v2 #6447
Conversation
30ac64e
to
9511150
Compare
pub fn components<Node>( | ||
) -> ComponentsBuilder<Node, EthereumPoolBuilder, EthereumPayloadBuilder, EthereumNetwork> |
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.
how did this pass lint 🤔
Co-authored-by: Oliver Nordbjerg <[email protected]>
Co-authored-by: Oliver Nordbjerg <[email protected]>
Co-authored-by: Oliver Nordbjerg <[email protected]>
Co-authored-by: Oliver Nordbjerg <[email protected]>
Co-authored-by: Oliver Nordbjerg <[email protected]>
general q: i can see that network, engine, payload builder, pool is all configured as components, but rpc seems separate, is this deliberate or will that config be unified later? |
RPC is based on the configured modules this can be extended with a hook. I think we can/want to move away from this as well but for now it's significantly easier to rely on the |
gotcha |
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, hyped
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, have one question and suggestion to add docs
crates/node-builder/src/rpc.rs
Outdated
// TODO simplify registry trait bounds | ||
pub registry: &'a mut RpcRegistry<Node>, |
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.
trait bound is just Node: FullNodeComponents
, so I'm guessing this todo is complete?
pub struct EthereumPoolBuilder { | ||
// TODO add options for txpool args | ||
} |
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.
wdyt would go in here eventually?
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.
additional values to override cli args
supersedes #5932
Introduces a declarative node builder that configures the node step by step using types and components.
Future work
currently, type traits are just placeholders that can be configured once everything is generic over types. Ideally we start with the Engine types (ethereum/optimism) but this needs more work on the existing components first (make them generic over EngineConfig).
Update
This currently only adds the node-builder, I want to do the replacement in a followup. because the PR is already gigantic
TODO
Breaking changes
This phases out the NodeCommandConfig trait in it's existing form, instead all of its functionality will be moved into the NodeBuilder directly (hooks + helper functions for customizing payload builder for example)