@@ -204,9 +204,8 @@ fd_topo_initialize( config_t * config ) {
204
204
ulong resolv_tile_cnt = config -> layout .resolv_tile_count ;
205
205
ulong sign_tile_cnt = config -> firedancer .layout .sign_tile_count ;
206
206
207
- int enable_rpc = ( config -> rpc . port != 0 ) ;
207
+ fd_topo_t * topo = { fd_topob_new ( & config -> topo , config -> name ) } ;
208
208
209
- fd_topo_t * topo = fd_topob_new ( & config -> topo , config -> name );
210
209
topo -> max_page_size = fd_cstr_to_shmem_page_sz ( config -> hugetlbfs .max_page_size );
211
210
topo -> gigantic_page_threshold = config -> hugetlbfs .gigantic_page_threshold_mib << 20 ;
212
211
@@ -296,7 +295,6 @@ fd_topo_initialize( config_t * config ) {
296
295
fd_topob_wksp ( topo , "replay_manif" );
297
296
298
297
fd_topob_wksp ( topo , "slot_fseqs" ); /* fseqs for marked slots eg. turbine slot */
299
- if ( enable_rpc ) fd_topob_wksp ( topo , "rpcsrv" );
300
298
301
299
#define FOR (cnt ) for( ulong i=0UL; i<cnt; i++ )
302
300
@@ -436,9 +434,6 @@ fd_topo_initialize( config_t * config ) {
436
434
/**/ fd_topob_tile( topo, " tower ", " tower ", " metric_in ", tile_to_cpu[ topo->tile_cnt ], 0, 0 );
437
435
FOR (writer_tile_cnt ) fd_topob_tile ( topo , "writer" , "writer" , "metric_in" , tile_to_cpu [ topo -> tile_cnt ], 0 , 0 );
438
436
439
- fd_topo_tile_t * rpcserv_tile = NULL ;
440
- if ( enable_rpc ) rpcserv_tile = fd_topob_tile ( topo , "rpcsrv" , "rpcsrv" , "metric_in" , tile_to_cpu [ topo -> tile_cnt ], 0 , 1 );
441
-
442
437
fd_topo_tile_t * snaprd_tile = fd_topob_tile ( topo , "snaprd" , "snaprd" , "metric_in" , tile_to_cpu [ topo -> tile_cnt ], 0 , 0 );
443
438
snaprd_tile -> allow_shutdown = 1 ;
444
439
fd_topo_tile_t * snapdc_tile = fd_topob_tile ( topo , "snapdc" , "snapdc" , "metric_in" , tile_to_cpu [ topo -> tile_cnt ], 0 , 0 );
@@ -456,7 +451,6 @@ fd_topo_initialize( config_t * config ) {
456
451
457
452
FOR (exec_tile_cnt ) fd_topob_tile_uses ( topo , & topo -> tiles [ fd_topo_find_tile ( topo , "exec" , i ) ], funk_obj , FD_SHMEM_JOIN_MODE_READ_WRITE );
458
453
/* */ fd_topob_tile_uses ( topo , replay_tile , funk_obj , FD_SHMEM_JOIN_MODE_READ_WRITE );
459
- if (rpcserv_tile ) fd_topob_tile_uses ( topo , rpcserv_tile , funk_obj , FD_SHMEM_JOIN_MODE_READ_WRITE );
460
454
FOR (writer_tile_cnt ) fd_topob_tile_uses ( topo , & topo -> tiles [ fd_topo_find_tile ( topo , "writer" , i ) ], funk_obj , FD_SHMEM_JOIN_MODE_READ_WRITE );
461
455
462
456
/* Setup a shared wksp object for banks. */
@@ -789,9 +783,15 @@ fd_topo_initialize( config_t * config ) {
789
783
/**/ fd_topob_link ( topo , "replay_notif" , "replay_notif" , FD_REPLAY_NOTIF_DEPTH , FD_REPLAY_NOTIF_MTU , 1UL )-> permit_no_consumers = 1 ;
790
784
/**/ fd_topob_tile_out ( topo , "replay" , 0UL , "replay_notif" , 0UL );
791
785
786
+ int enable_rpc = ( config -> rpc .port != 0 );
792
787
if ( enable_rpc ) {
793
- fd_topob_tile_in ( topo , "rpcsrv" , 0UL , "metric_in" , "replay_notif" , 0UL , FD_TOPOB_UNRELIABLE , FD_TOPOB_POLLED );
794
- fd_topob_tile_in ( topo , "rpcsrv" , 0UL , "metric_in" , "stake_out" , 0UL , FD_TOPOB_UNRELIABLE , FD_TOPOB_POLLED );
788
+ fd_topob_wksp ( topo , "rpcsrv" );
789
+ fd_topo_tile_t * rpcserv_tile = fd_topob_tile ( topo , "rpcsrv" , "rpcsrv" , "metric_in" , tile_to_cpu [ topo -> tile_cnt ], 0 , 1 );
790
+ fd_topob_tile_uses ( topo , rpcserv_tile , funk_obj , FD_SHMEM_JOIN_MODE_READ_WRITE );
791
+ fd_topob_tile_uses ( topo , rpcserv_tile , store_obj , FD_SHMEM_JOIN_MODE_READ_WRITE );
792
+ fd_topob_tile_in ( topo , "rpcsrv" , 0UL , "metric_in" , "replay_notif" , 0UL , FD_TOPOB_UNRELIABLE , FD_TOPOB_POLLED );
793
+ fd_topob_tile_in ( topo , "rpcsrv" , 0UL , "metric_in" , "stake_out" , 0UL , FD_TOPOB_UNRELIABLE , FD_TOPOB_POLLED );
794
+ fd_topob_tile_in ( topo , "rpcsrv" , 0UL , "metric_in" , "repair_repla" , 0UL , FD_TOPOB_UNRELIABLE , FD_TOPOB_POLLED );
795
795
}
796
796
797
797
/* For now the only plugin consumer is the GUI */
@@ -1015,6 +1015,7 @@ fd_topo_configure_tile( fd_topo_tile_t * tile,
1015
1015
} else if ( FD_UNLIKELY ( !strcmp ( tile -> name , "rpcsrv" ) ) ) {
1016
1016
strncpy ( tile -> replay .blockstore_file , config -> firedancer .blockstore .file , sizeof (tile -> replay .blockstore_file ) );
1017
1017
tile -> rpcserv .funk_obj_id = fd_pod_query_ulong ( config -> topo .props , "funk" , ULONG_MAX );
1018
+ tile -> rpcserv .store_obj_id = fd_pod_query_ulong ( config -> topo .props , "store" , ULONG_MAX );
1018
1019
tile -> rpcserv .rpc_port = config -> rpc .port ;
1019
1020
tile -> rpcserv .tpu_port = config -> tiles .quic .regular_transaction_listen_port ;
1020
1021
tile -> rpcserv .tpu_ip_addr = config -> net .ip_addr ;
0 commit comments