From 5a40b5f3a77ad08aee328dc4ed7a10fed3d7772d Mon Sep 17 00:00:00 2001 From: nadin-Starkware Date: Thu, 14 Nov 2024 10:33:35 +0200 Subject: [PATCH] chore: add remote servers struct commit-id:ccf812e5 --- crates/starknet_sequencer_node/src/servers.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/crates/starknet_sequencer_node/src/servers.rs b/crates/starknet_sequencer_node/src/servers.rs index 602b0da51df..a364e230b6b 100644 --- a/crates/starknet_sequencer_node/src/servers.rs +++ b/crates/starknet_sequencer_node/src/servers.rs @@ -2,12 +2,12 @@ use std::future::pending; use std::pin::Pin; use futures::{Future, FutureExt}; -use starknet_batcher::communication::LocalBatcherServer; +use starknet_batcher::communication::{LocalBatcherServer, RemoteBatcherServer}; use starknet_consensus_manager::communication::ConsensusManagerServer; -use starknet_gateway::communication::LocalGatewayServer; +use starknet_gateway::communication::{LocalGatewayServer, RemoteGatewayServer}; use starknet_http_server::communication::HttpServer; -use starknet_mempool::communication::LocalMempoolServer; -use starknet_mempool_p2p::propagator::LocalMempoolP2pPropagatorServer; +use starknet_mempool::communication::{LocalMempoolServer, RemoteMempoolServer}; +use starknet_mempool_p2p::propagator::{LocalMempoolP2pPropagatorServer, RemoteMempoolP2pPropagatorServer}; use starknet_mempool_p2p::runner::MempoolP2pRunnerServer; use starknet_monitoring_endpoint::communication::MonitoringEndpointServer; use starknet_sequencer_infra::component_server::{ @@ -39,6 +39,14 @@ struct WrapperServers { pub(crate) mempool_p2p_runner: Option>, } +// Component servers that can run remotely. +struct RemoteServers { + pub(crate) batcher: Option>, + pub(crate) gateway: Option>, + pub(crate) mempool: Option>, + pub(crate) mempool_p2p_propagator: Option>, +} + pub struct SequencerNodeServers { local_servers: LocalServers, wrapper_servers: WrapperServers,