LCOV - code coverage report
Current view: top level - flamenco/runtime - fd_txncache_shmem.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 3 3 100.0 %
Date: 2026-08-29 04:30:01 Functions: 0 0 -

          Line data    Source code
       1             : #ifndef HEADER_fd_src_flamenco_runtime_fd_txncache_shmem_h
       2             : #define HEADER_fd_src_flamenco_runtime_fd_txncache_shmem_h
       3             : 
       4             : #include "../../util/fd_util_base.h"
       5             : 
       6         249 : #define FD_TXNCACHE_SHMEM_ALIGN (128UL)
       7             : 
       8          63 : #define FD_TXNCACHE_SHMEM_MAGIC (0xF17EDA2CE58CC4E1UL) /* FIREDANCE SMCCHE V1 */
       9             : 
      10             : /* FD_TXNCACHE_MAX_SLOT_DELTAS is the practical bound on the maximum
      11             :    number of slot deltas that can be stored into the txncache.  This
      12             :    bound is derived from the recent blockhashes sysvar. */
      13             : 
      14        3552 : #define FD_TXNCACHE_MAX_SLOT_DELTAS (151UL)
      15             : 
      16             : typedef struct { ushort val; } fd_txncache_fork_id_t;
      17             : 
      18             : struct fd_txncache_shmem_private;
      19             : typedef struct fd_txncache_shmem_private fd_txncache_shmem_t;
      20             : 
      21             : FD_PROTOTYPES_BEGIN
      22             : 
      23             : FD_FN_CONST ulong
      24             : fd_txncache_shmem_align( void );
      25             : 
      26             : /* larger_max_cost_per_block indicates the validator is running with
      27             :    development.bench.larger_max_cost_per_block, which raises the block
      28             :    cost limit and invalidates the tightened txnpage pool bound (which
      29             :    assumes at most FD_MAX_TXN_PER_SLOT committable transactions per
      30             :    slot).  When set, the pool is sized for every active slot
      31             :    simultaneously full at max_txn_per_slot instead. */
      32             : 
      33             : FD_FN_CONST ulong
      34             : fd_txncache_shmem_footprint( ulong max_live_slots,
      35             :                              ulong max_txn_per_slot,
      36             :                              int   larger_max_cost_per_block );
      37             : 
      38             : void *
      39             : fd_txncache_shmem_new( void * shmem,
      40             :                        ulong  max_live_slots,
      41             :                        ulong  max_txn_per_slot,
      42             :                        int    larger_max_cost_per_block,
      43             :                        ulong  seed );
      44             : 
      45             : fd_txncache_shmem_t *
      46             : fd_txncache_shmem_join( void * shtc );
      47             : 
      48             : FD_PROTOTYPES_END
      49             : 
      50             : #endif /* HEADER_fd_src_flamenco_runtime_fd_txncache_shmem_h */

Generated by: LCOV version 1.14