Skip to content

Commit 1c4c55d

Browse files
committed
feat(choreo): rewrite for dup handling and gossip integration
1 parent 4d6fdc7 commit 1c4c55d

31 files changed

+2486
-2410
lines changed

src/app/firedancer/topology.c

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
#include "topology.h"
22

33
#include "../../ballet/lthash/fd_lthash.h"
4-
#include "../../discof/reasm/fd_reasm.h"
5-
#include "../../discof/poh/fd_poh.h"
6-
#include "../../discof/replay/fd_exec.h"
7-
#include "../../discof/gossip/fd_gossip_tile.h"
8-
#include "../../discof/tower/fd_tower_tile.h"
9-
#include "../../discof/resolv/fd_resolv_tile.h"
10-
#include "../../discof/repair/fd_repair.h"
11-
#include "../../discof/replay/fd_replay_tile.h"
4+
#include "../../choreo/fd_choreo_base.h"
125
#include "../../disco/net/fd_net_tile.h"
136
#include "../../discof/restore/fd_snaprd_tile.h"
147
#include "../../disco/quic/fd_tpu.h"
158
#include "../../disco/pack/fd_pack_cost.h"
169
#include "../../disco/tiles.h"
1710
#include "../../disco/topo/fd_topob.h"
1811
#include "../../disco/topo/fd_cpu_topo.h"
19-
#include "../../util/pod/fd_pod_format.h"
20-
#include "../../util/tile/fd_tile_private.h"
12+
#include "../../discof/gossip/fd_gossip_tile.h"
13+
#include "../../discof/poh/fd_poh.h"
14+
#include "../../discof/reasm/fd_reasm.h"
15+
#include "../../discof/repair/fd_repair.h"
16+
#include "../../discof/replay/fd_exec.h"
17+
#include "../../discof/replay/fd_replay_tile.h"
18+
#include "../../discof/resolv/fd_resolv_tile.h"
2119
#include "../../discof/restore/utils/fd_ssmsg.h"
20+
#include "../../discof/tower/fd_tower_tile.h"
2221
#include "../../flamenco/gossip/fd_gossip.h"
2322
#include "../../flamenco/runtime/context/fd_capture_ctx.h"
2423
#include "../../funk/fd_funk.h" /* funk_footprint() */
24+
#include "../../util/pod/fd_pod_format.h"
25+
#include "../../util/tile/fd_tile_private.h"
2526

2627
#include <sys/random.h>
2728
#include <sys/types.h>
@@ -371,7 +372,7 @@ fd_topo_initialize( config_t * config ) {
371372

372373
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 */
373374
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 */
374-
/**/ fd_topob_link( topo, "tower_out", "tower_out", 1024UL, sizeof(fd_tower_slot_done_t), 1UL );
375+
/**/ fd_topob_link( topo, "tower_out", "tower_out", FD_BLOCK_MAX, sizeof(fd_tower_msg_t), 1UL );
375376
/**/ fd_topob_link( topo, "send_txns", "send_txns", 128UL, FD_TPU_RAW_MTU, 1UL ); /* TODO: Horribly named. Rename to indicate tile and where its going */
376377

377378
fd_topob_link( topo, "replay_exec", "replay_exec", 16384UL, sizeof(fd_exec_task_msg_t), 1UL );
@@ -510,7 +511,8 @@ fd_topo_initialize( config_t * config ) {
510511

511512
/**/ fd_topob_tile_in( topo, "replay", 0UL, "metric_in", "poh_replay", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
512513
FOR(exec_tile_cnt) fd_topob_tile_in( topo, "exec", i, "metric_in", "replay_exec", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
513-
/**/ fd_topob_tile_in ( topo, "tower", 0UL, "metric_in", "genesi_out", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
514+
/**/ fd_topob_tile_in ( topo, "tower", 0UL, "metric_in", "genesi_out", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
515+
/**/ fd_topob_tile_in ( topo, "tower", 0UL, "metric_in", "gossip_out", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
514516
/**/ fd_topob_tile_in ( topo, "tower", 0UL, "metric_in", "replay_out", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
515517
if( snapshots_enabled ) {
516518
fd_topob_tile_in ( topo, "tower", 0UL, "metric_in", "snap_out", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
@@ -940,8 +942,8 @@ fd_topo_configure_tile( fd_topo_tile_t * tile,
940942

941943
} else if( FD_UNLIKELY( !strcmp( tile->name, "tower" ) ) ) {
942944

943-
strncpy( tile->tower.identity_key_path, config->paths.identity_key, sizeof(tile->tower.identity_key_path) );
944-
strncpy( tile->tower.vote_acc_path, config->paths.vote_account, sizeof(tile->tower.vote_acc_path) );
945+
strncpy( tile->tower.identity_key, config->paths.identity_key, sizeof(tile->tower.identity_key) );
946+
strncpy( tile->tower.vote_account, config->paths.vote_account, sizeof(tile->tower.vote_account) );
945947
strncpy( tile->tower.ledger_path, config->paths.ledger, sizeof(tile->tower.ledger_path) );
946948

947949
} else if( FD_UNLIKELY( !strcmp( tile->name, "send" ) ) ) {

src/choreo/fd_choreo_base.h

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,10 @@
3232
#define FD_SLOT_PUBKEY_HASH(key,seed) FD_SLOT_HASH_HASH(key,seed)
3333
/* clang-format on */
3434

35-
/* The block_id is the merkle root of the last FEC set for a slot. This
36-
is guaranteed to be unique (practically speaking, the probability of
37-
collision before sun burns out is negligibly miniscule).
38-
39-
This is used as the identifier for a block (hence "block_id") because
40-
unlike the slot number, if a leader equivocates (ie. produces
41-
multiple blocks for the same slot), the block_id will remain unique
42-
unlike the slot. */
43-
4435
typedef uchar fd_block_id_t[ 32UL ];
4536

4637
typedef fd_slot_hash_t fd_slot_pubkey_t;
4738

39+
static const fd_pubkey_t pubkey_null = {{ 0 }};
40+
4841
#endif /* HEADER_fd_src_choreo_fd_choreo_base_h */

0 commit comments

Comments
 (0)