Skip to content

Commit 9b96afa

Browse files
committed
feat(choreo): dup handling, gossip int, bug fixes, missing logic
1 parent a3ceed2 commit 9b96afa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+3984
-4618
lines changed

src/app/firedancer-dev/commands/send_test/send_test_helpers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ encode_vote( send_test_ctx_t * ctx, fd_tower_slot_done_t * slot_done ) {
215215
/* Create minimal mock tower with one vote */
216216
uchar tower_mem[ FD_TOWER_FOOTPRINT ] __attribute__((aligned(FD_TOWER_ALIGN)));
217217
fd_tower_t * tower = fd_tower_join( fd_tower_new( tower_mem ) );
218-
fd_tower_votes_push_tail( tower, (fd_tower_vote_t){ .slot = vote_slot, .conf = 1 } );
218+
fd_tower_push_tail( tower, (fd_tower_vote_t){ .slot = vote_slot, .conf = 1 } );
219219

220220
/* Mock values */
221221
fd_lockout_offset_t lockouts_scratch[1];

src/app/firedancer/topology.c

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

33
#include "../../ballet/lthash/fd_lthash.h"
4+
#include "../../choreo/fd_choreo_base.h"
45
#include "../../discof/reasm/fd_reasm.h"
56
#include "../../discof/poh/fd_poh.h"
67
#include "../../discof/replay/fd_exec.h"
@@ -404,7 +405,7 @@ fd_topo_initialize( config_t * config ) {
404405

405406
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 */
406407
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 */
407-
/**/ fd_topob_link( topo, "tower_out", "tower_out", 1024UL, sizeof(fd_tower_slot_done_t), 1UL );
408+
/**/ fd_topob_link( topo, "tower_out", "tower_out", FD_BLOCK_MAX, sizeof(fd_tower_msg_t), 1UL );
408409
/**/ 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 */
409410

410411
fd_topob_link( topo, "replay_exec", "replay_exec", 16384UL, sizeof(fd_exec_task_msg_t), 1UL );
@@ -551,11 +552,8 @@ fd_topo_initialize( config_t * config ) {
551552

552553
/**/ fd_topob_tile_in( topo, "replay", 0UL, "metric_in", "poh_replay", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
553554
FOR(exec_tile_cnt) fd_topob_tile_in( topo, "exec", i, "metric_in", "replay_exec", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
554-
/**/ fd_topob_tile_in ( topo, "tower", 0UL, "metric_in", "genesi_out", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
555+
/**/ fd_topob_tile_in ( topo, "tower", 0UL, "metric_in", "gossip_out", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
555556
/**/ fd_topob_tile_in ( topo, "tower", 0UL, "metric_in", "replay_out", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
556-
if( snapshots_enabled ) {
557-
fd_topob_tile_in ( topo, "tower", 0UL, "metric_in", "snapin_manif", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
558-
}
559557
/**/ fd_topob_tile_out( topo, "tower", 0UL, "tower_out", 0UL );
560558
/**/ fd_topob_tile_in ( topo, "send", 0UL, "metric_in", "replay_stake", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
561559
/**/ fd_topob_tile_in ( topo, "send", 0UL, "metric_in", "gossip_out", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
@@ -727,6 +725,7 @@ fd_topo_initialize( config_t * config ) {
727725
FOR(exec_tile_cnt) fd_topob_tile_uses( topo, &topo->tiles[ fd_topo_find_tile( topo, "exec", i ) ], banks_obj, FD_SHMEM_JOIN_MODE_READ_WRITE ); /* TODO: Should be readonly? */
728726
FOR(bank_tile_cnt) fd_topob_tile_uses( topo, &topo->tiles[ fd_topo_find_tile( topo, "bank", i ) ], banks_obj, FD_SHMEM_JOIN_MODE_READ_WRITE );
729727
FOR(resolv_tile_cnt) fd_topob_tile_uses( topo, &topo->tiles[ fd_topo_find_tile( topo, "resolv", i ) ], banks_obj, FD_SHMEM_JOIN_MODE_READ_ONLY );
728+
/**/ fd_topob_tile_uses( topo, &topo->tiles[ fd_topo_find_tile( topo, "tower", 0UL ) ], banks_obj, FD_SHMEM_JOIN_MODE_READ_ONLY );
730729
FD_TEST( fd_pod_insertf_ulong( topo->props, banks_obj->id, "banks" ) );
731730

732731
fd_topo_obj_t * progcache_obj = setup_topo_progcache( topo, "progcache",
@@ -1006,8 +1005,8 @@ fd_topo_configure_tile( fd_topo_tile_t * tile,
10061005

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

1009-
strncpy( tile->tower.identity_key_path, config->paths.identity_key, sizeof(tile->tower.identity_key_path) );
1010-
strncpy( tile->tower.vote_acc_path, config->paths.vote_account, sizeof(tile->tower.vote_acc_path) );
1008+
strncpy( tile->tower.identity_key, config->paths.identity_key, sizeof(tile->tower.identity_key) );
1009+
strncpy( tile->tower.vote_account, config->paths.vote_account, sizeof(tile->tower.vote_account) );
10111010
strncpy( tile->tower.ledger_path, config->paths.ledger, sizeof(tile->tower.ledger_path) );
10121011

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

src/choreo/epoch/Local.mk

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/choreo/epoch/fd_epoch.c

Lines changed: 0 additions & 146 deletions
This file was deleted.

src/choreo/epoch/fd_epoch.h

Lines changed: 0 additions & 133 deletions
This file was deleted.

src/choreo/fd_choreo.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#define HEADER_fd_src_choreo_fd_choreo_h
33

44
#include "fd_choreo_base.h"
5-
#include "epoch/fd_epoch.h"
65
#include "eqvoc/fd_eqvoc.h"
76
#include "ghost/fd_ghost.h"
87
#include "notar/fd_notar.h"

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)