(
self,
ctx: reth_node_api::AddOnsContext<'_, N>,
)
| 583 | type Handle = RpcHandle<N, EthB::EthApi>; |
| 584 | |
| 585 | async fn launch_add_ons( |
| 586 | self, |
| 587 | ctx: reth_node_api::AddOnsContext<'_, N>, |
| 588 | ) -> eyre::Result<Self::Handle> { |
| 589 | let Self { rpc_add_ons, da_config, gas_limit_config, .. } = self; |
| 590 | let eth_config = |
| 591 | BaseEthConfigHandler::new(ctx.node.provider().clone(), ctx.node.evm_config().clone()); |
| 592 | |
| 593 | let builder = base_execution_payload_builder::BasePayloadBuilder::new( |
| 594 | ctx.node.pool().clone(), |
| 595 | ctx.node.provider().clone(), |
| 596 | ctx.node.evm_config().clone(), |
| 597 | ); |
| 598 | // Install additional rollup-specific RPC methods. |
| 599 | let debug_ext = BaseDebugWitnessApi::<_, _, _, Attrs>::new( |
| 600 | ctx.node.provider().clone(), |
| 601 | ctx.node.task_executor().clone(), |
| 602 | builder, |
| 603 | ); |
| 604 | let miner_ext = BaseMinerExtApi::new(da_config, gas_limit_config); |
| 605 | |
| 606 | rpc_add_ons |
| 607 | .launch_add_ons_with(ctx, move |container| { |
| 608 | let reth_node_builder::rpc::RpcModuleContainer { modules, auth_module, registry } = |
| 609 | container; |
| 610 | |
| 611 | modules.merge_if_module_configured(RethRpcModule::Eth, eth_config.into_rpc())?; |
| 612 | |
| 613 | debug!(target: "reth::cli", "Installing debug payload witness rpc endpoint"); |
| 614 | modules.merge_if_module_configured(RethRpcModule::Debug, debug_ext.into_rpc())?; |
| 615 | |
| 616 | // extend the miner namespace if configured in the regular http server |
| 617 | modules.add_or_replace_if_module_configured( |
| 618 | RethRpcModule::Miner, |
| 619 | miner_ext.clone().into_rpc(), |
| 620 | )?; |
| 621 | |
| 622 | // install the miner extension in the authenticated if configured |
| 623 | if modules.module_config().contains_any(&RethRpcModule::Miner) { |
| 624 | debug!(target: "reth::cli", "Installing miner DA rpc endpoint"); |
| 625 | auth_module.merge_auth_methods(miner_ext.into_rpc())?; |
| 626 | } |
| 627 | |
| 628 | // install the debug namespace in the authenticated if configured |
| 629 | if modules.module_config().contains_any(&RethRpcModule::Debug) { |
| 630 | debug!(target: "reth::cli", "Installing debug rpc endpoint"); |
| 631 | auth_module.merge_auth_methods(registry.debug_api().into_rpc())?; |
| 632 | } |
| 633 | |
| 634 | Ok(()) |
| 635 | }) |
| 636 | .await |
| 637 | } |
| 638 | } |
| 639 | |
| 640 | impl<N, EthB, PVB, EB, EVB, Attrs, RpcMiddleware> RethRpcAddOns<N> |
nothing calls this directly
no test coverage detected