Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

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 requested a review from 2501babe January 27, 2023 18:57
@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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants