HaoranYi
2e9aeff8dd
Enable partitioned epoch reward by feature id ( #32174 )
...
enable partitioned epoch reward feature by feature id
update stake rewards tests with partitioned epoch rewards feature enable
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-20 12:12:50 -05:00
Yueh-Hsuan Chiang
c56d0bc6a6
[TieredStorage] Make AccountMetaFlags::new_from pub ( #32194 )
...
#### Summary of Changes
The newly introduced AccountMetaFlags::new_from must be pub
in order to make the tiered storage writer able to use it.
2023-06-21 00:00:59 +08:00
galactus
2ceabd9368
Simd 47 syscall sysvar last restart slot ( #31957 )
...
* add sysvar and logic for last restart slot
* cleanup
* add test for getting last restart slot from account
* format code
* add some basic rustdoc
* copy+paste error
* feature flag for last_restart_slot
* add to sysvars.md
* updated wording in sysvars.md
* rename sol_get_last_restart_slot_sysvar > sol_get_last_restart_slot
* create sbf C header for sol_get_last_restart_slot
* cleanup imports
* reverted hardened_unpack workaround
* cleanup imports
* cleanup logs + blank lines
* Implementing ui changes for last restart slot, nit
* Some more nit change and implementing the UI for sysvar
* fixing the CI
* Minor clippy fix
* format changes
* changes suggested by mvines and lichtso
* increase timeout in local_cluster test
* fix code format
* use keypair for feature flag from mvines
* delete test.json file
* Revert "increase timeout in local_cluster test"
This reverts commit a67465ae22
.
* last restart slot should be always less than or equal to current slot
* fixing bug
* changes after steviez comments
* format issue fixed
* fixing the comment on premature application of future hardfork
* nit change in test
Co-authored-by: steviez <steven@solana.com>
* reverting sysvar_cache.rs because change was not necessary
---------
Co-authored-by: steve-gg <grooviegermanikus@gmail.com>
Co-authored-by: steviez <steven@solana.com>
2023-06-16 20:14:02 +00:00
Jeff Washington (jwash)
174ceba82b
rename to stake_rewards_by_partition for clarity ( #32165 )
2023-06-16 19:28:53 +00:00
HaoranYi
39d9f8974d
Revert "add test for is_partitioned_rewards_feature_enabled ( #32158 )" ( #32176 )
...
This reverts commit d06b099ecb
.
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-16 11:56:05 -05:00
HaoranYi
d06b099ecb
add test for is_partitioned_rewards_feature_enabled ( #32158 )
...
* add set_partitioned_rewards_enabled_for_test fn
* reveiws
---------
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-16 11:07:07 -05:00
HaoranYi
af7b7f1436
Refactor reward block calculation fn ( #32167 )
...
refactor reward block calculation fn
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-16 08:40:23 -05:00
Brooks
47ff3cecc9
Enables creating snapshots after booting from local state ( #32137 )
2023-06-15 22:54:32 -04:00
Jeff Washington (jwash)
b1b7ae5e09
cleanup math in distribute_partitioned_epoch_rewards ( #32164 )
2023-06-15 16:17:38 -07:00
Jeff Washington (jwash)
b4265217e6
update begin_partitioned_rewards to include sysvar ( #32151 )
...
* update begin_partitioned_rewards to include sysvar
* cleanup
2023-06-15 14:00:24 -07:00
Jeff Washington (jwash)
d79b565c72
connect `begin_partitioned_rewards` to bank ( #32152 )
2023-06-15 11:51:10 -07:00
Jeff Washington (jwash)
e7a676dc01
add distribute_partitioned_epoch_rewards ( #32124 )
...
* add distribute_partitioned_epoch_rewards
* reviews
* reanme
---------
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-15 11:32:44 -05:00
Jeff Washington (jwash)
988bff93c8
deactivate_epoch_rewards_status burns sysvar ( #32143 )
...
* deactivate_epoch_reward_status burns sysvar
* warn to info
---------
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-15 10:36:50 -05:00
Jeff Washington (jwash)
00b5c40122
add partitioned rewards sysvar fns ( #32128 )
2023-06-14 16:08:15 -07:00
Jeff Washington (jwash)
60e36afd42
add begin_partitioned_rewards ( #32116 )
...
* add begin_partitioned_rewards
* pr feedback
* Apply suggestions from code review
Co-authored-by: Brooks <brooks@prumo.org>
---------
Co-authored-by: HaoranYi <haoran.yi@gmail.com>
Co-authored-by: Brooks <brooks@prumo.org>
2023-06-14 14:24:49 -07:00
Jeff Washington (jwash)
088ac5ec01
add is_partitioned_rewards_code_enabled ( #32123 )
...
* add partitioned_rewards_code_enabled
* renames
2023-06-14 14:36:53 -05:00
Jeff Washington (jwash)
f487dfbc77
add distribute_epoch_rewards_in_partition ( #32125 )
2023-06-14 11:03:17 -07:00
Jeff Washington (jwash)
a1ce3cbaa3
partitioned rewards fn for tests: force_reward_interval_end_for_tests ( #32127 )
...
partitioned rewards fn for tests
2023-06-14 10:59:48 -07:00
Jeff Washington (jwash)
4eb7db8737
in testing, hash_internal_state ignores epoch_rewards_sysvar ( #32122 )
2023-06-14 10:57:29 -07:00
Jeff Washington (jwash)
9cf10b7aae
optionally compare with partitioned rewards ( #32126 )
2023-06-14 10:55:09 -07:00
Jeff Washington (jwash)
c01250fc58
add calculate_rewards_and_distribute_vote_rewards ( #32109 )
...
* add calculate_rewards_and_distribute_vote_rewards
* warn -> info
2023-06-14 08:38:25 -07:00
Jeff Washington (jwash)
a44b080b7f
add partitioned_rewards_feature_enabled ( #32115 )
2023-06-14 07:47:12 -07:00
Jeff Washington (jwash)
1fa73e778f
add deactivate_epoch_reward_status ( #32114 )
2023-06-14 07:46:34 -07:00
Jeff Washington (jwash)
2968587d42
add compare_with_partitioned_rewards ( #32108 )
2023-06-14 07:43:09 -07:00
Jeff Washington (jwash)
67a434fc5b
add calculate_rewards_for_partitioning ( #32110 )
2023-06-13 15:45:59 -07:00
Jeff Washington (jwash)
65268af497
pass get_reward_interval to load_accounts ( #32084 )
2023-06-13 14:49:07 -07:00
Jeff Washington (jwash)
9774826b08
add calculate_validator_rewards ( #32107 )
2023-06-13 14:45:19 -07:00
Jeff Washington (jwash)
dcd66534dd
add partitioned rewards helpers ( #32085 )
...
* add partitioned rewards helpers
* remove pub(crate)
* credit -> distribution
2023-06-13 13:57:52 -07:00
Jeff Washington (jwash)
0762e69863
remove build error from merge ( #32104 )
2023-06-13 12:33:40 -07:00
Jeff Washington (jwash)
3fc183ca74
add calculate_stake_vote_rewards for partitioned rewards ( #32066 )
...
* add calculate_stake_vote_rewards for partitioned rewards
* check stake reward in test
* pr feedback
* add comment
---------
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-13 11:53:30 -07:00
Jeff Washington (jwash)
446b82afba
update comment ( #32099 )
2023-06-13 10:54:38 -07:00
Jeff Washington (jwash)
7c5c70a522
add compare_with_partitioned_rewards_results for testing partitioned rewards ( #32086 )
2023-06-13 07:39:46 -07:00
Jeff Washington (jwash)
b89ce94d33
add store_vote_accounts_partitioned ( #32061 )
...
* add store_vote_accounts_partitioned
* pr feedback
2023-06-12 14:38:30 -07:00
Tao Zhu
9b2c9b8f5a
correct feature gate use_default_units_in_fee_calculation usage ( #32077 )
2023-06-12 16:29:21 -05:00
Alexander Meißner
d0ae8c38bd
Fix - `enable_alt_bn128_syscall` ( #32083 )
...
* Fixes test_runtime_feature_enable_with_program_cache.
* Adds enable_alt_bn128_syscall to FEATURES_AFFECTING_RBPF.
2023-06-12 22:37:02 +02:00
Jeff Washington (jwash)
6280c63e1a
epoch rewards are stored partitioned as Vec<Vec< ( #32076 )
...
* epoch rewards are stored partitioned as Vec<Vec<
* update comment
2023-06-12 13:06:22 -07:00
Jeff Washington (jwash)
7e7c286d50
factor out get_epoch_reward_calculate_param_info to share results ( #32065 )
...
* factor out get_epoch_reward_calculate_param_info to share results
* remove extra comment
2023-06-12 09:56:08 -07:00
steviez
2e5b062809
Display path in error message when file create/write fails ( #32036 )
...
Using .unwrap() will panic and display the error; however, the path
isn't displayed which makes debugging harder.
2023-06-12 11:45:26 -05:00
Jeff Washington (jwash)
0645e96bc6
add calc_vote_accounts_to_store ( #32063 )
...
* add calc_vote_accounts_to_store
* update comment
2023-06-12 08:38:18 -07:00
Jeff Washington (jwash)
26f4c405b2
add update_reward_history_in_partition ( #32062 )
...
* add update_reward_history_in_partition
* remove explicit type
* remove spurrious comment
2023-06-12 08:37:46 -07:00
Jeff Washington (jwash)
b81a060898
add store_stake_accounts_in_partition ( #32060 )
...
* add store_stake_accounts_in_partition
* pr feedback on assert
2023-06-12 08:37:22 -07:00
Jeff Washington (jwash)
a001c5eb49
add calculate_reward_points_partitioned ( #32050 )
...
* add calculate_reward_points_partitioned
* remove unnecessary clone
* add comment
* clean up test from pr feedback
2023-06-12 08:36:42 -07:00
Jeff Washington (jwash)
37efc82a76
snapshot epoch reward fields tests ( #32064 )
2023-06-12 07:39:59 -07:00
Jeff Washington (jwash)
2572df7452
stake tests modification: next_epoch_and_n_slots ( #32052 )
...
stake tests modification: next_epoch_and_n_slots
2023-06-11 12:26:16 -07:00
Jeff Washington (jwash)
4ebec905c5
add hash_rewards_into_partitions ( #31795 )
...
* add sort_and_shuffle_partitioned_rewards
* break stake accounts into partitions by hashing
* fmt
* Update runtime/src/epoch_rewards_hasher.rs
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
* Update runtime/src/bank/tests.rs
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
* Update runtime/src/bank/tests.rs
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
* Update runtime/src/bank.rs
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
* fix build
* more build fixes
* use spihasher13 for reward partition
* update comments
* revert calc reward struct change to avoid abi changes for now
* cippy
* sort deps
* saturating math
* use copy traits on hasher
use parent block hash to seed rewards partition
* fmt
* use concurrent map to speed up reward partition
* clippy
* Update runtime/src/epoch_rewards_hasher.rs
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
* Update runtime/Cargo.toml
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
* Update runtime/src/bank.rs
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
* rename
* address review comments
* cargo.lock
* Update runtime/src/bank.rs
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
* update test
* clippy
* comments
* move hash_address_to_partition to epoch_rewards_hasher.rs
* tests to nail down width of partitions
* rename parameter to match with comments
* hash_address takes &self
* clippy
* EpochRewardHasher -> EpochRewardsHasher
* revert "hash_address takes &self" and refactor
* stake_rewards takes by value
---------
Co-authored-by: HaoranYi <haoran.yi@gmail.com>
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-09 11:55:01 -07:00
Jeff Washington (jwash)
14e90cb27d
test ancient packing with recycling ( #32021 )
...
* test ancient packing with recycling
* fix holdover from debugging and update comment
2023-06-09 10:38:34 -07:00
Andrew Fitzgerald
4a566ec938
create and canonicalize account_paths ( #32037 )
...
Co-authored-by: Brooks <brooks@prumo.org>
2023-06-09 10:04:25 -07:00
Brooks
948b66ee95
Removes #[allow(dead_code)] from ancient_append_vecs.rs ( #32047 )
2023-06-09 16:47:24 +00:00
Jeff Washington (jwash)
4fde0b0d4a
remove packed ancient append vec from shrink candidate list ( #32022 )
2023-06-09 09:28:49 -07:00
Jeff Washington (jwash)
31f2f569a6
simplify clean_dead_slot, factor out root stats ( #32035 )
2023-06-09 07:35:38 -07:00