-
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
refactor: move ValidationApi
setup to EthereumAddOns
#14342
Conversation
// only relevant for Ethereum and configured in `EthereumAddOns` | ||
// implementation | ||
// TODO: can we get rid of this here? | ||
RethRpcModule::Flashbots => Default::default(), |
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.
don't like that we're doing this here now, I'm wondering if we should introduce generic for network-specific rpc namespaces?
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'm wondering if we should introduce generic for
yeah, I been thinking about this a bit.
we'd need to integrate this into cli abstraction.
for now this is okay
I expect that the addons and this registry type will converge eventually, like offload more and more rpc setup to rpcaddons
for OP we also do this already:
reth/crates/optimism/node/src/node.rs
Line 222 in 4e49d77
let miner_ext = OpMinerExtApi::new(da_config); |
so we'd need to find a way to approach this entire cli -> builder -> launch from the CLI perspective.
we kinda started experimenting with this a while ago with
but it's not used anywhere yet
reth/crates/cli/cli/src/lib.rs
Line 26 in 4e49d77
pub trait RethCli: Sized { |
one approach could be to make NodeConfig
entirely dependent on the RethCli, like the config is an output of the Cli which is then plugged into the builder
#[derive(Debug)] | ||
pub struct EthereumAddOns<N: FullNodeComponents> { | ||
inner: RpcAddOns<N, EthApiFor<N>, EthereumEngineValidatorBuilder>, | ||
} |
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.
so much better
@@ -859,6 +843,7 @@ impl RpcModuleConfigBuilder { | |||
|
|||
/// A Helper type the holds instances of the configured modules. | |||
#[derive(Debug, Clone)] | |||
#[expect(dead_code)] // Consensus generic, might be useful in the future |
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 makes sense
// only relevant for Ethereum and configured in `EthereumAddOns` | ||
// implementation | ||
// TODO: can we get rid of this here? | ||
RethRpcModule::Flashbots => Default::default(), |
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'm wondering if we should introduce generic for
yeah, I been thinking about this a bit.
we'd need to integrate this into cli abstraction.
for now this is okay
I expect that the addons and this registry type will converge eventually, like offload more and more rpc setup to rpcaddons
for OP we also do this already:
reth/crates/optimism/node/src/node.rs
Line 222 in 4e49d77
let miner_ext = OpMinerExtApi::new(da_config); |
so we'd need to find a way to approach this entire cli -> builder -> launch from the CLI perspective.
we kinda started experimenting with this a while ago with
but it's not used anywhere yet
reth/crates/cli/cli/src/lib.rs
Line 26 in 4e49d77
pub trait RethCli: Sized { |
one approach could be to make NodeConfig
entirely dependent on the RethCli, like the config is an output of the Cli which is then plugged into the builder
flashbots_ namespace is Ethereum specific and locked to concrete input types making it incompatible with custom Engine API we are about to introduce
This PR moves setup of
ValidationApi
to eth-specific add-ons allowing us to get rid ofpayload_validator
usage inRpcRegistry