-
Notifications
You must be signed in to change notification settings - Fork 226
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
Rpc: deprecate getStakeActivation
and make inactive_stake consistent
#69
Rpc: deprecate getStakeActivation
and make inactive_stake consistent
#69
Conversation
51039cb
to
89a805b
Compare
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.
nice.
@@ -4091,7 +4063,43 @@ fn rpc_perf_sample_from_perf_sample(slot: u64, sample: PerfSample) -> RpcPerfSam | |||
} | |||
} | |||
|
|||
// RPC methods deprecated in v1.8 | |||
pub mod rpc_deprecated_v1_18 { |
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 forgot I wrote this code before v1.18 was branched. Rather than edit all these 18s, I'm going to propose backporting to v1.18 -- this is very low risk and small in scope, and backporting will allow us to remove this method altogether in v2.
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.
Should this also have been removed in #1886?
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.
@steveluscher I included that at first, but realized we didn't deprecate the client methods in this PR. Still considering/hoping to remove in v2.0, but need to figure the best way to handle.
Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis. |
…nsistent (backport of #69) (#75) Rpc: deprecate `getStakeActivation` and make inactive_stake consistent (#69) * Make inactive_stake consistent * Add rpc_deprecated_v1_18 module * Move get_stake_activation to deprecated list * Fix typo (cherry picked from commit 661de5b) Co-authored-by: Tyera <[email protected]>
This was deprecated in anza-xyz/agave#69
…nsistent (backport of anza-xyz#69) (anza-xyz#75) Rpc: deprecate `getStakeActivation` and make inactive_stake consistent (anza-xyz#69) * Make inactive_stake consistent * Add rpc_deprecated_v1_18 module * Move get_stake_activation to deprecated list * Fix typo (cherry picked from commit 661de5b) Co-authored-by: Tyera <[email protected]>
anza-xyz#69) * Make inactive_stake consistent * Add rpc_deprecated_v1_18 module * Move get_stake_activation to deprecated list * Fix typo
Problem
The RPC endpoint getStakeActivation only looks at the total stake balance for the deactivating and inactive cases. This means that if an active stake account receives a transfer, the amount is not reflected in the "inactive" stake, which is confusing.
Originally here: solana-labs#35116
Summary of Changes
Deprecate this confusing RPC method
Evaluate inactive_stake to the total lamports balance minus effective stake and rent-exempt reserve for all activation cases.
Fixes solana-labs#35111