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 : FD_PROTOTYPES_BEGIN 15 : 16 : /* fd_sysvar_rent_init copies the cached rent sysvar stored from the 17 : bank to the corresponding account in the database. Note that it does 18 : NOT initialize global->bank.rent */ 19 : 20 : void 21 : fd_sysvar_rent_init( fd_bank_t * bank, 22 : fd_accdb_t * accdb, 23 : fd_capture_ctx_t * capture_ctx ); 24 : 25 : /* fd_sysvar_rent_write writes the current value of the rent sysvar to 26 : the accounts database. */ 27 : 28 : void 29 : fd_sysvar_rent_write( fd_bank_t * bank, 30 : fd_accdb_t * accdb, 31 : fd_capture_ctx_t * capture_ctx, 32 : fd_rent_t const * rent ); 33 : 34 : /* fd_rent_exempt_minimum_balance returns the minimum balance needed for 35 : an account with the given data_len to be rent exempt. rent points to 36 : the current rent parameters. */ 37 : 38 : ulong 39 : fd_rent_exempt_minimum_balance( fd_rent_t const * rent, 40 : ulong data_len ); 41 : 42 : /* fd_sysvar_rent_read reads the current value of the rent sysvar from 43 : the accounts database into rent. Returns rent on success, or NULL on 44 : failure (the account does not exist or has an unexpected size). */ 45 : 46 : fd_rent_t const * 47 : fd_sysvar_rent_read( fd_accdb_t * accdb, 48 : fd_accdb_fork_id_t fork_id, 49 : fd_rent_t * rent ); 50 : 51 : FD_PROTOTYPES_END 52 : 53 : #endif /* HEADER_fd_src_flamenco_runtime_sysvar_fd_sysvar_rent_h */ 54 :