-
Notifications
You must be signed in to change notification settings - Fork 877
Remove use of stake_raise_minimum_delegation_to_1_sol in stake program
#5754
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
base: master
Are you sure you want to change the base?
Remove use of stake_raise_minimum_delegation_to_1_sol in stake program
#5754
Conversation
|
The Firedancer team maintains a line-for-line reimplementation of the |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5754 +/- ##
=========================================
- Coverage 82.9% 82.9% -0.1%
=========================================
Files 826 826
Lines 375390 375207 -183
=========================================
- Hits 311525 311273 -252
- Misses 63865 63934 +69 🚀 New features to boost your workflow:
|
| pub fn get_minimum_delegation(feature_set: &FeatureSet) -> u64 { | ||
| if feature_set.is_active(&feature_set::stake_raise_minimum_delegation_to_1_sol::id()) { | ||
| const MINIMUM_DELEGATION_SOL: u64 = 1; | ||
| MINIMUM_DELEGATION_SOL * LAMPORTS_PER_SOL | ||
| } else { | ||
| 1 | ||
| } |
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.
So if we merge this PR, there will be a chance that testnet halts. Since this feature gate is active, if some nodes run this version and some run the previous version, then they could disagree on if a new stake delegation succeeds or not.
Can you link to the SVM code that needs to remove the feature set lookup? I dunno if there's a chicken-and-egg problem here. I.e. we can't (shouldn't?) remove the code here without the bpf stake program going live first, but we also can't have the bpf stake program go live without removing the code here.
We may say it's OK to have testnet halt for the sake of simplicity, but I'm not sure who should make that call. Otherwise we'd need another feature gate to flip only testnet back to 1 lamport.
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.
We want to remove FeatureSet from SVM. So, this function will need to be deleted.
agave/program-runtime/src/invoke_context.rs
Line 649 in b35f5be
| pub fn get_feature_set(&self) -> &FeatureSet { |
This is being called from a few builtin programs (including stake program) to check if a feature has been activated.
Is this particular feature on hold for MNB? If so, would it be deactivated on testnet?
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.
Yeah, stake_raise_minimum_delegation_to_1_sol isn't going to be activated on mnb in its current form. Trent suggested over in Discord that we deactivate this feature from testnet on the next testnet cluster restart. That'll allow us to then delete the code here.
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 PR will not be backported. So it won't reach testnet anytime soon. Should we merge it on master? Or, would you rather wait for the feature to be deactivated before merging it?
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.
We still run edge builds against testnet though. If it were me, I'd wait until the feature was deactivated before merging.
Problem
stake_raise_minimum_delegation_to_1_solfeature will not be used as part of the builtin stake program. But, this is causing a dependency onInvokeContext::get_feature_set(). This dependency needs to be removed as part of SVM repo migration.Summary of Changes
Remove the feature usage from the builtin stake program.
Fixes #