Commit Graph

71 Commits

Author SHA1 Message Date
Brooks d611cc2e75
Fixes format string (#29533) 2023-01-05 13:06:00 -05:00
Jeff Washington (jwash) a31927419b
test_rent_exempt_temporal_escape works in passes (#29460) 2023-01-02 14:32:09 -08:00
Jeff Washington (jwash) 67c7e343a2
test permutations of set_exempt_rent_epoch_max (#29461) 2023-01-02 11:59:50 -08:00
Jeff Washington (jwash) cf1aa4beea
feature: set rent_epoch to Epoch::MAX (#28690)
* check android builds

* feature: set rent_epoch to Epoch::MAX

* tweaks

* Update runtime/src/rent_collector.rs

Co-authored-by: Brooks Prumo <brooks@prumo.org>

* simplify changes to tests

* back out some test changes

* calculate_rent_result passes through Exempt

* move calc outside loop

* if rent epoch is already max, use 'NoRentCollectionNow'

Co-authored-by: Brooks Prumo <brooks@prumo.org>
2023-01-02 07:51:08 -08:00
Jeff Washington (jwash) 3eca364190
remove metrics from prior to rent_epoch feature activation (#29322) 2022-12-19 08:18:02 -08:00
Jeff Washington (jwash) 3d268be800
change RentResult enum values (#29139)
* test_shrink_candidate_slots uses write cache (#29145)

* add tests for collect_from_existing_account
2022-12-08 19:48:42 -08:00
Jeff Washington (jwash) 9ff9051d87
move test function to test mod (#28704) 2022-11-01 11:18:02 -07:00
behzad nouri 17680fe837
removes feature gate code preserving rent_epoch for rent exempt accounts (#28507)
* removes feature gate code preserving rent_epoch for rent exempt accounts

* update test expected hashes

Co-authored-by: jeff washington <jeff.washington@solana.com>
2022-11-01 13:36:59 +00:00
Jeff Washington (jwash) 1ba81acf9a
remove public from rent code (#28687) 2022-10-31 13:37:36 -07:00
behzad nouri c99d9f00a9
preserves rent_epoch for rent exempt accounts (#26479)
https://github.com/solana-labs/solana/pull/22292
prevents rent paying account creation going forward. As a result
rent_epoch field for rent exempt accounts is redundant, and advancing
this field will incur expensive account rewrites and cause discrepancy
between accounts-db and cached vote/stake accounts.

This commit adds a feature which upon activation preserves rent_epoch
field for rent exempt accounts so that the field is frozen and is no
longer advanced.
2022-07-08 20:04:08 +00:00
behzad nouri d7201a8d1a
names fields in RentResullt::CollectRent enum variant (#26449)
Avoiding ambiguous raw tuple:
    CollectRent((Epoch, u64))

Using named fields instead:
    CollectRent {
        new_rent_epoch: Epoch,
        rent_due: u64,
    },
2022-07-06 20:01:16 +00:00
Jeff Washington (jwash) b7e34aea15
refactor calculate_rent_result (#26416)
reactor calculate_rent_result
2022-07-05 16:45:59 -05:00
Jeff Washington (jwash) 7f608965ef
new counter data point for unexpected rent_epoch (#23449) 2022-03-03 09:09:31 -06:00
Jeff Washington (jwash) c8cb940b4e
tweak 2 rent tests to narrow epoch ranges (#23420) 2022-03-02 08:22:33 -06:00
Jeff Washington (jwash) 611d745241
refactor rent_due for normal case of exempt (#23350) 2022-02-28 09:42:42 -06:00
Jeff Washington (jwash) 47e4291303
add Debug to RentResult (#23044) 2022-02-09 18:07:36 -06:00
Jeff Washington (jwash) 205cd4609b
bank::get_rent_collector_from_parent (#23016) 2022-02-09 12:31:58 -06:00
Jeff Washington (jwash) f334931903
rent: refactor test function (#23014) 2022-02-08 22:11:47 -06:00
Jeff Washington (jwash) 89c42ebcbe
refactor rent collection (#22803) 2022-01-27 18:48:04 -06:00
Justin Starry cddab635ff
Cleanup activated rent_for_sysvars feature (#22454) 2022-01-14 20:34:09 +08:00
Brooks Prumo c45dde6164
Handle accounts data size changes due to rent-collected accounts (#22412) 2022-01-11 17:20:28 -06:00
Brooks Prumo d90d5ee9b6
Refactor Rent::due() with RentDue enum (#22346) 2022-01-08 09:03:46 -06:00
Michael Vines b8837c04ec Reformat imports to a consistent style for imports
rustfmt.toml configuration:
  imports_granularity = "One"
  group_imports = "One"
2021-12-03 09:19:13 -08:00
Jeff Washington (jwash) 171243a370
add rent exempt count to get_total_accounts_stats (#21153) 2021-11-04 11:17:19 -05:00
Jeff Washington (jwash) b1e3a82c11
refactor rent collector and logs (#21155) 2021-11-04 06:28:41 -05:00
Jeff Washington (jwash) c59c56c0f8
log rent exempt accounts (#21137) 2021-11-03 14:44:52 -05:00
Jeff Washington (jwash) a8e000a2a6
add filler accounts to bloat validator and predict failure (#20491)
* add filler accounts to bloat validator and predict failure

* assert no accounts match filler

* cleanup magic numbers

* panic if can't load from snapshot with filler accounts specified

* some renames

* renames

* into_par_iter

* clean filler accts, too
2021-10-11 12:46:27 -05:00
Jeff Washington (jwash) 1cf7ae51f8
add comment (#19705) 2021-09-08 19:25:20 -05:00
Ryo Onodera 3a7e5e65e4 Fix rebase... 2021-07-09 09:08:38 -07:00
Ryo Onodera f029af0fca Remove sysvar special cases for rent and assign 2021-07-09 09:08:38 -07:00
Ryo Onodera bcbe155575
Minor test cleanup and comments (#17283) 2021-05-18 07:22:43 +09:00
Jeff Washington (jwash) 541aa5ad85
tests: lamports -> lamports() (#16982) 2021-05-03 10:45:54 -05:00
Jeff Washington (jwash) 0af84bb91e
lamports= -> .set_lamports() (#16978) 2021-04-30 18:20:54 +00:00
Jeff Washington (jwash) 63c56b57a9
checked_sub_lamports with unwrap (#16922)
* checked_sub_lamports with unwrap

* avoid unwrap
2021-04-29 15:04:28 -05:00
Jeff Washington (jwash) ca7b36ad8f
lamports -> lamports() (#16920) 2021-04-29 10:44:46 -05:00
Jeff Washington (jwash) da3342759b
private AccountSharedData.rent_epoch (#16877) 2021-04-28 08:52:20 -05:00
Jeff Washington (jwash) 1bd623cd15
private AccountSharedData.rent_epoch (#16844) 2021-04-27 13:51:13 -05:00
Jeff Washington (jwash) 998cba74b5
AccountSharedData.executable() (#16835) 2021-04-27 09:12:17 -05:00
Jeff Washington (jwash) f2ab0384e4
owner -> owner() (#16783) 2021-04-26 17:06:40 +00:00
Jeff Washington (jwash) fc12841d95
Readonlyaccounts (#16743)
* lamports -> lamports()

* format
2021-04-22 20:04:55 +00:00
Jeff Washington (jwash) 952c3bcbb7
AccountSharedData construction (#15790) 2021-03-11 18:09:04 -06:00
Jeff Washington (jwash) 52e54e1100
account.data -> data() (#15778) 2021-03-09 22:31:33 +00:00
Jeff Washington (jwash) 8a3135d17b
Account->AccountSharedData (#15691) 2021-03-09 15:06:07 -06:00
Ryo Onodera 8b0c6db871
Remove old feature: cumulative_rent_related_fixes (#15754) 2021-03-08 09:58:50 +09:00
Greg Fitzgerald edd159e7d7
Fix typos (#15721) 2021-03-05 07:16:53 +00:00
Michael Vines 7143aaa89b Clippy 2020-12-14 08:03:29 -08:00
Michael Vines 959880db60 Remove unused pubkey::Pubkey imports 2020-10-21 19:08:13 -07:00
Michael Vines 7bc073defe Run `codemod --extensions rs Pubkey::new_rand solana_sdk::pubkey::new_rand` 2020-10-21 19:08:13 -07:00
Ryo Onodera 608b81b412
Port various rent fixes to runtime feature (#12842)
* Port various rent fixes to runtime feature

* Fix CI

* Use more consistent naming...
2020-10-21 22:19:25 +09:00
Ryo Onodera 241e6f1ecf
Enable stricter check on rent-exempt accounts on testnet (#12224) 2020-09-15 06:48:48 +00:00