Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

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
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant