-
Notifications
You must be signed in to change notification settings - Fork 4.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
Add GetMinimumDelegation stake program instruction #24020
Conversation
2aab6cb
to
c4ef47b
Compare
Optionally I could also split this PR up into the three points listed up Summary of Changes. |
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 just a few small things
bc99b84
to
7012b25
Compare
/// NOTE: This is also used to calculate the minimum balance of a stake account, which is the | ||
/// rent exempt reserve _plus_ the minimum stake delegation. | ||
#[deprecated( | ||
since = "1.10.6", |
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.
What's the process for deciding which version a feature should land in? I was originally thinking that I would backport this PR to v1.10, but is that right? And since this PR could be split up into three separate pieces, maybe the different pieces have different backport answers. @jstarry wdyt?
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.
i always use the current version of the oldest branch i intend to backport to
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.
i always use the current version of the oldest branch i intend to backport to
Nice, makes sense!
And since this PR could be split up into three separate pieces, maybe the different pieces have different backport answers
This particular deprecation is specific to this PR so should be fine to follow trent's suggestion
Codecov Report
@@ Coverage Diff @@
## master #24020 +/- ##
=========================================
- Coverage 81.8% 81.7% -0.2%
=========================================
Files 581 589 +8
Lines 158312 160700 +2388
=========================================
+ Hits 129518 131296 +1778
- Misses 28794 29404 +610 |
9a3fa32
to
a624549
Compare
/// rent exempt reserve _plus_ the minimum stake delegation. | ||
#[deprecated( | ||
since = "1.10.6", | ||
note = "This constant may be outdated, please use `solana_stake_program::get_minimum_delegation` instead" |
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.
I don't think the directive here is quite right because solana_stake_program::get_minimum_delegation
isn't public. Can we deprecate this later when you add the convenience method for doing the CPI + get_return_data?
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.
Yes, will do. Since the PR is already merged, I'll put up another commit to remove the deprecation.
a624549
to
15b6a96
Compare
Problem
There is not a way to query the minimum stake delegation.
Summary of Changes
get_minimum_delegation()
helper functionMINIMUM_STAKE_DELEGATION
constant and update clients to useget_minimum_delegation()
insteadFeature gate issue: #24057