-
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: Add RethCliExt #3983
feat: Add RethCliExt #3983
Conversation
Codecov Report
... and 13 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Going off of what we talked about 1 on 1 -
This makes sense for the time being, but we should try to move towards having an abstraction that reth node
uses instead of having reth node
be the abstraction. The reasoning is that you might want complete control over the CLI/how the components are configured, and using reth node
as the abstraction also suffers the following issues:
- We'd need to add a flag/option for anything you would want to configure and probably hide most of them
- It is not easy to integrate
reth node
into an existing code base with stricter requirements
In general, we would eventually want to support swapping out the builder, txpool, enabling/disabling parts of the pipeline, adding/removing/overriding things in RPC etc and encapsulating that in Clap (or things on top of Clap) is probably quite hard
Sensitive to the fact that building a better abstraction that we can reuse for reth node
is a complex task, so this will do for now
Wdyt?
yes, I agree, I think we should try to abstract the node start command (or rather configuring + launching the node) and then the default Cli node command is just one impl of that, |
This provides a way to additional cli args to the reth cli.
This adds
RethRpcServerArgsExt
that can install additional modules to the configured transports.Default is a noop.
This is only one part of making the cli/node builder customizable, and is only intended for installing additional rpc components easily.
In order to provide something like a node builder we'd need: