stake-pool: Update program to work with minimum delegation #3127
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 minimum delegation will be raised with solana-labs/solana#24603, and the minimum reserve amount will be lowered with solana-labs/solana#24670 -- the stake pool program needs to be ready for that!
Solution
Update the minimum active stake amount and the minimum reserve amount as required. This was tested against the changes to raise the minimum delegation to 1 SOL, but not the second PR. The hope is that the only change will be to update
MINIMUM_RESERVE_LAMPORTS
to0
.The best option will be to call
get_minimum_delegation
on the stake program, but that hasn't landed in any of the Solana crates yet.We can land this PR to unblock solana-labs/solana#24603 if needed, or keep it as a draft. We won't redeploy the program until the new instruction makes it anyway.