Skip to content

Conversation

@2501babe
Copy link
Member

@2501babe 2501babe commented Nov 3, 2025

Problem

we remove the last stake program code in 4.0, to free up the name to be reused

Summary of Changes

make the deprecation unconditional on the unstable api flag (although it was right: not stable!)

i decided to backport the code changes from #8834 to stop using solana-stake-program in agave because reusing this work as-is seemed a lot cleaner than marking some hundred+ callsites #[allow(deprecated)]. this pr is identical to the 4.0 one, except that we do not delete the stake program crate

closes #8841

@2501babe 2501babe self-assigned this Nov 3, 2025
@mergify
Copy link

mergify bot commented Nov 3, 2025

The Firedancer team maintains a line-for-line reimplementation of the
native programs, and until native programs are moved to BPF, those
implementations must exactly match their Agave counterparts.
If this PR represents a change to a native program implementation (not
tests), please include a reviewer from the Firedancer team. And please
keep refactors to a minimum.

@2501babe 2501babe changed the title announce removal announce solana-stake-program removal Nov 3, 2025
this commit backports the stake program excision from solana-labs#8834 but leaves the crate intact with a warning
@2501babe 2501babe force-pushed the 20251103_depr_stake branch from 2a262c8 to 23a9b3b Compare November 4, 2025 08:41
@mergify
Copy link

mergify bot commented Nov 4, 2025

If this PR represents a change to the public RPC API:

  1. Make sure it includes a complementary update to rpc-client/ (example)
  2. Open a follow-up PR to update the JavaScript client @solana/kit (example)

Thank you for keeping the RPC clients in sync with the server API @2501babe.

Comment on lines 1 to 11
@@ -1,11 +1,13 @@
#![cfg_attr(
not(feature = "agave-unstable-api"),
deprecated(
since = "3.1.0",
note = "This crate has been marked for formal inclusion in the Agave Unstable API. From \
v4.0.0 onward, the `agave-unstable-api` crate feature must be specified to \
acknowledge use of an interface that may break without warning."
)
#![deprecated(
since = "3.1.0",
note = "\
This crate will be REMOVED in Agave v4.0.0 and its name will be taken by the BPF Stake Program. \
Users of this crate's public exports must switch to:
* `stake_state` -> `solana_stake_interface::state`.
* `points` -> `solana_runtime::inflation_rewards::points`.
* `id()` / `check_id()` -> `solana_sdk_ids::sysvar::stake::_`.
* `get_minimum_delegation()` will continue to live at the same path.
* Some convenience functions such as `stake_from()` and `create_account()` are removed."
)]
Copy link
Member Author

Choose a reason for hiding this comment

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

this is the only change original to this pr

@2501babe 2501babe changed the title announce solana-stake-program removal deprecate solana-stake-program Nov 4, 2025
@codecov-commenter
Copy link

codecov-commenter commented Nov 4, 2025

Codecov Report

❌ Patch coverage is 98.35165% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.2%. Comparing base (010b891) to head (768c88e).
⚠️ Report is 3 commits behind head on v3.1.

Additional details and impacted files
@@            Coverage Diff            @@
##             v3.1    #8860     +/-   ##
=========================================
- Coverage    83.2%    83.2%   -0.1%     
=========================================
  Files         864      865      +1     
  Lines      375142   375290    +148     
=========================================
+ Hits       312240   312246      +6     
- Misses      62902    63044    +142     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@2501babe 2501babe marked this pull request as ready for review November 4, 2025 09:32
@2501babe 2501babe requested a review from a team as a code owner November 4, 2025 09:32
@2501babe 2501babe requested a review from grod220 November 4, 2025 09:33
grod220
grod220 previously approved these changes Nov 4, 2025
Copy link

@t-nelson t-nelson left a comment

Choose a reason for hiding this comment

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

ideally this would have gone into master in a way that could be directly backported in full. that is, first as a deprecation + usage removal, then the actual crate deletion independently. so we can just mergify bp the former basically 1:1 with master. too much trouble to back out of master and put it back in in parts?

@2501babe 2501babe marked this pull request as draft November 4, 2025 17:53
@2501babe 2501babe marked this pull request as ready for review November 4, 2025 18:10
@2501babe
Copy link
Member Author

2501babe commented Nov 4, 2025

ok i made the three prs to revert -> deprecate -> remove but i think we should just land this. we would have to change the commit that git revert puts out because of a refactor elsewhere in the codebase and i think putting this pr in 3.1 has better git feng shui than adding the stake program back to master and changing it

@willhickey
Copy link

Hey @bw-solana we've got an "expedient" vs "follow the proces" backport debate ☝️. Any stance?

@bw-solana
Copy link

If I'm understanding correctly, these are the 3 PRs that could get merged and backported:
#8885
#8886
#8887

Agree with Trent generally speaking. But the fact that the revert now collides with another change makes me think the faster and lower risk thing is to just let this go in as is.

The fact Hana went through the exercise tells me this isn't a lazy person whining their way into a bad precedent 😄

Copy link

@t-nelson t-nelson left a comment

Choose a reason for hiding this comment

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

it would appear i've been overruled

@t-nelson
Copy link

@grod220 mind giving this one sme approval again?

@2501babe 2501babe merged commit 99945ca into anza-xyz:v3.1 Nov 14, 2025
43 checks passed
@2501babe 2501babe deleted the 20251103_depr_stake branch November 14, 2025 03:35
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.

6 participants