@@ -5,6 +5,8 @@ use apollo_batcher::communication::{LocalBatcherServer, RemoteBatcherServer};
55use apollo_batcher:: metrics:: BATCHER_INFRA_METRICS ;
66use apollo_class_manager:: communication:: { LocalClassManagerServer , RemoteClassManagerServer } ;
77use apollo_class_manager:: metrics:: CLASS_MANAGER_INFRA_METRICS ;
8+ use apollo_committer:: communication:: { LocalCommitterServer , RemoteCommitterServer } ;
9+ use apollo_committer:: metrics:: COMMITTER_INFRA_METRICS ;
810use apollo_compile_to_casm:: communication:: {
911 LocalSierraCompilerServer ,
1012 RemoteSierraCompilerServer ,
@@ -73,6 +75,7 @@ use crate::components::SequencerNodeComponents;
7375struct LocalServers {
7476 pub ( crate ) batcher : Option < Box < LocalBatcherServer > > ,
7577 pub ( crate ) class_manager : Option < Box < LocalClassManagerServer > > ,
78+ pub ( crate ) committer : Option < Box < LocalCommitterServer > > ,
7679 pub ( crate ) config_manager : Option < Box < LocalConfigManagerServer > > ,
7780 pub ( crate ) gateway : Option < Box < LocalGatewayServer > > ,
7881 pub ( crate ) l1_provider : Option < Box < LocalL1ProviderServer > > ,
@@ -103,6 +106,7 @@ struct WrapperServers {
103106pub struct RemoteServers {
104107 pub batcher : Option < Box < RemoteBatcherServer > > ,
105108 pub class_manager : Option < Box < RemoteClassManagerServer > > ,
109+ pub committer : Option < Box < RemoteCommitterServer > > ,
106110 // Note: we explicitly avoid adding a config manager runner server to the remote servers as it
107111 // is not used for remote connections.
108112 pub gateway : Option < Box < RemoteGatewayServer > > ,
@@ -316,6 +320,20 @@ fn create_local_servers(
316320 config. components. class_manager. max_concurrency
317321 ) ;
318322
323+ let committer_server = create_local_server ! (
324+ REGULAR_LOCAL_SERVER ,
325+ & config. components. committer. execution_mode,
326+ & mut components. committer,
327+ & config
328+ . components
329+ . committer
330+ . local_server_config
331+ . as_ref( )
332+ . expect( "Committer local server config should be available." ) ,
333+ communication. take_committer_rx( ) ,
334+ & COMMITTER_INFRA_METRICS . get_local_server_metrics( )
335+ ) ;
336+
319337 let config_manager_server = create_local_server ! (
320338 CONCURRENT_LOCAL_SERVER ,
321339 & config. components. config_manager. execution_mode,
@@ -450,6 +468,7 @@ fn create_local_servers(
450468 LocalServers {
451469 batcher : batcher_server,
452470 class_manager : class_manager_server,
471+ committer : committer_server,
453472 config_manager : config_manager_server,
454473 gateway : gateway_server,
455474 l1_provider : l1_provider_server,
@@ -477,6 +496,7 @@ impl LocalServers {
477496 create_servers ( vec ! [
478497 server_future_and_label( self . batcher, "Local Batcher" ) ,
479498 server_future_and_label( self . class_manager, "Local Class Manager" ) ,
499+ server_future_and_label( self . committer, "Local Committer" ) ,
480500 server_future_and_label( self . config_manager, "Local Config Manager" ) ,
481501 server_future_and_label( self . gateway, "Local Gateway" ) ,
482502 server_future_and_label( self . l1_provider, "Local L1 Provider" ) ,
@@ -513,6 +533,15 @@ pub fn create_remote_servers(
513533 CLASS_MANAGER_INFRA_METRICS . get_remote_server_metrics( )
514534 ) ;
515535
536+ let committer_server = create_remote_server ! (
537+ & config. components. committer. execution_mode,
538+ || { clients. get_committer_local_client( ) } ,
539+ config. components. committer. remote_server_config,
540+ config. components. committer. port,
541+ config. components. committer. max_concurrency,
542+ COMMITTER_INFRA_METRICS . get_remote_server_metrics( )
543+ ) ;
544+
516545 let gateway_server = create_remote_server ! (
517546 & config. components. gateway. execution_mode,
518547 || { clients. get_gateway_local_client( ) } ,
@@ -588,6 +617,7 @@ pub fn create_remote_servers(
588617 RemoteServers {
589618 batcher : batcher_server,
590619 class_manager : class_manager_server,
620+ committer : committer_server,
591621 gateway : gateway_server,
592622 l1_provider : l1_provider_server,
593623 l1_gas_price_provider : l1_gas_price_provider_server,
@@ -604,6 +634,7 @@ impl RemoteServers {
604634 create_servers ( vec ! [
605635 server_future_and_label( self . batcher, "Remote Batcher" ) ,
606636 server_future_and_label( self . class_manager, "Remote Class Manager" ) ,
637+ server_future_and_label( self . committer, "Remote Committer" ) ,
607638 server_future_and_label( self . gateway, "Remote Gateway" ) ,
608639 server_future_and_label( self . l1_provider, "Remote L1 Provider" ) ,
609640 server_future_and_label( self . l1_gas_price_provider, "Remote L1 Gas Price Provider" ) ,
0 commit comments