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

chore: add remote servers struct #2040

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions crates/starknet_sequencer_node/src/servers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ 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::{
Expand Down Expand Up @@ -39,6 +42,15 @@ struct WrapperServers {
pub(crate) mempool_p2p_runner: Option<Box<MempoolP2pRunnerServer>>,
}

// Component servers that can run remotely.
// TODO(Nadin): Remove pub from the struct and update the fields to be pub(crate).
pub struct RemoteServers {
pub batcher: Option<Box<RemoteBatcherServer>>,
pub gateway: Option<Box<RemoteGatewayServer>>,
pub mempool: Option<Box<RemoteMempoolServer>>,
pub mempool_p2p_propagator: Option<Box<RemoteMempoolP2pPropagatorServer>>,
}

pub struct SequencerNodeServers {
local_servers: LocalServers,
wrapper_servers: WrapperServers,
Expand Down
Loading