forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add hash_rewards_into_partitions (solana-labs#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 <[email protected]> * Update runtime/src/bank/tests.rs Co-authored-by: Trent Nelson <[email protected]> * Update runtime/src/bank/tests.rs Co-authored-by: Trent Nelson <[email protected]> * Update runtime/src/bank.rs Co-authored-by: Trent Nelson <[email protected]> * 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 <[email protected]> * Update runtime/Cargo.toml Co-authored-by: Trent Nelson <[email protected]> * Update runtime/src/bank.rs Co-authored-by: Trent Nelson <[email protected]> * rename * address review comments * cargo.lock * Update runtime/src/bank.rs Co-authored-by: Trent Nelson <[email protected]> * 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 <[email protected]> Co-authored-by: Trent Nelson <[email protected]> Co-authored-by: HaoranYi <[email protected]>
- Loading branch information
1 parent
14e90cb
commit 4ebec90
Showing
8 changed files
with
341 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.