diff --git a/src/app/fdctl/run/tiles/fd_replay.c b/src/app/fdctl/run/tiles/fd_replay.c index 72ab003794..18cdccaecf 100644 --- a/src/app/fdctl/run/tiles/fd_replay.c +++ b/src/app/fdctl/run/tiles/fd_replay.c @@ -497,6 +497,7 @@ after_frag( void * _ctx, fd_fork_t * fork = fd_fork_frontier_ele_query( ctx->forks->frontier, &ctx->curr_slot, NULL, ctx->forks->pool ); + if( fork == NULL ) { long prepare_time_ns = -fd_log_wallclock(); @@ -515,6 +516,24 @@ after_frag( void * _ctx, // fork is advancing FD_LOG_DEBUG(( "new block execution - slot: %lu, parent_slot: %lu", ctx->curr_slot, ctx->parent_slot )); + /* if it is an epoch boundary, push out stake weights */ + int is_new_epoch = 0; + if( fork->slot_ctx.slot_bank.slot != 0 ) { + ulong slot_idx; + fd_epoch_bank_t * epoch_bank = fd_exec_epoch_ctx_epoch_bank( fork->slot_ctx.epoch_ctx ); + ulong prev_epoch = fd_slot_to_epoch( &epoch_bank->epoch_schedule, fork->slot_ctx.slot_bank.prev_slot, &slot_idx ); + ulong new_epoch = fd_slot_to_epoch( &epoch_bank->epoch_schedule, fork->slot_ctx.slot_bank.slot, &slot_idx ); + + if( prev_epoch < new_epoch || slot_idx == 0 ) { + FD_LOG_DEBUG(("Epoch boundary")); + is_new_epoch = 1; + } + } + + if( is_new_epoch ) { + publish_stake_weights( ctx, mux, &fork->slot_ctx ); + } + fork->slot_ctx.slot_bank.prev_slot = fork->slot_ctx.slot_bank.slot; fork->slot_ctx.slot_bank.slot = ctx->curr_slot; @@ -533,26 +552,8 @@ after_frag( void * _ctx, FD_LOG_ERR(( "txn publishing failed" )); } - /* if it is an epoch boundary, push out stake weights */ - int is_new_epoch = 0; - if( fork->slot_ctx.slot_bank.slot != 0 ) { - ulong slot_idx; - fd_epoch_bank_t * epoch_bank = fd_exec_epoch_ctx_epoch_bank( fork->slot_ctx.epoch_ctx ); - ulong prev_epoch = fd_slot_to_epoch( &epoch_bank->epoch_schedule, fork->slot_ctx.slot_bank.prev_slot, &slot_idx ); - ulong new_epoch = fd_slot_to_epoch( &epoch_bank->epoch_schedule, fork->slot_ctx.slot_bank.slot, &slot_idx ); - - if( prev_epoch < new_epoch || slot_idx == 0 ) { - FD_LOG_DEBUG(("Epoch boundary")); - is_new_epoch = 1; - } - } - res = fd_runtime_block_execute_prepare( &fork->slot_ctx ); - if( is_new_epoch ) { - publish_stake_weights( ctx, mux, &fork->slot_ctx ); - } - if( res != FD_RUNTIME_EXECUTE_SUCCESS ) { FD_LOG_ERR(( "block prep execute failed" )); } diff --git a/src/app/fdctl/run/topos/fd_firedancer.c b/src/app/fdctl/run/topos/fd_firedancer.c index 73285627db..3b452234dd 100644 --- a/src/app/fdctl/run/topos/fd_firedancer.c +++ b/src/app/fdctl/run/topos/fd_firedancer.c @@ -331,14 +331,14 @@ fd_topo_firedancer( config_t * _config ) { /**/ fd_topob_tile_in( topo, "sender", 0UL, "metric_in", "sign_voter", 0UL, FD_TOPOB_UNRELIABLE, FD_TOPOB_UNPOLLED ); /**/ fd_topob_tile_in( topo, "pack", 0UL, "metric_in", "voter_pack", 0UL, FD_TOPOB_UNRELIABLE, FD_TOPOB_POLLED ); + /**/ fd_topob_tile_in( topo, "pack", 0UL, "metric_in", "dedup_pack", 0UL, FD_TOPOB_UNRELIABLE, FD_TOPOB_POLLED ); /* No reliable consumers of networking fragments, may be dropped or overrun */ + /**/ fd_topob_tile_in( topo, "pack", 0UL, "metric_in", "poh_pack", 0UL, FD_TOPOB_UNRELIABLE, FD_TOPOB_POLLED ); /**/ fd_topob_tile_in( topo, "pack", 0UL, "metric_in", "gossip_pack", 0UL, FD_TOPOB_UNRELIABLE, FD_TOPOB_POLLED ); /* No reliable consumers of networking fragments, may be dropped or overrun */ /**/ fd_topob_tile_in( topo, "bhole", 0UL, "metric_in", "replay_notif", 0UL, FD_TOPOB_UNRELIABLE, FD_TOPOB_POLLED ); /* No reliable consumers of networking fragments, may be dropped or overrun */ /**/ fd_topob_tile_in( topo, "pohi", 0UL, "metric_in", "replay_poh", 0UL, FD_TOPOB_UNRELIABLE, FD_TOPOB_POLLED ); /* No reliable consumers of networking fragments, may be dropped or overrun */ /**/ fd_topob_tile_in( topo, "pohi", 0UL, "metric_in", "stake_out", 0UL, FD_TOPOB_UNRELIABLE, FD_TOPOB_POLLED ); /* No reliable consumers of networking fragments, may be dropped or overrun */ - /**/ fd_topob_tile_in( topo, "pack", 0UL, "metric_in", "dedup_pack", 0UL, FD_TOPOB_UNRELIABLE, FD_TOPOB_POLLED ); /* No reliable consumers of networking fragments, may be dropped or overrun */ /**/ fd_topob_tile_in( topo, "pohi", 0UL, "metric_in", "pack_replay", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED ); - /**/ fd_topob_tile_in( topo, "pack", 0UL, "metric_in", "poh_pack", 0UL, FD_TOPOB_UNRELIABLE, FD_TOPOB_POLLED ); fd_topob_tile_out( topo, "pohi", 0UL, "poh_pack", 0UL ); /* Hacky: Reserve a ulong to allow net0 to pass its PID to its neighbors */