LCOV - code coverage report
Current view: top level - flamenco/runtime - fd_txncache_shmem.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 0 3 0.0 %
Date: 2026-11-11 12:40:43 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           0 : #define FD_TXNCACHE_SHMEM_ALIGN (4096UL)
       7             : 
       8           0 : #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           0 : #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             : /* The txnpage pool is sized for the worst case set of simultaneously
      27             :    live transactions: a full snapshot load (151 slot deltas at
      28             :    max_txn_per_slot entries, which counts each transaction twice) plus
      29             :    every other active fork full at max_txn_per_slot/2.  Callers pass
      30             :    2*config->limits.max_txn_per_slot, so a raised [development.bench]
      31             :    block cost limit sizes the pool up through that value.
      32             : 
      33             :    cache_footprint is the in-memory transaction page budget in bytes
      34             :    (ULONG_MAX for a fully in-memory cache).  Pages that do not fit spill
      35             :    to disk.
      36             : 
      37             :    footprint and new return 0 / NULL for zero max_live_slots,
      38             :    max_txn_per_slot, or cache_footprint, and log an error and exit if the
      39             :    parameters need more pages than can be addressed. */
      40             : 
      41             : ulong
      42             : fd_txncache_shmem_footprint( ulong max_live_slots,
      43             :                              ulong max_txn_per_slot,
      44             :                              ulong cache_footprint );
      45             : 
      46             : void *
      47             : fd_txncache_shmem_new( void * shmem,
      48             :                        ulong  max_live_slots,
      49             :                        ulong  max_txn_per_slot,
      50             :                        ulong  cache_footprint,
      51             :                        ulong  seed );
      52             : 
      53             : fd_txncache_shmem_t *
      54             : fd_txncache_shmem_join( void * shtc );
      55             : 
      56             : FD_PROTOTYPES_END
      57             : 
      58             : #endif /* HEADER_fd_src_flamenco_runtime_fd_txncache_shmem_h */

Generated by: LCOV version 1.14