LCOV - code coverage report
Current view: top level - flamenco/runtime/sysvar - fd_sysvar_rent.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 0 3 0.0 %
Date: 2026-09-17 04:28:31 Functions: 0 0 -

          Line data    Source code
       1             : #ifndef HEADER_fd_src_flamenco_runtime_sysvar_fd_sysvar_rent_h
       2             : #define HEADER_fd_src_flamenco_runtime_sysvar_fd_sysvar_rent_h
       3             : 
       4             : #include "../fd_bank.h"
       5             : 
       6             : /* SIMD-0194: deprecate_rent_exemption_threshold
       7             :    https://github.com/anza-xyz/agave/blob/v3.1.4/runtime/src/bank.rs#L5322-L5329 */
       8           0 : #define FD_SIMD_0194_NEW_RENT_EXEMPTION_THRESHOLD (1.0)
       9             : 
      10             : /* SIMD-0194: deprecate_rent_exemption_threshold
      11             :    https://github.com/anza-xyz/agave/blob/v4.1.0-beta.1/runtime/src/rent_collector.rs#L50-L57 */
      12           0 : #define FD_SIMD_0194_NEW_BURN_PERCENT (50)
      13             : 
      14             : /* alpenclock and genesis certificate account rent is pinned to the
      15             :    default rent values here:
      16             :    https://github.com/anza-xyz/solana-sdk/blob/rent%40v4.3.0/rent/src/lib.rs#L87-L95 */
      17           0 : #define FD_RENT_DEFAULT_PARAMS ((fd_rent_t){ .lamports_per_uint8_year=6960UL, .exemption_threshold=1.0, .burn_percent=(uchar)50 })
      18             : 
      19             : FD_PROTOTYPES_BEGIN
      20             : 
      21             : /* fd_sysvar_rent_init copies the cached rent sysvar stored from the
      22             :    bank to the corresponding account in the database.  Note that it does
      23             :    NOT initialize global->bank.rent */
      24             : 
      25             : void
      26             : fd_sysvar_rent_init( fd_bank_t *        bank,
      27             :                      fd_accdb_t *       accdb,
      28             :                      fd_capture_ctx_t * capture_ctx );
      29             : 
      30             : /* fd_sysvar_rent_write writes the current value of the rent sysvar to
      31             :    the accounts database. */
      32             : 
      33             : void
      34             : fd_sysvar_rent_write( fd_bank_t *        bank,
      35             :                       fd_accdb_t *       accdb,
      36             :                       fd_capture_ctx_t * capture_ctx,
      37             :                       fd_rent_t const *  rent );
      38             : 
      39             : /* fd_rent_exempt_minimum_balance returns the minimum balance needed for
      40             :    an account with the given data_len to be rent exempt.  rent points to
      41             :    the current rent parameters. */
      42             : 
      43             : ulong
      44             : fd_rent_exempt_minimum_balance( fd_rent_t const * rent,
      45             :                                 ulong             data_len );
      46             : 
      47             : /* fd_sysvar_rent_read reads the current value of the rent sysvar from
      48             :    the accounts database into rent.  Returns rent on success, or NULL on
      49             :    failure (the account does not exist or has an unexpected size). */
      50             : 
      51             : fd_rent_t const *
      52             : fd_sysvar_rent_read( fd_accdb_t *       accdb,
      53             :                      fd_accdb_fork_id_t fork_id,
      54             :                      fd_rent_t *        rent );
      55             : 
      56             : FD_PROTOTYPES_END
      57             : 
      58             : #endif /* HEADER_fd_src_flamenco_runtime_sysvar_fd_sysvar_rent_h */
      59             : 

Generated by: LCOV version 1.14