-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
stake-pool: Use stake program minimum delegation #3547
Conversation
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.
Did a first pass; here's a few comments. I'll do another pass tomorrow as well.
It's all ready for you tomorrow, thanks for the review! |
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.
Looks good! Some questions due to my ignorance, then I imagine it'll be good to go.
Are there any concerns about needing new/more tests? Nothing jumped out at me w.r.t. the minimum delegation, since the pool's minimum is still effectively 1 SOL. Same for MINIMUM_RESERVE_LAMPORTS
, since that was 1 lamport before as well.
For this one, not yet, since it'll work as expected. The next PR is adding a check during |
Ok, this should be good for another pass |
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.
Looks good to me!
Problem
Currently, the stake pool program hardcodes a minimum delegation amount of 0.001 SOL in the program, but the stake program will soon enforce a higher minimum delegation amount.
Solution
Use the maximum of the previous value (0.001 SOL) and the value reported by the stake program's
get_minimum_delegation
instruction.