Skip to content

reward-info: Add variant for deactivated stake#634

Merged
joncinque merged 2 commits intoanza-xyz:masterfrom
joncinque:reward-destake
Mar 24, 2026
Merged

reward-info: Add variant for deactivated stake#634
joncinque merged 2 commits intoanza-xyz:masterfrom
joncinque:reward-destake

Conversation

@joncinque
Copy link
Copy Markdown
Collaborator

Problem

As mentioned during this SIMD-0392 amendment, block metadata should carry the information of when a stake account is deactivating.

Summary of changes

Add a new DeactivatingStake variant of RewardType, to be used in anza-xyz/agave#11332.

#### Problem

As mentioned during this
[SIMD-0392 amendment](solana-foundation/solana-improvement-documents#488 (comment)),
block metadata should carry the information of when a stake account is
deactivting.

#### Summary of changes

Add a new `DeactivatingStake` variant of `RewardType`, to be used in
anza-xyz/agave#11332.
@joncinque joncinque requested a review from t-nelson March 23, 2026 19:56
RewardType::Rent => "rent",
RewardType::Staking => "staking",
RewardType::Voting => "voting",
RewardType::DeactivatingStake => "deactivating-stake",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

how do we plan to use this wrt multi-epoch deactivations?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

My thinking is that it has multiple "deactivating" entries, since it's technically still deactivating

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i guess my original thought was that they'd get the special designation only in their last deactivation epoch. that is when active delegation goes to zero

...then we can get cute and do the same for first epoch with rewards and never have to scan the account's tx history again 😉

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fine by me! Either way ✔️ please so I can implement it in Agave

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
RewardType::DeactivatingStake => "deactivating-stake",
RewardType::DeactivatedStake => "deactivated-stake",

change in usage, change in tense 😉

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done!

@joncinque joncinque changed the title reward-info: Add variant for deactivating stake reward-info: Add variant for deactivated stake Mar 24, 2026
@joncinque joncinque merged commit 0fb466b into anza-xyz:master Mar 24, 2026
30 checks passed
@joncinque joncinque deleted the reward-destake branch March 24, 2026 19:44
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.

2 participants