test epoch rewards blocks program usage#78
Merged
2501babe merged 1 commit intosolana-program:mainfrom Aug 11, 2025
Merged
Conversation
joncinque
approved these changes
Aug 6, 2025
Contributor
joncinque
left a comment
There was a problem hiding this comment.
This test looks great!
I'm almost totally onboard with removing test_program_execution_restricted_for_stake_account_in_reward_period.
My only concern is that the test also checks that it's possible to credit a stake account during reward payout, which could be useful in case we mistakenly decide to restrict that somehow in the future.
So I would remove the stake interactions in that test, but keep the crediting. What do you think?
Member
Author
|
im a bit skeptical this test still has value, since its now just checking that system transfers work, but ive changed it to do that |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this is part of removing the stake program from agave (anza-xyz/agave#7203). right now, the agave repo still gets its version of the stake program from
programs/stake/for all tests, which is not just useless but actually dangerous since someonce could break the live stake program with agave changes that conform to the dead oneadding the bpf stake program to
TestValidatoris easy, but some tests that use a rawBankare more tricky to deal with. we have to decide whether each should:this test is intended to replace
test_program_execution_restricted_for_stake_account_in_reward_period()inruntime/src/bank/partitioned_epoch_rewards/mod.rs, which you should look at while reviewing this pr to see if you agree. it does a lot of bank/tower/vote things to naturally advance the bank into and out of the rewards period. in my view this is unecessary and all the test really cares about is that the stake program aborts, and other tests cover the rewards period itself. if youre of the same view ill delete that test in its entirety