solana/programs
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
..
address-lookup-table use one definition of builtin program cost in runtime and banking stage (#31930) 2023-06-02 10:22:22 -05:00
address-lookup-table-tests chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
bpf-loader-tests Reverify programs that are extended using ExtendProgram (#31886) 2023-06-01 06:17:42 -07:00
bpf_loader Add runtime environment to FailedVerification tombstones (#31991) 2023-06-06 22:24:39 +00:00
compute-budget use one definition of builtin program cost in runtime and banking stage (#31930) 2023-06-02 10:22:22 -05:00
config use one definition of builtin program cost in runtime and banking stage (#31930) 2023-06-02 10:22:22 -05:00
ed25519-tests chore: workspace inheritance (#29893) 2023-02-23 22:01:54 +08:00
loader-v4 Add runtime environment to FailedVerification tombstones (#31991) 2023-06-06 22:24:39 +00:00
sbf add hash_rewards_into_partitions (#31795) 2023-06-09 11:55:01 -07:00
stake use one definition of builtin program cost in runtime and banking stage (#31930) 2023-06-02 10:22:22 -05:00
system use one definition of builtin program cost in runtime and banking stage (#31930) 2023-06-02 10:22:22 -05:00
vote use one definition of builtin program cost in runtime and banking stage (#31930) 2023-06-02 10:22:22 -05:00
zk-token-proof [zk-token-sdk] Add `VerifyGroupedCiphertext2HandlesValidity` and `VerifyBatchedGroupedCiphertext2HandlesValidity` proof instructions (#31816) 2023-06-01 15:58:36 +09:00
zk-token-proof-tests [zk-token-sdk] Add `VerifyGroupedCiphertext2HandlesValidity` and `VerifyBatchedGroupedCiphertext2HandlesValidity` proof instructions (#31816) 2023-06-01 15:58:36 +09:00