LCOV - code coverage report
Current view: top level - flamenco/runtime - fd_runtime_const.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 4 6 66.7 %
Date: 2025-09-19 04:41:14 Functions: 0 0 -

          Line data    Source code
       1             : #ifndef HEADER_fd_src_flamenco_runtime_fd_runtime_const_h
       2             : #define HEADER_fd_src_flamenco_runtime_fd_runtime_const_h
       3             : 
       4             : #include "../types/fd_types.h"
       5             : #include "../leaders/fd_leaders.h"
       6             : 
       7             : FD_PROTOTYPES_BEGIN
       8             : 
       9             : /* All of the variable bounds in the bank should be deteremined by the
      10             :    max number of vote accounts and stake accounts that the system
      11             :    supports. These are not protocol-level bounds, but rather bounds
      12             :    that are used to determine the max amount of memory that various
      13             :    data structures require. */
      14             : 
      15           0 : #define FD_RUNTIME_MAX_VOTE_ACCOUNTS  (40200UL)   /* ~40k vote accounts */
      16             : 
      17       26454 : #define FD_RUNTIME_MAX_STAKE_ACCOUNTS (3000000UL) /* 3M stake accounts */
      18             : 
      19             : #define FD_RUNTIME_SLOTS_PER_EPOCH    (432000UL)  /* 432k slots per epoch */
      20             : 
      21             : /* Maximum amount of writable accounts per transaction */
      22             : 
      23          81 : #define FD_RUNTIME_MAX_WRITABLE_ACCOUNTS_PER_TRANSACTION (64UL)
      24             : 
      25             : /* The initial block id hash is a dummy value for the initial block id
      26             :    as one is not provided in snapshots.  This does not have an
      27             :    equivalent in Agave.
      28             : 
      29             :    TODO: This should be removed in favor of repairing the last shred of
      30             :    the snapshot slot to get the actual block id of the snapshot slot. */
      31             : 
      32           0 : #define FD_RUNTIME_INITIAL_BLOCK_ID (0xF17EDA2CE7B1DUL)
      33             : 
      34             : /* The stake program is now a BPF program which means that there is a
      35             :    variable cost in CUs to execute the stake program.  This is the
      36             :    absolute minimum cost of executing the stake program.
      37             : 
      38             :    FIXME: This is a reasonable estimate based off of BPF withdraw
      39             :    instructions.  The hard bound still needs to be determined. */
      40             : 
      41          15 : #define FD_RUNTIME_MIN_STAKE_INSN_CUS (6000UL)
      42             : 
      43             : /* FD_RUNTIME_ACC_SZ_MAX is the protocol level hardcoded size limit of a
      44             :    Solana account. */
      45             : 
      46          24 : #define FD_RUNTIME_ACC_SZ_MAX (10UL<<20) /* 10MiB */
      47             : 
      48             : FD_PROTOTYPES_END
      49             : 
      50             : #endif /* HEADER_fd_src_flamenco_runtime_fd_runtime_const_h */

Generated by: LCOV version 1.14