-
Notifications
You must be signed in to change notification settings - Fork 157
sysvar: Deprecate stake-history and functions #266
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
sysvar: Deprecate stake-history and functions #266
Conversation
#### Problem The stake-history module in solana-sysvar will be removed with anza-xyz#264, but there hasn't been a deprecation warning. #### Summary of changes Put in a deprecation warning.
|
If this PR represents a change to the sysvar layout, please open a follow-up PR to update the JavaScript client |
| #[deprecated( | ||
| since = "2.3.0", | ||
| note = "Use solana_stake_interface::sysvar::stake_history::StakeHistorySysvar in v2 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.
What does "in v2 instead" mean?
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.
We're inverting which crate implements the sysvar code and trait from solana-sysvar to solana-stake-interface, but since only one crate can implement the trait, we have to do it in a breaking change, ie in solana-stake-interface v2 and solana-sysvar v3.
With normal deprecation warnings, there's typically an alternative that you can use right away, but we don't have the alternative ready in solana-sysvar v2, so I wanted to make clear that you need to use solana-stake-interface v2. Is it clearer if it says this?
Use solana_stake_interface::sysvar::stake_history::StakeHistorySysvar in solana-stake-interface v2 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.
Yep! That's a little more clear, thanks!
rustopian
left a comment
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 great.
|
If this PR represents a change to the sysvar layout, please open a follow-up PR to update the JavaScript client |
Problem
The stake-history module in solana-sysvar will be removed with #264, but there hasn't been a deprecation warning.
Summary of changes
Put in a deprecation warning.