Line data Source code
1 : #ifndef HEADER_fd_src_discof_tower_fd_tower_slot_rooted_h 2 : #define HEADER_fd_src_discof_tower_fd_tower_slot_rooted_h 3 : 4 : #include "../../disco/fd_disco_base.h" 5 : 6 : /* This belongs most cleanly in fd_tower_tile.h, but the shred tile 7 : needs this type, and the shred tile is in disco, not discof. Nothing 8 : in this header requires discof, so we factor it out so that the shred 9 : tile can just include this one. */ 10 : 11 : // #define FD_TOWER_SIG_SLOT_CONFIRMED (0) 12 : // #define FD_TOWER_SIG_SLOT_DONE (1) 13 : // #define FD_TOWER_SIG_SLOT_DUPLICATE (2) 14 : // #define FD_TOWER_SIG_SLOT_IGNORED (3) 15 0 : #define FD_TOWER_SIG_SLOT_ROOTED (4) 16 : 17 : /* fd_tower_slot_rooted describes a Tower frag that notifies a new root. 18 : A block is rooted if it or any of its descendants reach max lockout 19 : per TowerBFT rules. Once a block is rooted, it can never be rolled 20 : back (whereas technically, any of the above confirmation levels can 21 : be rolled back, but it is extremely unlikely and would only happen 22 : with a large percentage of malicious stake in the network). This is 23 : the most important confirmation level for Firedancer's internal 24 : structures, since it is the only one that guarantees a block will 25 : never be rolled back, many structures "publish" a new root which 26 : prunes forks that do not descend from that root. 27 : 28 : Note even if tower never actually voted on a slot (and therefore the 29 : slot never became a tower root), tower will still send a root 30 : confirmation for that slot if a descendant is voted on and eventually 31 : rooted. */ 32 : 33 : struct fd_tower_slot_rooted { 34 : ulong slot; 35 : fd_hash_t block_id; 36 : }; 37 : typedef struct fd_tower_slot_rooted fd_tower_slot_rooted_t; 38 : 39 : #endif /* HEADER_fd_src_discof_tower_fd_tower_slot_rooted_h */