Line data Source code
1 : #ifndef HEADER_fd_src_discof_votor_fd_votor_rooted_h 2 : #define HEADER_fd_src_discof_votor_fd_votor_rooted_h 3 : 4 : #include "../../disco/fd_disco_base.h" 5 : 6 : /* This belongs most cleanly in fd_votor_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. See fd_tower_slot_rooted.h, which 10 : exists for the same reason. */ 11 : 12 0 : #define FD_VOTOR_SIG_ROOTED (0) /* see fd_votor_tile.h for the full set */ 13 : 14 : /* fd_votor_rooted describes a Votor frag that notifies a new root. 15 : It is the Alpenglow counterpart of fd_tower_slot_rooted: under 16 : Alpenglow there is no tower, and votor replaces it as the tile that 17 : tells the rest of the validator which block can never be rolled back. 18 : 19 : A block is rooted once it, or one of its descendants, is finalized. 20 : Finalization in Alpenglow is absolute rather than probabilistic: a 21 : finalization certificate for a block implies no conflicting block for 22 : that slot can ever be finalized, so every ancestor of a finalized 23 : block is implicitly finalized too. That makes finalized the correct 24 : analogue of a tower root, and the same consumers rely on it the same 25 : way, "publishing" the new root to prune forks that do not descend 26 : from it. 27 : 28 : Votor only roots blocks for which it has observed replay completed, 29 : so the rooted blk never runs ahead of replay. Roots are 30 : monotonically increasing, and consecutive in slot number for all 31 : slots that are not skipped or implicitly finalized. */ 32 : 33 : struct fd_votor_rooted { 34 : ulong slot; 35 : fd_hash_t block_id; 36 : }; 37 : typedef struct fd_votor_rooted fd_votor_rooted_t; 38 : 39 : #endif /* HEADER_fd_src_discof_votor_fd_votor_rooted_h */