@@ -556,6 +556,28 @@ fd_features_activate( fd_bank_t * bank,
556556 }
557557}
558558
559+ /* SIMD-0194: deprecate_rent_exemption_threshold
560+ https://github.com/anza-xyz/agave/blob/v3.1.4/runtime/src/bank.rs#L5322-L5329 */
561+ static void
562+ deprecate_rent_exemption_threshold ( fd_bank_t * bank ,
563+ fd_accdb_user_t * accdb ,
564+ fd_funk_txn_xid_t const * xid ,
565+ fd_capture_ctx_t * capture_ctx ,
566+ fd_funk_t * funk ) {
567+ fd_rent_t rent [1 ] = {0 };
568+ if ( FD_UNLIKELY ( !fd_sysvar_rent_read ( funk , xid , rent ) ) ) {
569+ FD_LOG_CRIT (( "fd_sysvar_rent_read failed" ));
570+ }
571+ rent -> lamports_per_uint8_year = FD_SIMD_0194_NEW_LAMPORTS_PER_UINT8_YEAR ;
572+ rent -> exemption_threshold = FD_SIMD_0194_NEW_RENT_EXEMPTION_THRESHOLD ;
573+
574+ /* We don't refresh the sysvar cache here. The cache is refreshed in
575+ fd_sysvar_cache_restore, which is called at the start of every block
576+ in fd_runtime_block_execute_prepare, after this function. */
577+ fd_sysvar_rent_write ( bank , accdb , xid , capture_ctx , rent );
578+ fd_bank_rent_set ( bank , * rent );
579+ }
580+
559581/* Starting a new epoch.
560582 New epoch: T
561583 Just ended epoch: T-1
@@ -600,6 +622,10 @@ fd_runtime_process_new_epoch( fd_banks_t * banks,
600622 fd_features_activate ( bank , accdb , xid , capture_ctx );
601623 fd_features_restore ( bank , funk , xid );
602624
625+ if ( FD_UNLIKELY ( FD_FEATURE_JUST_ACTIVATED_BANK ( bank , deprecate_rent_exemption_threshold ) ) ) {
626+ deprecate_rent_exemption_threshold ( bank , accdb , xid , capture_ctx , funk );
627+ }
628+
603629 /* Apply builtin program feature transitions
604630 https://github.com/anza-xyz/agave/blob/v2.1.0/runtime/src/bank.rs#L6621-L6624 */
605631
0 commit comments