-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move EpochRewardsHasher to solana-sdk #34934
Move EpochRewardsHasher to solana-sdk #34934
Conversation
Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, forgot to run |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #34934 +/- ##
=======================================
Coverage 81.6% 81.6%
=======================================
Files 827 828 +1
Lines 224252 224252
=======================================
+ Hits 183128 183135 +7
+ Misses 41124 41117 -7 |
* Move EpochRewardsHasher to solana-sdk * Cargo.lock * Apparently we're allowing arithmetic_side_effects in all of runtime * Move allow stmt to block instead of module * Also allow in test mod (cherry picked from commit bbd1fd4)
…4939) Move EpochRewardsHasher to solana-sdk (#34934) * Move EpochRewardsHasher to solana-sdk * Cargo.lock * Apparently we're allowing arithmetic_side_effects in all of runtime * Move allow stmt to block instead of module * Also allow in test mod (cherry picked from commit bbd1fd4) Co-authored-by: Tyera <[email protected]>
Problem
EpochRewardsHasher
will be needed by solana-rpc and downstream clients to find rewards for specific addresses. But right now, it's a private solana-runtime module and struct. cc #34773 (comment)Summary of Changes
Move
EpochRewardsHasher
to solana-sdk and make pubfn hash_rewards_into_partitions()
remains in runtime because it is not needed outside of the runtime (this is the function that performs the actual partitioned rewards calculation). It also depends onbank::StakeRewards
. Open to renaming the containing module, if having both asolana_runtime::epoch_rewards_hasher
and asolana_sdk::epoch_rewards_hasher
seems bad.