-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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.