stake-pool: Update tests for 1.17 #4913
Merged
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.
Problem
The SPL downstream tests were disabled in solana-labs/solana#32524, but we need to re-enable the downstream tests to avoid breaking people in the future, per solana-labs/solana#32655.
After doing the work to reinstate the old
StakeState
and re-enabling the downstream tests, there were errors in the stake pools tests.Solution
The biggest change relates to the async rewards payout being implemented for solana-foundation/solana-improvement-documents#15 -- we have to warp to
slot + 1
in order to get out of the rewards payout time.After that, there was one issue where we weren't serializing 200 bytes for stake accounts in a test.
And a little extra thing, I noticed that
retain
in the stake pool program was using a function pointer instead of a closure, so I changed to be a closure, same as all the otherbig_vec
functions. This should improve compute-unit performance because the Rust compiler can inline closures, but not calling into function pointers.