LCOV - code coverage report
Current view: top level - discof/replay - fd_execrp.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 0 4 0.0 %
Date: 2026-09-17 04:28:31 Functions: 0 0 -

          Line data    Source code
       1             : #ifndef HEADER_fd_src_discof_replay_fd_exec_h
       2             : #define HEADER_fd_src_discof_replay_fd_exec_h
       3             : 
       4             : #include "../../disco/fd_txn_p.h"
       5             : #include "../../flamenco/fd_flamenco_base.h"
       6             : #include "../../choreo/tower/fd_tower_serdes.h"
       7             : 
       8             : /* Exec tile task types. */
       9           0 : #define FD_EXECRP_TT_TXN_EXEC      (1UL) /* Transaction execution. */
      10           0 : #define FD_EXECRP_TT_TXN_SIGVERIFY (2UL) /* Transaction sigverify. */
      11           0 : #define FD_EXECRP_TT_POH_HASH      (3UL) /* PoH hashing. */
      12             : 
      13             : /* Sent from the replay tile to the exec tiles.  These describe one of
      14             :    several types of tasks for an exec tile.  An idx to the bank in the
      15             :    bank pool must be sent over because the key of the bank will change
      16             :    as FEC sets are processed. */
      17             : 
      18             : struct fd_execrp_txn_exec_msg {
      19             :   ulong      bank_idx;
      20             :   ulong      txn_idx;
      21             :   fd_txn_p_t txn[ 1 ];
      22             : 
      23             :   /* Used currently by solcap to maintain ordering of messages
      24             :      this will change to using txn sigs eventually */
      25             :   ulong      capture_txn_idx;
      26             : 
      27             :   /* FEC-set merkle root at dispatch time. */
      28             :   uchar      fec_merkle_root[ 32 ];
      29             : 
      30             :   /* 0-indexed position of this transaction within its block. */
      31             :   ulong      index_in_slot;
      32             : };
      33             : typedef struct fd_execrp_txn_exec_msg fd_execrp_txn_exec_msg_t;
      34             : 
      35             : struct fd_execrp_txn_sigverify_msg {
      36             :   ulong      bank_idx;
      37             :   ulong      txn_idx;
      38             :   fd_txn_p_t txn[ 1 ];
      39             : };
      40             : typedef struct fd_execrp_txn_sigverify_msg fd_execrp_txn_sigverify_msg_t;
      41             : 
      42           0 : #define FD_EXECRP_POH_PARA 16
      43             : struct fd_execrp_poh_hash_msg {
      44             :   ulong     bank_idx;
      45             :   ulong     cnt;     /* In [1,FD_EXECRP_POH_PARA] */
      46             :   ulong     hashcnt; /* Same for every element of the batch */
      47             :   fd_hash_t hash[ FD_EXECRP_POH_PARA ];
      48             : };
      49             : typedef struct fd_execrp_poh_hash_msg fd_execrp_poh_hash_msg_t;
      50             : 
      51             : union fd_execrp_task_msg {
      52             :   fd_execrp_txn_exec_msg_t      txn_exec;
      53             :   fd_execrp_txn_sigverify_msg_t txn_sigverify;
      54             :   fd_execrp_poh_hash_msg_t      poh_hash;
      55             : };
      56             : 
      57             : typedef union fd_execrp_task_msg fd_execrp_task_msg_t;
      58             : 
      59             : /* Sent from exec tiles to the replay tile, notifying the replay tile
      60             :    that a task has been completed.  That is, if the task has any
      61             :    observable side effects, such as updates to accounts, then those side
      62             :    effects are fully visible on any other exec tile. */
      63             : 
      64             : struct fd_execrp_txn_exec_done_msg {
      65             :   ulong txn_idx;
      66             : 
      67             :   /* These flags form a nested series of if statements.
      68             :      if( is_committable ) {
      69             :        if( is_fees_only ) {
      70             :          instructions will not be executed
      71             :          txn_err will be non-zero and will be one of the account loader errors
      72             :        } else if( is_noop ) {
      73             :          instructions will not be executed and no fees charged
      74             :          txn_err will be non-zero and will be a fee payer validation error
      75             :        } else {
      76             :          instructions will execute
      77             :          if( txn_err is non-zero ) {
      78             :            there's likely an instruction error
      79             :          } else {
      80             :            transaction executed successfully
      81             :            https://github.com/anza-xyz/agave/blob/v3.1.8/svm/src/transaction_execution_result.rs#L26
      82             :          }
      83             :        }
      84             :      } else {
      85             :        either failed before account loading, or failed cost tracker
      86             :      }
      87             :   */
      88             :   int is_committable;
      89             :   int is_fees_only;
      90             :   int is_noop;
      91             :   int txn_err;
      92             :   int is_simple_vote;
      93             : 
      94             :   /* LONG_MAX if stage was not reached */
      95             :   long tick_load_start;
      96             :   long tick_check_start;
      97             :   long tick_exec_start;
      98             :   long tick_commit_start;
      99             :   long tick_commit_end;
     100             : 
     101             :   uint  compute_units_consumed; /* possibly zero if is_committable is zero */
     102             :   ulong transaction_fee;
     103             :   ulong priority_fee;
     104             :   ulong tips;
     105             : 
     106             :   /* used by monitoring tools */
     107             :   ulong  slot;
     108             :   ulong  bank_seq;
     109             :   ushort start_shred_idx;
     110             :   ushort end_shred_idx;
     111             : 
     112             :   /* vote.slot==ULONG_MAX if this was not a vote transaction */
     113             :   struct {
     114             :     ulong       slot;
     115             :     ulong       vote_slots[ 31UL ];
     116             :     uchar       vote_slot_cnt;
     117             :     fd_pubkey_t identity[ 1 ];
     118             :     fd_pubkey_t vote_acct[ 1 ];
     119             :   } vote;
     120             : };
     121             : typedef struct fd_execrp_txn_exec_done_msg fd_execrp_txn_exec_done_msg_t;
     122             : 
     123             : struct fd_execrp_txn_sigverify_done_msg {
     124             :   ulong txn_idx;
     125             :   int   err;
     126             : };
     127             : typedef struct fd_execrp_txn_sigverify_done_msg fd_execrp_txn_sigverify_done_msg_t;
     128             : 
     129             : struct fd_execrp_poh_hash_done_msg {
     130             :   ulong     cnt;
     131             :   fd_hash_t hash[ FD_EXECRP_POH_PARA ];
     132             : };
     133             : typedef struct fd_execrp_poh_hash_done_msg fd_execrp_poh_hash_done_msg_t;
     134             : 
     135             : struct fd_execrp_task_done_msg {
     136             :   ulong bank_idx;
     137             :   union {
     138             :     fd_execrp_txn_exec_done_msg_t      txn_exec[ 1 ];
     139             :     fd_execrp_txn_sigverify_done_msg_t txn_sigverify[ 1 ];
     140             :     fd_execrp_poh_hash_done_msg_t      poh_hash[ 1 ];
     141             :   };
     142             : };
     143             : typedef struct fd_execrp_task_done_msg fd_execrp_task_done_msg_t;
     144             : 
     145             : #endif /* HEADER_fd_src_discof_replay_fd_execrp_h */

Generated by: LCOV version 1.14