Skip to content
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

stake-pool: Handle force destaked accounts #3152

Merged
merged 1 commit into from
May 19, 2022

Conversation

joncinque
Copy link
Contributor

Problem

During a cluster restart, it's possible for stake accounts to get force destaked. If a stake pool contains a force destaked validator stake account, many parts will stop working.

Solution

Provide two safeguards:

  • during update, if the validator stake account is usable by the pool and Initialized, assume that a destake happened, merge it into the reserve, and effectively remove that validator from the pool. It can always be re-added again if needed.
  • during stake increase, if the validator stake account is Initialized, something bad happened, so prevent the increase. This is in the case of a cronjob that isn't aware that a force destake happened, and tries to increase stake on the validator.

@joncinque joncinque merged commit c324f6c into solana-labs:master May 19, 2022
@joncinque joncinque deleted the sp-destake branch May 19, 2022 17:08
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.

None yet

1 participant