Description
We should make it easier to work with and customize the EthApi
. Right now it takes 4 generics all of which are available on FullNodeComponents
trait:
reth/crates/rpc/rpc/src/eth/core.rs
Line 63 in 73ffe36
Ideally we want it to simply take a single N: FullNodeComponents
generic so that all of the node configuration and, more importantly, bounds on components are available directly on it, allowing to remove e.g those bounds:
reth/crates/optimism/rpc/src/eth/mod.rs
Lines 251 to 259 in 73ffe36
This would break APIs around RpcModuleBuilder
:
reth/crates/rpc/rpc-builder/src/lib.rs
Lines 299 to 320 in 73ffe36
It's primary usecase is to allow setting up EthApi
without a full launched node in the same process by configuring mocks for components that are not available/needed:
reth/examples/rpc-db/src/main.rs
Lines 68 to 72 in 73ffe36
We can fix those by introducing a helper FullNodeComponentsBuilder
which would be a similar helper constructing FullNodeComponents
instead which might be useful even outisde of RPC
Sub-issues
Metadata
Metadata
Assignees
Labels
Type
Projects
Status