Skip to content
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

Separate auth rpc and rpc modules building #8987

Open
1 of 2 tasks
Tracked by #9554
emhane opened this issue Jun 20, 2024 · 1 comment
Open
1 of 2 tasks
Tracked by #9554

Separate auth rpc and rpc modules building #8987

emhane opened this issue Jun 20, 2024 · 1 comment
Labels
A-op-reth Related to Optimism and op-reth A-rpc Related to the RPC implementation C-debt Refactor of code section that is hard to understand or maintain M-prevent-stale Prevents old inactive issues/PRs from being closed due to inactivity

Comments

@emhane
Copy link
Member

emhane commented Jun 20, 2024

Describe the feature

Separate rpc server building and auth rpc server building in build_with_auth_server, using builder pattern.

/// Configures all [`RpcModule`]s specific to the given [`TransportRpcModuleConfig`] which can
/// be used to start the transport server(s).
///
/// This behaves exactly as [`RpcModuleBuilder::build`] for the [`TransportRpcModules`], but
/// also configures the auth (engine api) server, which exposes a subset of the `eth_`
/// namespace.
pub fn build_with_auth_server<EngineApi, EngineT>(
self,
module_config: TransportRpcModuleConfig,
engine: EngineApi,
) -> (
TransportRpcModules,
AuthRpcModule,
RethModuleRegistry<Provider, Pool, Network, Tasks, Events, EvmConfig>,
)
where
EngineT: EngineTypes + 'static,
EngineApi: EngineApiServer<EngineT>,
{
let Self { provider, pool, network, executor, events, evm_config } = self;
let config = module_config.config.clone().unwrap_or_default();
let mut registry =
RethModuleRegistry::new(provider, pool, network, executor, events, config, evm_config);
let modules = registry.create_transport_rpc_modules(module_config);
let auth_module = registry.create_auth_module(engine);
(modules, auth_module, registry)
}

Blocked by #8985

Additional context

No response

Tasks

Preview Give feedback
  1. A-rpc A-sdk S-needs-design
  2. A-op-reth A-rpc A-sdk C-debt
    klkvr
@emhane emhane added S-blocked This cannot more forward until something else changes C-debt Refactor of code section that is hard to understand or maintain A-rpc Related to the RPC implementation labels Jun 20, 2024
Copy link
Contributor

This issue is stale because it has been open for 21 days with no activity.

@github-actions github-actions bot added the S-stale This issue/PR is stale and will close with no further activity label Jul 12, 2024
@emhane emhane added M-prevent-stale Prevents old inactive issues/PRs from being closed due to inactivity and removed S-stale This issue/PR is stale and will close with no further activity labels Jul 13, 2024
@emhane emhane added A-op-reth Related to Optimism and op-reth and removed S-blocked This cannot more forward until something else changes labels Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-op-reth Related to Optimism and op-reth A-rpc Related to the RPC implementation C-debt Refactor of code section that is hard to understand or maintain M-prevent-stale Prevents old inactive issues/PRs from being closed due to inactivity
Projects
Status: Todo
Development

No branches or pull requests

1 participant