LCOV - code coverage report
Current view: top level - discof/votor - fd_votor_tile.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 1 5 20.0 %
Date: 2026-09-17 04:28:31 Functions: 0 0 -

          Line data    Source code
       1             : #ifndef HEADER_fd_src_discof_votor_fd_votor_tile_h
       2             : #define HEADER_fd_src_discof_votor_fd_votor_tile_h
       3             : 
       4             : #include "fd_votor_rooted.h"
       5             : #include "../../ballet/bls/fd_bls.h"
       6             : #include "../../disco/topo/fd_topo.h"
       7             : #include "../../waltz/quic/tls/fd_quic_tls.h"
       8             : 
       9             : // #define FD_VOTOR_SIG_ROOTED (0)  /* defined in fd_votor_rooted.h */
      10           0 : #define FD_VOTOR_SIG_CERTED (1)
      11          78 : #define FD_VOTOR_SIG_REPAIR (2)
      12           0 : #define FD_VOTOR_SIG_LEADER (3)
      13           0 : #define FD_VOTOR_SIG_REWARD (4)
      14             : 
      15           0 : #define FD_VOTOR_NET_BURST (2UL*(1UL+FD_QUIC_TLS_HS_DATA_CNT+3UL)) /* 1 ACK + 1 TLS + 3 1-RTT pkts * 2 for both client and server */
      16             : 
      17             : typedef fd_votor_rooted_t fd_votor_repair_t;
      18             : 
      19             : /* fd_votor_certed notifies that we have a valid cert for the block
      20             :    reaching a given state.  A final cert names only its slot, so it is
      21             :    reported once the notarization of that slot has formed too.
      22             : 
      23             :    kind           | block_id | agg         | agg2
      24             :    ---------------|----------|-------------|---------------------
      25             :    final          | ✓        | final votes | notar votes
      26             :    fast_final     | ✓        | notar votes | -
      27             :    notar          | ✓        | notar votes | -
      28             :    notar_fallback | ✓        | notar votes | notar-fallback votes
      29             :    skip           | ✗        | skip  votes | skip-fallback  votes */
      30             : 
      31             : struct fd_votor_certed {
      32             :   uint         kind; /* AG_CERT_KIND_* */
      33             :   ulong        slot;
      34             :   fd_hash_t    block_id;
      35             :   fd_bls_agg_t agg;
      36             :   fd_bls_agg_t agg2;
      37             : };
      38             : typedef struct fd_votor_certed fd_votor_certed_t;
      39             : 
      40             : /* fd_votor_leader notifies that it is time to become leader for the
      41             :    window beginning from slot. */
      42             : 
      43             : struct fd_votor_leader {
      44             :   ulong     slot;
      45             :   ulong     parent_slot;
      46             :   fd_hash_t parent_block_id;
      47             : };
      48             : typedef struct fd_votor_leader fd_votor_leader_t;
      49             : 
      50             : /* fd_votor_reward notifies Votor has produced a new reward cert (agg of
      51             :    all skip / reward votes).  Votor always publishes a fd_votor_reward_t
      52             :    for every leader slot before fd_votor_leader_t, and may publish add'l
      53             :    reward certs that include more votes after fd_votor_leader_t. */
      54             : 
      55             : struct fd_votor_reward {
      56             :   ulong        slot;
      57             :   fd_hash_t    block_id;
      58             :   fd_bls_agg_t agg_notar;
      59             :   fd_bls_agg_t agg_skip;
      60             : };
      61             : typedef struct fd_votor_reward fd_votor_reward_t;
      62             : 
      63             : union fd_votor_msg {
      64             :   fd_votor_certed_t certed;
      65             :   fd_votor_rooted_t rooted;
      66             :   fd_votor_repair_t repair;
      67             :   fd_votor_leader_t leader;
      68             :   fd_votor_reward_t reward;
      69             : };
      70             : typedef union fd_votor_msg fd_votor_msg_t;
      71             : 
      72             : extern fd_topo_run_tile_t fd_tile_votor;
      73             : 
      74             : #endif /* HEADER_fd_src_discof_votor_fd_votor_tile_h */

Generated by: LCOV version 1.14