reth
reth copied to clipboard
Give ExEx access to RpcAddons
Describe the feature
ref #15590
rn we supply:
https://github.com/paradigmxyz/reth/blob/ee8d7d00cb07ee7d344e708c74be7a18636587e4/crates/exex/exex/src/context.rs#L15-L15
but ideally we can provide the RpcAddons as well:
https://github.com/paradigmxyz/reth/blob/ee8d7d00cb07ee7d344e708c74be7a18636587e4/crates/node/builder/src/rpc.rs#L305-L306
we should be able to do this by introducing a new install function, that in addition to the ExExContext also provides access to the addons' Handle type
https://github.com/paradigmxyz/reth/blob/ee8d7d00cb07ee7d344e708c74be7a18636587e4/crates/node/builder/src/builder/states.rs#L216-L218
https://github.com/paradigmxyz/reth/blob/ee8d7d00cb07ee7d344e708c74be7a18636587e4/crates/node/api/src/node.rs#L127-L129
for this we'd need to change:
https://github.com/paradigmxyz/reth/blob/ee8d7d00cb07ee7d344e708c74be7a18636587e4/crates/node/builder/src/builder/add_ons.rs#L13-L14
so that this has access to the Addons as well, like
https://github.com/paradigmxyz/reth/blob/ee8d7d00cb07ee7d344e708c74be7a18636587e4/crates/node/builder/src/exex.rs#L27-L27
fn launch(self: Box<Self>, ctx: ExExContext<Node>, addons: Addons::Addons)
we further need to change the order here, so that this is launched after we have the rpcaddons:
https://github.com/paradigmxyz/reth/blob/ee8d7d00cb07ee7d344e708c74be7a18636587e4/crates/node/builder/src/launch/engine.rs#L129-L137
so we need to move some stuff around here as well, should be doable, judging from the setup code
TODO
- Integrate Addons into
install_exex
Additional context
No response