Port BPFLoader2 activation to FeatureSet and rework built-in program activation
This commit is contained in:
@@ -19,7 +19,6 @@ solana-client = { path = "../client", version = "1.4.0" }
|
||||
solana-download-utils = { path = "../download-utils", version = "1.4.0" }
|
||||
solana-faucet = { path = "../faucet", version = "1.4.0" }
|
||||
solana-exchange-program = { path = "../programs/exchange", version = "1.4.0" }
|
||||
solana-genesis-programs = { path = "../genesis-programs", version = "1.4.0" }
|
||||
solana-ledger = { path = "../ledger", version = "1.4.0" }
|
||||
solana-logger = { path = "../logger", version = "1.4.0" }
|
||||
solana-runtime = { path = "../runtime", version = "1.4.0" }
|
||||
|
@@ -13,7 +13,8 @@ use solana_core::{
|
||||
};
|
||||
use solana_ledger::create_new_tmp_ledger;
|
||||
use solana_runtime::genesis_utils::{
|
||||
create_genesis_config_with_vote_accounts, GenesisConfigInfo, ValidatorVoteKeypairs,
|
||||
create_genesis_config_with_vote_accounts_and_cluster_type, GenesisConfigInfo,
|
||||
ValidatorVoteKeypairs,
|
||||
};
|
||||
use solana_sdk::{
|
||||
client::SyncClient,
|
||||
@@ -155,10 +156,11 @@ impl LocalCluster {
|
||||
mut genesis_config,
|
||||
mint_keypair,
|
||||
..
|
||||
} = create_genesis_config_with_vote_accounts(
|
||||
} = create_genesis_config_with_vote_accounts_and_cluster_type(
|
||||
config.cluster_lamports,
|
||||
&keys_in_genesis,
|
||||
stakes_in_genesis,
|
||||
config.cluster_type,
|
||||
);
|
||||
genesis_config.ticks_per_slot = config.ticks_per_slot;
|
||||
genesis_config.epoch_schedule = EpochSchedule::custom(
|
||||
@@ -166,19 +168,7 @@ impl LocalCluster {
|
||||
config.stakers_slot_offset,
|
||||
!config.skip_warmup_slots,
|
||||
);
|
||||
genesis_config.cluster_type = config.cluster_type;
|
||||
genesis_config.poh_config = config.poh_config.clone();
|
||||
|
||||
match genesis_config.cluster_type {
|
||||
ClusterType::MainnetBeta | ClusterType::Testnet => {
|
||||
genesis_config.native_instruction_processors =
|
||||
solana_genesis_programs::get_native_programs_for_genesis(
|
||||
genesis_config.cluster_type,
|
||||
)
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
||||
genesis_config
|
||||
.native_instruction_processors
|
||||
.extend_from_slice(&config.native_instruction_processors);
|
||||
|
@@ -759,6 +759,7 @@ fn test_mainnet_beta_cluster_type() {
|
||||
&solana_sdk::system_program::id(),
|
||||
&solana_stake_program::id(),
|
||||
&solana_vote_program::id(),
|
||||
&solana_sdk::bpf_loader_deprecated::id(),
|
||||
]
|
||||
.iter()
|
||||
{
|
||||
@@ -774,13 +775,7 @@ fn test_mainnet_beta_cluster_type() {
|
||||
}
|
||||
|
||||
// Programs that are not available at epoch 0
|
||||
for program_id in [
|
||||
&solana_sdk::bpf_loader::id(),
|
||||
&solana_sdk::bpf_loader_deprecated::id(),
|
||||
&solana_vest_program::id(),
|
||||
]
|
||||
.iter()
|
||||
{
|
||||
for program_id in [&solana_sdk::bpf_loader::id(), &solana_vest_program::id()].iter() {
|
||||
assert_eq!(
|
||||
(
|
||||
program_id,
|
||||
|
Reference in New Issue
Block a user