-
Notifications
You must be signed in to change notification settings - Fork 230
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
ff cleanup: reduce_stake_warmup_cooldown #470
ff cleanup: reduce_stake_warmup_cooldown #470
Conversation
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.
Just a comment on removing the account from the interface too.
cc @2501babe for awareness, who's been working on the BPF port of the stake program
f5a61d2
to
894d4a7
Compare
The single pool program has a test that swaps out every account in an instruction to make sure that it fails. With this change, the config account doesn't matter, so swapping the stake config with a random account now succeeds. Fixed with solana-labs/solana-program-library#6543 Further work to be done with solana-labs/solana-program-library#6542 once this change is available in a crate. We can't do it right away because the instruction creators on 1.18 still reference the stake config account. |
894d4a7
to
da34bea
Compare
Bah darn, looks like there's one more test that breaks. Let me fix that up... |
Sorry, we have to revert my suggestion. The downstream breakage is legit -- in the old version, the instruction creator gives the stake config account, and in the new version, it gives the system program. So when a downstream program uses those instruction creators from the stake program, then its own instruction creators also have to take in the stake config account. When they upgrade with this change, their program is still receiving the stake config account, but the stake instruction creator expects the system program in that place, causing an error during CPI. We could say "2.0 is breaking, tough luck", but instant breakage is a bad experience, and there's no clean way for SPL to support both at once. Again, I'm really sorry that I asked you to make that painful change. I should have thought a bit further about the consequences. |
da34bea
to
84e2dfa
Compare
No worries! so for a fix, should we revert the instruction creator to use the stake config account? |
Let's just revert the change. We can deprecate them when we create totally new instruction variants |
And sorry, to be totally clear, I mean reverting my suggestions, the first commit is good |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #470 +/- ##
=========================================
- Coverage 81.8% 81.8% -0.1%
=========================================
Files 847 849 +2
Lines 229180 229072 -108
=========================================
- Hits 187600 187463 -137
- Misses 41580 41609 +29 |
84e2dfa
to
1a48d35
Compare
This feature has been activated on all clusters.
There are a couple more uses that we cannot yet remove, in order for historical stake information to function properly:
agave/cli/src/stake.rs
Lines 2573 to 2576 in 182d27f
agave/cli/src/cluster_query.rs
Lines 1830 to 1831 in 182d27f
agave/sdk/src/feature_set.rs
Lines 1079 to 1082 in 182d27f
Fixes solana-labs#32724