Skip to content

Commit 68eda9d

Browse files
committed
feat(choreo): rewrite for dup handling and gossip integration
1 parent 107707b commit 68eda9d

33 files changed

+2519
-2449
lines changed

src/app/firedancer/topology.c

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

3-
#include "../../discof/reasm/fd_reasm.h"
4-
#include "../../discof/poh/fd_poh.h"
5-
#include "../../discof/replay/fd_exec.h"
6-
#include "../../discof/gossip/fd_gossip_tile.h"
7-
#include "../../discof/tower/fd_tower_tile.h"
8-
#include "../../discof/resolv/fd_resolv_tile.h"
9-
#include "../../discof/repair/fd_repair.h"
10-
#include "../../discof/replay/fd_replay_tile.h"
3+
#include "../../choreo/fd_choreo_base.h"
114
#include "../../disco/net/fd_net_tile.h"
125
#include "../../disco/quic/fd_tpu.h"
136
#include "../../disco/pack/fd_pack_cost.h"
147
#include "../../disco/tiles.h"
158
#include "../../disco/topo/fd_topob.h"
169
#include "../../disco/topo/fd_cpu_topo.h"
17-
#include "../../util/pod/fd_pod_format.h"
18-
#include "../../util/tile/fd_tile_private.h"
10+
#include "../../discof/gossip/fd_gossip_tile.h"
11+
#include "../../discof/poh/fd_poh.h"
12+
#include "../../discof/reasm/fd_reasm.h"
13+
#include "../../discof/repair/fd_repair.h"
14+
#include "../../discof/replay/fd_exec.h"
15+
#include "../../discof/replay/fd_replay_tile.h"
16+
#include "../../discof/resolv/fd_resolv_tile.h"
1917
#include "../../discof/restore/utils/fd_ssmsg.h"
18+
#include "../../discof/tower/fd_tower_tile.h"
2019
#include "../../flamenco/gossip/fd_gossip.h"
2120
#include "../../flamenco/runtime/context/fd_capture_ctx.h"
21+
#include "../../util/pod/fd_pod_format.h"
22+
#include "../../util/tile/fd_tile_private.h"
2223

2324
#include <sys/random.h>
2425
#include <sys/types.h>
@@ -370,7 +371,7 @@ fd_topo_initialize( config_t * config ) {
370371

371372
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 */
372373
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 */
373-
/**/ fd_topob_link( topo, "tower_out", "tower_out", 1024UL, sizeof(fd_tower_slot_done_t), 1UL );
374+
/**/ fd_topob_link( topo, "tower_out", "tower_out", FD_BLOCK_MAX, sizeof(fd_tower_msg_t), 1UL );
374375
/**/ 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 */
375376

376377
fd_topob_link( topo, "replay_exec", "replay_exec", 16384UL, 2240UL, 1UL );
@@ -523,7 +524,8 @@ fd_topo_initialize( config_t * config ) {
523524
single out link, over which all the writer tiles round-robin. */
524525
FOR(writer_tile_cnt) for( ulong j=0UL; j<exec_tile_cnt; j++ )
525526
fd_topob_tile_in( topo, "writer", i, "metric_in", "exec_writer", j, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
526-
/**/ fd_topob_tile_in ( topo, "tower", 0UL, "metric_in", "genesi_out", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
527+
/**/ fd_topob_tile_in ( topo, "tower", 0UL, "metric_in", "genesi_out", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
528+
/**/ fd_topob_tile_in ( topo, "tower", 0UL, "metric_in", "gossip_out", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
527529
/**/ fd_topob_tile_in ( topo, "tower", 0UL, "metric_in", "replay_out", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
528530
if( snapshots_enabled ) {
529531
fd_topob_tile_in ( topo, "tower", 0UL, "metric_in", "snap_out", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
@@ -967,8 +969,8 @@ fd_topo_configure_tile( fd_topo_tile_t * tile,
967969

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

970-
strncpy( tile->tower.identity_key_path, config->paths.identity_key, sizeof(tile->tower.identity_key_path) );
971-
strncpy( tile->tower.vote_acc_path, config->paths.vote_account, sizeof(tile->tower.vote_acc_path) );
972+
strncpy( tile->tower.identity_key, config->paths.identity_key, sizeof(tile->tower.identity_key) );
973+
strncpy( tile->tower.vote_account, config->paths.vote_account, sizeof(tile->tower.vote_account) );
972974
strncpy( tile->tower.ledger_path, config->paths.ledger, sizeof(tile->tower.ledger_path) );
973975

974976
} 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)