@@ -560,6 +560,28 @@ fd_features_activate( fd_bank_t * bank,
560560 }
561561}
562562
563+ /* SIMD-0194: deprecate_rent_exemption_threshold
564+ https://github.com/anza-xyz/agave/blob/v3.1.4/runtime/src/bank.rs#L5322-L5329 */
565+ static void
566+ deprecate_rent_exemption_threshold ( fd_bank_t * bank ,
567+ fd_accdb_user_t * accdb ,
568+ fd_funk_txn_xid_t const * xid ,
569+ fd_capture_ctx_t * capture_ctx ,
570+ fd_funk_t * funk ) {
571+ fd_rent_t rent [1 ] = {0 };
572+ if ( FD_UNLIKELY ( !fd_sysvar_rent_read ( funk , xid , rent ) ) ) {
573+ FD_LOG_CRIT (( "fd_sysvar_rent_read failed" ));
574+ }
575+ rent -> lamports_per_uint8_year = FD_SIMD_0194_NEW_LAMPORTS_PER_UINT8_YEAR ;
576+ rent -> exemption_threshold = FD_SIMD_0194_NEW_RENT_EXEMPTION_THRESHOLD ;
577+
578+ /* We don't refresh the sysvar cache here. The cache is refreshed in
579+ fd_sysvar_cache_restore, which is called at the start of every block
580+ in fd_runtime_block_execute_prepare, after this function. */
581+ fd_sysvar_rent_write ( bank , accdb , xid , capture_ctx , rent );
582+ fd_bank_rent_set ( bank , * rent );
583+ }
584+
563585/* Starting a new epoch.
564586 New epoch: T
565587 Just ended epoch: T-1
@@ -604,6 +626,10 @@ fd_runtime_process_new_epoch( fd_banks_t * banks,
604626 fd_features_activate ( bank , accdb , xid , capture_ctx );
605627 fd_features_restore ( bank , funk , xid );
606628
629+ if ( FD_UNLIKELY ( FD_FEATURE_JUST_ACTIVATED_BANK ( bank , deprecate_rent_exemption_threshold ) ) ) {
630+ deprecate_rent_exemption_threshold ( bank , accdb , xid , capture_ctx , funk );
631+ }
632+
607633 /* Apply builtin program feature transitions
608634 https://github.com/anza-xyz/agave/blob/v2.1.0/runtime/src/bank.rs#L6621-L6624 */
609635
0 commit comments