-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add stake_flags to stake state #32524
Conversation
This PR will break downstream spl repo. Here is the following up PR to fix SPL repo, once this PR is merged: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. gonna give spl folks the final approval here though since you'll need to workout deployment strategy with them
We probably should bump the major version of the |
I am not familiar with the version of
|
no. the |
I have manually built and tested spl PR together with this change. All tests passed. |
less concerned about the tests and more about what needs to happen to get the program redeployed with this patch |
The current deserializers work properly with the change, so we don't actually need to update the program. They just ignore the new stuff at the end of the struct |
put yer money where yer mouth is and approve? 😉 |
StakeState::Stake(meta, stake, _) => StakeAccountType::Delegated(UiStakeAccount { | ||
meta: meta.into(), | ||
stake: Some(stake.into()), | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im assuming the intent of flags (if more flags are ever added) is only for transient internal state tracking, so doesnt need to show up in UiStakeAccount
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think we need to impose any use-restrictions on the flags. future additions that make sense to display will likely need handling that we can't predict today. for instance i'll claim one when i get around proposing vote account bonds, but ui display would probably be something like
flags.contains(FLAG_VOTER_BOND).then_some(delegation.vote_account)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^^ This is a follow up PR, which adds the stake flags to UiStakeAccount
.
lgtm, also note i tested my single pool cli tests, with a cli built against this pr, and a program built against 1.16, and everything worked fine. i wasnt able to run any sbf tests for an issue unrelated to this pr (ie they fail on monorepo master too, i think because of the tokio upgrade) i am curious what the upgrade story here is tho, will you cut a new monorepo release after this pr? or is this blocked on splitting sdk/program out of monorepo? since once this is merged, we would need something to update to, and in the mean time monorepo ci will break on the downstream projects tests |
Merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Late review, but just wanted to say that the stake program changes look good!
Problem
Fix a stake redelegation issue.
Part of #31876
Summary of Changes
Add StakeFlags to StakeState
NOTE: This change just adds StakeFlags to StakeState. The Stake behavior should not change.
The actual fix will come in a following PR once this PR is merged.
Fixes #