Skip to content

Commit 88a10be

Browse files
committed
alpenglow: add feature gate
1 parent 4ba219c commit 88a10be

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

feature-set/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,10 @@ pub mod enable_extend_program_checked {
10951095
solana_pubkey::declare_id!("2oMRZEDWT2tqtYMofhmmfQ8SsjqUFzT6sYXppQDavxwz");
10961096
}
10971097

1098+
pub mod alpenglow {
1099+
solana_pubkey::declare_id!("mustRekeyVm2QHYB3JPefBiU4BY3Z6JkW2k3Scw5GWP");
1100+
}
1101+
10981102
pub static FEATURE_NAMES: LazyLock<AHashMap<Pubkey, &'static str>> = LazyLock::new(|| {
10991103
[
11001104
(secp256k1_program_enabled::id(), "secp256k1 program"),
@@ -1330,6 +1334,7 @@ pub static FEATURE_NAMES: LazyLock<AHashMap<Pubkey, &'static str>> = LazyLock::n
13301334
(mask_out_rent_epoch_in_vm_serialization::id(), "SIMD-0267: Sets rent_epoch to a constant in the VM"),
13311335
(enshrine_slashing_program::id(), "SIMD-0204: Slashable event verification"),
13321336
(enable_extend_program_checked::id(), "Enable ExtendProgramChecked instruction"),
1337+
(alpenglow::id(), "Enable Alpenglow"),
13331338
/*************** ADD NEW FEATURES HERE ***************/
13341339
]
13351340
.iter()

runtime/src/genesis_utils.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,20 @@ pub fn create_genesis_config_with_leader_with_mint_keypair(
219219
}
220220
}
221221

222+
pub fn activate_all_features_alpenglow(genesis_config: &mut GenesisConfig) {
223+
do_activate_all_features::<true>(genesis_config);
224+
}
225+
222226
pub fn activate_all_features(genesis_config: &mut GenesisConfig) {
227+
do_activate_all_features::<false>(genesis_config);
228+
}
229+
230+
pub fn do_activate_all_features<const IS_ALPENGLOW: bool>(genesis_config: &mut GenesisConfig) {
223231
// Activate all features at genesis in development mode
224232
for feature_id in FeatureSet::default().inactive() {
225-
activate_feature(genesis_config, *feature_id);
233+
if IS_ALPENGLOW || *feature_id != agave_feature_set::alpenglow::id() {
234+
activate_feature(genesis_config, *feature_id);
235+
}
226236
}
227237
}
228238

0 commit comments

Comments
 (0)