LCOV - code coverage report
Current view: top level - discof/replay - fd_execrp.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 0 3 0.0 %
Date: 2026-05-15 07:18:56 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             : 
       7             : /* Exec tile task types. */
       8           0 : #define FD_EXECRP_TT_TXN_EXEC      (1UL) /* Transaction execution. */
       9           0 : #define FD_EXECRP_TT_TXN_SIGVERIFY (2UL) /* Transaction sigverify. */
      10           0 : #define FD_EXECRP_TT_POH_HASH      (3UL) /* PoH hashing. */
      11             : 
      12             : /* Sent from the replay tile to the exec tiles.  These describe one of
      13             :    several types of tasks for an exec tile.  An idx to the bank in the
      14             :    bank pool must be sent over because the key of the bank will change
      15             :    as FEC sets are processed. */
      16             : 
      17             : struct fd_execrp_txn_exec_msg {
      18             :   ulong      bank_idx;
      19             :   ulong      txn_idx;
      20             :   fd_txn_p_t txn[ 1 ];
      21             : 
      22             :   /* Used currently by solcap to maintain ordering of messages
      23             :      this will change to using txn sigs eventually */
      24             :   ulong      capture_txn_idx;
      25             : };
      26             : typedef struct fd_execrp_txn_exec_msg fd_execrp_txn_exec_msg_t;
      27             : 
      28             : struct fd_execrp_txn_sigverify_msg {
      29             :   ulong      bank_idx;
      30             :   ulong      txn_idx;
      31             :   fd_txn_p_t txn[ 1 ];
      32             : };
      33             : typedef struct fd_execrp_txn_sigverify_msg fd_execrp_txn_sigverify_msg_t;
      34             : 
      35             : struct fd_execrp_poh_hash_msg {
      36             :   ulong     bank_idx;
      37             :   ulong     mblk_idx;
      38             :   ulong     hashcnt;
      39             :   fd_hash_t hash[ 1 ];
      40             : };
      41             : typedef struct fd_execrp_poh_hash_msg fd_execrp_poh_hash_msg_t;
      42             : 
      43             : union fd_execrp_task_msg {
      44             :   fd_execrp_txn_exec_msg_t      txn_exec;
      45             :   fd_execrp_txn_sigverify_msg_t txn_sigverify;
      46             :   fd_execrp_poh_hash_msg_t      poh_hash;
      47             : };
      48             : 
      49             : typedef union fd_execrp_task_msg fd_execrp_task_msg_t;
      50             : 
      51             : /* Sent from exec tiles to the replay tile, notifying the replay tile
      52             :    that a task has been completed.  That is, if the task has any
      53             :    observable side effects, such as updates to accounts, then those side
      54             :    effects are fully visible on any other exec tile. */
      55             : 
      56             : struct fd_execrp_txn_exec_done_msg {
      57             :   ulong txn_idx;
      58             : 
      59             :   /* These flags form a nested series of if statements.
      60             :      if( is_committable ) {
      61             :        if( is_fees_only ) {
      62             :          instructions will not be executed
      63             :          txn_err will be non-zero and will be one of the account loader errors
      64             :        } else {
      65             :          instructions will execute
      66             :          if( txn_err is non-zero ) {
      67             :            there's likely an instruction error
      68             :          } else {
      69             :            transaction executed successfully
      70             :            https://github.com/anza-xyz/agave/blob/v3.1.8/svm/src/transaction_execution_result.rs#L26
      71             :          }
      72             :        }
      73             :      } else {
      74             :        either failed before account loading, or failed cost tracker
      75             :      }
      76             :   */
      77             :   int is_committable;
      78             :   int is_fees_only;
      79             :   int txn_err;
      80             : 
      81             :   /* used by monitoring tools */
      82             :   ulong  slot;
      83             :   ushort start_shred_idx;
      84             :   ushort end_shred_idx;
      85             : 
      86             :   /* vote.slot==ULONG_MAX if this was not a vote transaction */
      87             :   struct {
      88             :     ulong slot;
      89             :     fd_pubkey_t identity[ 1 ];
      90             :     fd_pubkey_t vote_acct[ 1 ];
      91             :   } vote;
      92             : };
      93             : typedef struct fd_execrp_txn_exec_done_msg fd_execrp_txn_exec_done_msg_t;
      94             : 
      95             : struct fd_execrp_txn_sigverify_done_msg {
      96             :   ulong txn_idx;
      97             :   int   err;
      98             : };
      99             : typedef struct fd_execrp_txn_sigverify_done_msg fd_execrp_txn_sigverify_done_msg_t;
     100             : 
     101             : struct fd_execrp_poh_hash_done_msg {
     102             :   ulong     mblk_idx;
     103             :   ulong     hashcnt;
     104             :   fd_hash_t hash[ 1 ];
     105             : };
     106             : typedef struct fd_execrp_poh_hash_done_msg fd_execrp_poh_hash_done_msg_t;
     107             : 
     108             : struct fd_execrp_task_done_msg {
     109             :   ulong bank_idx;
     110             :   union {
     111             :     fd_execrp_txn_exec_done_msg_t      txn_exec[ 1 ];
     112             :     fd_execrp_txn_sigverify_done_msg_t txn_sigverify[ 1 ];
     113             :     fd_execrp_poh_hash_done_msg_t      poh_hash[ 1 ];
     114             :   };
     115             : };
     116             : typedef struct fd_execrp_task_done_msg fd_execrp_task_done_msg_t;
     117             : 
     118             : #endif /* HEADER_fd_src_discof_replay_fd_execrp_h */

Generated by: LCOV version 1.14