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: Make activating / deactivating check stricter #4002

Merged
merged 1 commit into from
Jan 27, 2023

Conversation

joncinque
Copy link
Contributor

Problem

With #3987, we added a check to make sure that the existing transient stake was "going in the right direction", ie. that it's activating during "increase additional" and "redelegate", and that it's deactivating during "decrease additional". The existing check is oversimplified, and only checks that it's activating OR active / deactivating OR inactive.

Solution

Make the check a bit more strict, to make sure that it's activating in that epoch. This is a pedantic change, since it's typically impossible to "increase additional" / "redelegate" with transient stakes that are active or inactive, unless there's an explicit ask to not merge transient accounts while updating. Either way, the runtime would catch that.

@joncinque joncinque merged commit cc3a56d into solana-labs:master Jan 27, 2023
@joncinque joncinque deleted the sp-act branch January 27, 2023 22:53
HaoranYi pushed a commit to HaoranYi/solana-program-library that referenced this pull request Jul 19, 2023
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