LCOV - code coverage report
Current view: top level - discof/replay - fd_replay_tile.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 0 6 0.0 %
Date: 2026-02-12 05:50:35 Functions: 0 0 -

          Line data    Source code
       1             : #ifndef HEADER_fd_src_discof_replay_fd_replay_tile_h
       2             : #define HEADER_fd_src_discof_replay_fd_replay_tile_h
       3             : 
       4             : #include "../poh/fd_poh_tile.h"
       5             : #include "../../disco/tiles.h"
       6             : #include "../../flamenco/types/fd_types_custom.h"
       7             : 
       8           0 : #define REPLAY_SIG_SLOT_COMPLETED (0)
       9           0 : #define REPLAY_SIG_SLOT_DEAD      (1)
      10           0 : #define REPLAY_SIG_ROOT_ADVANCED  (2)
      11           0 : #define REPLAY_SIG_RESET          (3)
      12           0 : #define REPLAY_SIG_BECAME_LEADER  (4)
      13           0 : #define REPLAY_SIG_OC_ADVANCED    (5)
      14             : 
      15             : struct fd_replay_slot_completed {
      16             :   ulong slot;
      17             :   ulong root_slot;
      18             :   ulong storage_slot;
      19             :   ulong epoch;
      20             :   ulong slot_in_epoch;
      21             :   ulong block_height;
      22             :   ulong parent_slot;
      23             : 
      24             :   fd_hash_t block_id;        /* block id (last FEC set's merkle root) of the slot received from replay */
      25             :   fd_hash_t parent_block_id; /* parent block id of the slot received from replay */
      26             :   fd_hash_t bank_hash;       /* bank hash of the slot received from replay */
      27             :   fd_hash_t block_hash;      /* last microblock header hash of slot received from replay */
      28             : 
      29             :   ulong transaction_count;
      30             : 
      31             :   struct {
      32             :     double initial;
      33             :     double terminal;
      34             :     double taper;
      35             :     double foundation;
      36             :     double foundation_term;
      37             :   } inflation;
      38             : 
      39             :   struct {
      40             :     ulong lamports_per_uint8_year;
      41             :     double exemption_threshold;
      42             :     uchar burn_percent;
      43             :   } rent;
      44             : 
      45             :   /* Reference to the bank for this completed slot.  TODO: We can
      46             :      eliminate non-timestamp fields and have consumers just use
      47             :      bank_idx. */
      48             :   ulong bank_idx;
      49             :   ulong parent_bank_idx; /* ULONG_MAX if unavailable */
      50             : 
      51             :   long first_fec_set_received_nanos;      /* timestamp when replay received the first fec of the slot from turbine or repair */
      52             :   long preparation_begin_nanos;           /* timestamp when replay began preparing the state to begin execution of the slot */
      53             :   long first_transaction_scheduled_nanos; /* timestamp when replay first sent a transaction to be executed */
      54             :   long last_transaction_finished_nanos;   /* timestamp when replay received the last execution completion */
      55             :   long completion_time_nanos;             /* timestamp when replay completed finalizing the slot and notified tower */
      56             : 
      57             :   int is_leader; /* whether we were leader for this slot */
      58             :   ulong identity_balance;
      59             : 
      60             :   struct {
      61             :     ulong block_cost;
      62             :     ulong vote_cost;
      63             :     ulong allocated_accounts_data_size;
      64             :     ulong block_cost_limit;
      65             :     ulong vote_cost_limit;
      66             :     ulong account_cost_limit;
      67             :   } cost_tracker;
      68             : };
      69             : 
      70             : typedef struct fd_replay_slot_completed fd_replay_slot_completed_t;
      71             : 
      72             : struct fd_replay_slot_dead {
      73             :   ulong     slot;
      74             :   fd_hash_t block_id;
      75             : };
      76             : typedef struct fd_replay_slot_dead fd_replay_slot_dead_t;
      77             : 
      78             : struct fd_replay_oc_advanced {
      79             :   ulong slot;
      80             :   ulong bank_idx;
      81             : };
      82             : typedef struct fd_replay_oc_advanced fd_replay_oc_advanced_t;
      83             : 
      84             : struct fd_replay_root_advanced {
      85             :   ulong bank_idx;
      86             : };
      87             : typedef struct fd_replay_root_advanced fd_replay_root_advanced_t;
      88             : 
      89             : union fd_replay_message {
      90             :   fd_replay_slot_completed_t  slot_completed;
      91             :   fd_replay_root_advanced_t   root_advanced;
      92             :   fd_poh_reset_t              reset;
      93             :   fd_became_leader_t          became_leader;
      94             : };
      95             : 
      96             : typedef union fd_replay_message fd_replay_message_t;
      97             : 
      98             : #endif /* HEADER_fd_src_discof_replay_fd_replay_tile_h */

Generated by: LCOV version 1.14