-
Notifications
You must be signed in to change notification settings - Fork 291
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
cli: add feature revoke #4361
cli: add feature revoke #4361
Conversation
1a272e0
to
8e73a3b
Compare
8e73a3b
to
b8d72cf
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 a nit, the rest looks great! Also, can you add a changelog entry for this?
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
checksum = "f1056507c534839b5cd1b1010ffedb9e8c92313269786fb5066ff53b30326dc3" | ||
dependencies = [ | ||
"borsh 0.10.3", |
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.
Outside the scope of this PR, but the generated client should be compatible with borsh v1 if it's upgraded.
@@ -14,6 +14,9 @@ use { | |||
input_validators::*, keypair::*, | |||
}, | |||
solana_cli_output::{cli_version::CliVersion, QuietDisplay, VerboseDisplay}, | |||
solana_feature_gate_client::{ | |||
errors::SolanaFeatureGateError, instructions::RevokePendingActivation, |
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: Outside the scope of this PR, but FeatureGateError
would be a better name for the 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.
Looks great!
Problem
The new Feature Gate Core BPF program is live at
Feature111111...
on both testnet and devnet, and will soon be on mainnet-beta.With this new program, we can revoke features that are pending activation. The program has only one instruction,
RevokePendingActivation
, which simply "closes" a newly created feature account by:However, core contributors who wish to use this new capability have no way of doing so from the CLI.
Summary of Changes
Add a new command to the
solana feature
CLI that invokes theRevokePendingActivation
instruction on the Feature Gate program to revoke a pending activation.For more information about this instruction, see the program's instruction source. However, in summary, once a feature is activated with
solana feature activate
, it can be revoked at any time before the epoch rollover, while the state is still zeroed. Once the epoch concludes and the feature is activated by the runtime, the account is bestowed with validFeature
state and thus can no longer be revoked.