LCOV - code coverage report
Current view: top level - disco - fd_txn_p.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 1 1 100.0 %
Date: 2026-03-19 18:19:27 Functions: 0 0 -

          Line data    Source code
       1             : #ifndef HEADER_fd_src_disco_fd_txn_p_h
       2             : #define HEADER_fd_src_disco_fd_txn_p_h
       3             : 
       4             : #include "../ballet/txn/fd_txn.h"
       5             : 
       6             : struct __attribute__((aligned(64))) fd_txn_p {
       7             :   uchar payload[FD_TPU_MTU];
       8             :   ulong payload_sz;
       9             :   union {
      10             :    struct {
      11             :      uint non_execution_cus;
      12             :      uint requested_exec_plus_acct_data_cus;
      13             :    } pack_cu; /* Populated by pack. Execle reads these to populate the other struct of the union. */
      14             :    struct {
      15             :      uint rebated_cus; /* requested_exec_plus_acct_data_cus-actual used CUs. Pack reads this for CU rebating. */
      16             :      uint actual_consumed_cus; /* non_execution_cus+real execution CUs+real account data cus. PoH reads this for block CU counting. */
      17             :    } execle_cu; /* Populated by execle. */
      18             :    ulong blockhash_slot; /* Slot provided by resolv tile when txn arrives at the pack tile. Used when txn is in extra storage in pack. */
      19             :   };
      20             :   /* The time that the transaction arrived to the pack tile in ticks. Set by pack and intended to be read from a transaction on a pack->execle link. */
      21             :   long scheduler_arrival_time_nanos;
      22             : 
      23             :   union {
      24             :     struct {
      25             :       /* set by replay scheduler for use by monitoring tools */
      26             :       ushort start_shred_idx; /* the shred index of the shred containing the first byte of this transaction */
      27             :       ushort end_shred_idx; /* the shred index of the shred containing the byte after the last byte of this transaction, capped at the maximum shred index for this block */
      28             :     };
      29             :     /* pack populates pack_alloc based on an estimate of how many bytes
      30             :        of account data the transaction may allocate.  There should be a
      31             :        field called rebate_alloc, similar to the CU variables, but
      32             :        actually the rebated alloc bytes don't really depend on
      33             :        execution. */
      34             :     uint pack_alloc;
      35             :   };
      36             : 
      37             :   /* Source ipv4 address and tpu pipeline for this transaction. TPU is one of FD_TXN_M_TPU_SOURCE_* */
      38             :   uchar source_tpu;
      39             :   uint  source_ipv4;
      40             : 
      41             :   /* Populated by pack, execle.  A combination of the bitfields
      42             :      FD_TXN_P_FLAGS_* defined above.  The execle sets the high byte with
      43             :      the transaction result code. */
      44             :   uint  flags;
      45             :   /* union {
      46             :     This would be ideal but doesn't work because of the flexible array member
      47             :     uchar _[FD_TXN_MAX_SZ];
      48             :     fd_txn_t txn;
      49             :   }; */
      50             :   /* Access with TXN macro below */
      51             :   uchar _[FD_TXN_MAX_SZ] __attribute__((aligned(alignof(fd_txn_t))));
      52             : };
      53             : 
      54             : typedef struct fd_txn_p fd_txn_p_t;
      55             : 
      56      245591 : #define TXN(txn_p) ((fd_txn_t *)( (txn_p)->_ ))
      57             : 
      58             : /* fd_txn_e_t: An fd_txn_p_t with expanded address lookup tables */
      59             : struct __attribute__((aligned(64))) fd_txn_e {
      60             :    fd_txn_p_t     txnp[1];
      61             :    fd_acct_addr_t alt_accts[FD_TXN_ACCT_ADDR_MAX]; /* The used account is in the fd_txn_t*/
      62             : };
      63             : 
      64             : typedef struct fd_txn_e fd_txn_e_t;
      65             : 
      66             : #endif /* HEADER_fd_src_disco_fd_txn_p_h */

Generated by: LCOV version 1.14