-
Notifications
You must be signed in to change notification settings - Fork 322
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
solana-genesis: deactivate specific features for development clusters #2246
solana-genesis: deactivate specific features for development clusters #2246
Conversation
c67dff9
to
456552e
Compare
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 one more nit
runtime/src/genesis_utils.rs
Outdated
@@ -200,6 +201,20 @@ pub fn activate_all_features(genesis_config: &mut GenesisConfig) { | |||
} | |||
} | |||
|
|||
pub fn deactivate_features(genesis_config: &mut GenesisConfig, features_to_skip: &Vec<Pubkey>) { |
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.
nit: Since the function name is now deactivate_features
, can you change the parameter name to features_to_deactivate
?
genesis/src/main.rs
Outdated
let features_to_deactivate = pubkeys_of(&matches, "deactivate_feature").unwrap_or_default(); | ||
|
||
if cluster_type != ClusterType::Development && !features_to_deactivate.is_empty() { | ||
eprintln!("Error: The --deactivate-feature-set argument cannot be used with --cluster-type={cluster_type:?}"); |
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.
nit: Update the help text to match the new flag name
genesis/src/main.rs
Outdated
.value_name("FEATURE_PUBKEY") | ||
.validator(is_pubkey) | ||
.multiple(true) | ||
.help("deactivate this feature in genesis. Compatable with ClusterType::Development"), |
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.
typo: compatible
nit: ClusterType::Development is the name of the type in code, but I think it is possibly more clear to use the string that a user would pass on the CLI (development
). I think your wording is likely fine as-is, but could also adjust wording to more strongly say only valid when using --cluster-type development
or something along those lines
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
Problem
It's not very easy to deactivate specific features in development clusters. This is a step towards increasing feature activation granularity
Summary of Changes
--deactivate-feature-set<feature-pubkey0> <feature-pubkey1> ... <feature-pubkeyN>
ClusterType::Development
clusters, all features are activated, this lets us deactivate specific ones. Example: in a development cluster we do not want to activatetimely_vote_credits
for a cluster running both v1.17 and v1.18 validatorsNote: naming convention is kept in line with
test-validator
genesis