Task Description: Implement Feature Management in Solana
You need to implement a feature management system for the Solana runtime, specifically focused on the full_inflation feature set. Your implementation should extend the current FeatureSet structure to correctly manage the activation status of features based on specific rules for the full_inflation feature.
Requirements:
Feature Activation Logic:
Implement logic in the FeatureSet struct that enables the detection of when both vote_id and enable_id for the full_inflation feature pair are active simultaneously.
The method full_inflation_features_enabled should return a HashSet<Pubkey> containing the appropriate feature identifiers, specifically:
Add full_inflation::devnet_and_testnet::id() to the set if that feature is active.
Include full_inflation::mainnet::certusone::enable::id() if both the corresponding vote_id and enable_id are active in any order.
Default Configuration:
Upon initialization with FeatureSet::default(), ensure all features are inactive. The full_inflation_features_enabled method should return an empty set until any relevant features are activated.
Testing:
Ensure existing tests (test_full_inflation_features_enabled and test_full_inflation_features_enabled_devnet_and_testnet) pass as they verify the correct activation conditions for the full_inflation feature set.
If any adjustments to the logic cause test failures, update your implementation accordingly.
Documentation:
Comment your code clearly to explain how feature activation is managed especially focusing on the conditions that trigger the inclusion of the full_inflation feature identifiers.