The Feature Proposal Program provides a workflow for activation of Solana network features through community vote based on validator stake weight.
Community voting is accomplished using SPL Tokens. Tokens are minted that represent the total active stake on the network, and distributed to all validators based on their stake. Validators vote for feature activation by transferring their vote tokens to a predetermined address. Once the vote threshold is met the feature is activated.
The Solana validator software supports runtime feature activation through the
Feature program. This program ensures that features are activated
simultaneously across all validators to avoid divergent behavior that would
cause hard forks or otherwise break consensus.
solana feature activate workflow was designed for use by the core Solana
developers to allow for low-overhead addition of non-controversial network
features over time.
The Feature Proposal Program provides an additional mechanism over these runtime feature activation primitives to permit feature activation by community vote when appropriate.
The Feature Proposal Program's source is available on github
spl-feature-proposal command-line utility can be used to manage feature
proposal. Once you have Rust installed, run:
spl-feature-proposal --help for a full description of available commands.
spl-feature-proposal configuration is shared with the
solana command-line tool.
Feature Proposal Life Cycle
This section describes the life cycle of a feature proposal.
Implement the Feature
The first step is to conceive of the new feature and realize it in the Solana code base, working with the core Solana developers at https://github.com/solana-labs/solana.
During the implementation, a feature id will be required to identity the new feature in the code base to avoid the new functionality until its activation. The feature id for a feature proposal is derived by running the following commands.
First create a keypair for the proposal:
Now run the
spl-feature-proposal program to derive the feature id:
which in this case is
HQ3baDfNU7WKCyWvtMYZmi51YPs7vhSiLn1ESYp3jhiA is the identifier that will be
used in the code base and eventually will be visible in the
solana feature status command.
Note however that it is not possible to use
solana feature activate to
activate this feature, as there is no private key for
HQ3baDfNU7WKCyWvtMYZmi51YPs7vhSiLn1ESYp3jhiA. Activation of this feature is
only possible by the Feature Proposal Program.
Initiate the Feature Proposal
After the feature is implemented and deployed to the Solana cluster,
the feature id will be visible in
solana feature status and the feature
proposer may initiate the community proposal process.
This is done by running:
If the output looks good run the command again with the
--confirm flag to
continue, and then follow the remaining steps in the output to distribute the
vote tokens to all the validators.
COST: As a part of token distribution, the feature proposer will be financing the creation of SPL Token accounts for each of the validators. A SPL Token account requires 0.00203928 SOL at creation, so the cost for initiating a feature proposal on a network with 500 validators is approximately 1 SOL.
Tally the Votes
After advertising to the validators that a feature proposal is pending their acceptance, the votes are tallied by running:
Anybody may tally the vote. Once the required number of votes are tallied, the feature will be automatically activated at the start of the next epoch.
Upon a successful activation the feature will now show as activated by
solana feature status as well.