Skip to content

Conversation

@joncinque
Copy link
Collaborator

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.

#### 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.
@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2025

If this PR represents a change to the sysvar layout, please open a follow-up PR to update the JavaScript client @solana/sysvars (example)
Thank you for keeping the JavaScript clients in sync with the Rust clients.

Comment on lines 75 to 78
#[deprecated(
since = "2.3.0",
note = "Use solana_stake_interface::sysvar::stake_history::StakeHistorySysvar in v2 instead"
)]
Copy link
Contributor

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?

Copy link
Collaborator Author

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

Copy link
Contributor

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!

Copy link
Contributor

@rustopian rustopian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 2025

If this PR represents a change to the sysvar layout, please open a follow-up PR to update the JavaScript client @solana/sysvars (example)
Thank you for keeping the JavaScript clients in sync with the Rust clients.

@joncinque joncinque merged commit ef37517 into anza-xyz:maintenance/v2.x Aug 6, 2025
25 checks passed
@joncinque joncinque deleted the dep-stake-history branch August 6, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants