@@ -371,6 +371,8 @@ fd_topo_initialize( config_t * config ) {
371371
372372 fd_topob_wksp ( topo , "cswtch" );
373373
374+ fd_topob_wksp ( topo , "exec_replay" );
375+
374376 if ( FD_LIKELY ( snapshots_enabled ) ) {
375377 fd_topob_wksp ( topo , "snapct" );
376378 fd_topob_wksp ( topo , "snapld" );
@@ -407,9 +409,7 @@ fd_topo_initialize( config_t * config ) {
407409
408410 #define FOR (cnt ) for( ulong i=0UL; i<cnt; i++ )
409411
410- /* TODO: Explain this .... USHORT_MAX is not dcache max */
411- ulong pending_fec_shreds_depth = fd_ulong_min ( fd_ulong_pow2_up ( config -> tiles .shred .max_pending_shred_sets * FD_REEDSOL_DATA_SHREDS_MAX ), USHORT_MAX + 1 /* dcache max */ );
412- ulong max_unrooted_slots = config -> tiles .tower .max_unrooted_slots ;
412+ ulong shred_depth = 65536UL ; /* from fdctl/topology.c shred_store link. MAKE SURE TO KEEP IN SYNC. */
413413
414414 /* topo, link_name, wksp_name, depth, mtu, burst */
415415 /**/ fd_topob_link ( topo , "gossip_net" , "net_gossip" , 32768UL , FD_NET_MTU , 1UL );
@@ -481,14 +481,15 @@ fd_topo_initialize( config_t * config ) {
481481 /**/ fd_topob_link ( topo , "send_sign" , "send_sign" , 128UL , FD_TXN_MTU , 1UL ); /* TODO: Depth probably doesn't need to be 128 */
482482 /**/ fd_topob_link ( topo , "sign_send" , "sign_send" , 128UL , sizeof (fd_ed25519_sig_t ), 1UL ); /* TODO: Depth probably doesn't need to be 128 */
483483
484- FOR (shred_tile_cnt ) fd_topob_link ( topo , "shred_out ", " shred_out ", pending_fec_shreds_depth, FD_SHRED_OUT_MTU, 3UL ); /* TODO: Pretty sure burst of 3 is incorrect here */
485- FOR (shred_tile_cnt ) fd_topob_link ( topo , "repair_shred" , "shred_out" , pending_fec_shreds_depth , sizeof ( fd_ed25519_sig_t ), 1UL ); /* TODO: Also pending_fec_shreds_depth? Seems wrong */
486- /**/ fd_topob_link ( topo , "tower_out" , "tower_out" , max_unrooted_slots , sizeof (fd_tower_msg_t ), 1UL );
484+ FOR (shred_tile_cnt ) fd_topob_link ( topo , "shred_out ", " shred_out ", shred_depth, FD_SHRED_OUT_MTU, 3UL ); /* TODO: Pretty sure burst of 3 is incorrect here */
485+ FOR (shred_tile_cnt ) fd_topob_link ( topo , "repair_shred" , "shred_out" , shred_depth , sizeof ( fd_ed25519_sig_t ), 1UL );
486+ /**/ fd_topob_link ( topo , "tower_out" , "tower_out" , 128UL , sizeof (fd_tower_msg_t ), 3UL ); /* dup conf + cluster conf + slot_done */
487487 /**/ fd_topob_link ( topo , "send_out" , "send_out" , 128UL , FD_TPU_RAW_MTU , 1UL );
488488
489489 fd_topob_link ( topo , "replay_exec" , "replay_exec" , 16384UL , sizeof (fd_exec_task_msg_t ), 1UL );
490490
491491 FOR (exec_tile_cnt ) fd_topob_link ( topo , "exec_sig ", " exec_sig ", 16384UL, 64UL, 1UL );
492+ FOR (exec_tile_cnt ) fd_topob_link ( topo , "exec_replay" , "exec_replay" , 16384UL , sizeof (fd_exec_task_done_msg_t ), 1UL );
492493
493494 ushort parsed_tile_to_cpu [ FD_TILE_MAX ];
494495 /* Unassigned tiles will be floating, unless auto topology is enabled. */
@@ -670,8 +671,9 @@ fd_topo_initialize( config_t * config ) {
670671 /**/ fd_topob_tile_in ( topo , "replay" , 0UL , "metric_in" , "poh_replay" , 0UL , FD_TOPOB_RELIABLE , FD_TOPOB_POLLED );
671672 FOR (exec_tile_cnt ) fd_topob_tile_in ( topo , "exec ", i, " metric_in ", " replay_exec ", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
672673
674+ /**/ fd_topob_tile_in ( topo, " tower ", 0UL, " metric_in ", " dedup_resolv ", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
675+ /**/ fd_topob_tile_in ( topo, " tower ", 0UL, " metric_in ", " replay_exec ", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
673676 /**/ fd_topob_tile_in ( topo, " tower ", 0UL, " metric_in ", " genesi_out ", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
674- /**/ fd_topob_tile_in ( topo, " tower ", 0UL, " metric_in ", " gossip_out ", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
675677 /**/ fd_topob_tile_in ( topo, " tower ", 0UL, " metric_in ", " replay_out ", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
676678 if ( snapshots_enabled ) {
677679 fd_topob_tile_in ( topo , "tower" , 0UL , "metric_in" , "snapin_manif" , 0UL , FD_TOPOB_RELIABLE , FD_TOPOB_POLLED );
@@ -726,6 +728,9 @@ fd_topo_initialize( config_t * config ) {
726728 FOR (exec_tile_cnt ) fd_topob_tile_in ( topo , "dedup" , 0UL , "metric_in" , "exec_sig" , i , FD_TOPOB_RELIABLE , FD_TOPOB_POLLED );
727729 FOR (exec_tile_cnt ) fd_topob_tile_in ( topo , "pack ", 0UL, " metric_in ", " exec_sig ", i, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
728730 FOR (exec_tile_cnt ) fd_topob_tile_out ( topo , "exec" , i , "exec_sig" , i );
731+ FOR (exec_tile_cnt ) fd_topob_tile_out ( topo , "exec ", i, " exec_replay ", i );
732+ FOR (exec_tile_cnt ) fd_topob_tile_in ( topo , "replay" , 0UL , "metric_in" , "exec_replay" , i , FD_TOPOB_RELIABLE , FD_TOPOB_POLLED );
733+
729734
730735 if ( FD_UNLIKELY ( config -> tiles .bundle .enabled ) ) {
731736 fd_topob_wksp ( topo , "bundle_verif" );
@@ -838,11 +843,6 @@ fd_topo_initialize( config_t * config ) {
838843 fd_topob_tile_in ( topo , "replay" , 0UL , "metric_in" , "rpc_replay" , 0UL , FD_TOPOB_RELIABLE , FD_TOPOB_POLLED );
839844 }
840845
841- fd_topob_wksp ( topo , "exec_replay" );
842- FOR (exec_tile_cnt ) fd_topob_link ( topo , "exec_replay ", " exec_replay ", 16384UL, sizeof(fd_exec_task_done_msg_t), 1UL );
843- FOR (exec_tile_cnt ) fd_topob_tile_out ( topo , "exec" , i , "exec_replay" , i );
844- FOR (exec_tile_cnt ) fd_topob_tile_in ( topo , "replay ", 0UL, " metric_in ", " exec_replay ", i, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
845-
846846 if ( FD_LIKELY ( !is_auto_affinity ) ) {
847847 if ( FD_UNLIKELY ( affinity_tile_cnt < topo -> tile_cnt ) )
848848 FD_LOG_ERR (( "The topology you are using has %lu tiles, but the CPU affinity specified in the config tile as [layout.affinity] only provides for %lu cores. "
@@ -941,7 +941,6 @@ fd_topo_initialize( config_t * config ) {
941941 FOR (exec_tile_cnt ) fd_topob_tile_uses ( topo , & topo -> tiles [ fd_topo_find_tile ( topo , "exec" , i ) ], bank_hash_cmp_obj , FD_SHMEM_JOIN_MODE_READ_WRITE );
942942 FD_TEST ( fd_pod_insertf_ulong ( topo -> props , bank_hash_cmp_obj -> id , "bh_cmp" ) );
943943
944- ulong shred_depth = 65536UL ; /* from fdctl/topology.c shred_store link. MAKE SURE TO KEEP IN SYNC. */
945944 ulong fec_set_cnt = shred_depth + config -> tiles .shred .max_pending_shred_sets + 4UL ;
946945 ulong fec_sets_sz = fec_set_cnt * sizeof (fd_shred34_t )* 4 ; /* mirrors # of dcache entires in frankendancer */
947946 fd_topo_obj_t * fec_sets_obj = setup_topo_fec_sets ( topo , "fec_sets" , shred_tile_cnt * fec_sets_sz );
@@ -1209,7 +1208,8 @@ fd_topo_configure_tile( fd_topo_tile_t * tile,
12091208
12101209 } else if ( FD_UNLIKELY ( !strcmp ( tile -> name , "tower" ) ) ) {
12111210
1212- tile -> tower .slot_max = config -> tiles .tower .max_unrooted_slots ;
1211+ tile -> tower .max_live_slots = config -> firedancer .runtime .max_live_slots ;
1212+ tile -> tower .max_lookahead_conf = config -> tiles .tower .max_lookahead_conf ;
12131213 strncpy ( tile -> tower .identity_key , config -> paths .identity_key , sizeof (tile -> tower .identity_key ) );
12141214 strncpy ( tile -> tower .vote_account , config -> paths .vote_account , sizeof (tile -> tower .vote_account ) );
12151215 strncpy ( tile -> tower .base_path , config -> paths .base , sizeof (tile -> tower .base_path ) );
0 commit comments