|
@@ -41,9 +41,9 @@ use {
|
|
|
run_cluster_partition, run_kill_partition_switch_threshold, save_tower,
|
|
run_cluster_partition, run_kill_partition_switch_threshold, save_tower,
|
|
|
setup_snapshot_validator_config, test_faulty_node, wait_for_duplicate_proof,
|
|
setup_snapshot_validator_config, test_faulty_node, wait_for_duplicate_proof,
|
|
|
wait_for_last_vote_in_tower_to_land_in_ledger, SnapshotValidatorConfig,
|
|
wait_for_last_vote_in_tower_to_land_in_ledger, SnapshotValidatorConfig,
|
|
|
- ValidatorTestConfig, DEFAULT_CLUSTER_LAMPORTS, DEFAULT_NODE_STAKE, RUST_LOG_FILTER,
|
|
|
|
|
|
|
+ ValidatorTestConfig, DEFAULT_NODE_STAKE, RUST_LOG_FILTER,
|
|
|
},
|
|
},
|
|
|
- local_cluster::{ClusterConfig, LocalCluster},
|
|
|
|
|
|
|
+ local_cluster::{ClusterConfig, LocalCluster, DEFAULT_MINT_LAMPORTS},
|
|
|
validator_configs::*,
|
|
validator_configs::*,
|
|
|
},
|
|
},
|
|
|
solana_pubsub_client::pubsub_client::PubsubClient,
|
|
solana_pubsub_client::pubsub_client::PubsubClient,
|
|
@@ -108,7 +108,7 @@ fn test_local_cluster_start_and_exit() {
|
|
|
let num_nodes = 1;
|
|
let num_nodes = 1;
|
|
|
let cluster = LocalCluster::new_with_equal_stakes(
|
|
let cluster = LocalCluster::new_with_equal_stakes(
|
|
|
num_nodes,
|
|
num_nodes,
|
|
|
- DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
|
|
+ DEFAULT_MINT_LAMPORTS,
|
|
|
DEFAULT_NODE_STAKE,
|
|
DEFAULT_NODE_STAKE,
|
|
|
SocketAddrSpace::Unspecified,
|
|
SocketAddrSpace::Unspecified,
|
|
|
);
|
|
);
|
|
@@ -126,7 +126,6 @@ fn test_local_cluster_start_and_exit_with_config() {
|
|
|
NUM_NODES,
|
|
NUM_NODES,
|
|
|
),
|
|
),
|
|
|
node_stakes: vec![DEFAULT_NODE_STAKE; NUM_NODES],
|
|
node_stakes: vec![DEFAULT_NODE_STAKE; NUM_NODES],
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
ticks_per_slot: 8,
|
|
ticks_per_slot: 8,
|
|
|
slots_per_epoch: MINIMUM_SLOTS_PER_EPOCH,
|
|
slots_per_epoch: MINIMUM_SLOTS_PER_EPOCH,
|
|
|
stakers_slot_offset: MINIMUM_SLOTS_PER_EPOCH,
|
|
stakers_slot_offset: MINIMUM_SLOTS_PER_EPOCH,
|
|
@@ -144,7 +143,7 @@ fn test_spend_and_verify_all_nodes_1() {
|
|
|
let num_nodes = 1;
|
|
let num_nodes = 1;
|
|
|
let local = LocalCluster::new_with_equal_stakes(
|
|
let local = LocalCluster::new_with_equal_stakes(
|
|
|
num_nodes,
|
|
num_nodes,
|
|
|
- DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
|
|
+ DEFAULT_MINT_LAMPORTS,
|
|
|
DEFAULT_NODE_STAKE,
|
|
DEFAULT_NODE_STAKE,
|
|
|
SocketAddrSpace::Unspecified,
|
|
SocketAddrSpace::Unspecified,
|
|
|
);
|
|
);
|
|
@@ -166,7 +165,7 @@ fn test_spend_and_verify_all_nodes_2() {
|
|
|
let num_nodes = 2;
|
|
let num_nodes = 2;
|
|
|
let local = LocalCluster::new_with_equal_stakes(
|
|
let local = LocalCluster::new_with_equal_stakes(
|
|
|
num_nodes,
|
|
num_nodes,
|
|
|
- DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
|
|
+ DEFAULT_MINT_LAMPORTS,
|
|
|
DEFAULT_NODE_STAKE,
|
|
DEFAULT_NODE_STAKE,
|
|
|
SocketAddrSpace::Unspecified,
|
|
SocketAddrSpace::Unspecified,
|
|
|
);
|
|
);
|
|
@@ -188,7 +187,7 @@ fn test_spend_and_verify_all_nodes_3() {
|
|
|
let num_nodes = 3;
|
|
let num_nodes = 3;
|
|
|
let local = LocalCluster::new_with_equal_stakes(
|
|
let local = LocalCluster::new_with_equal_stakes(
|
|
|
num_nodes,
|
|
num_nodes,
|
|
|
- DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
|
|
+ DEFAULT_MINT_LAMPORTS,
|
|
|
DEFAULT_NODE_STAKE,
|
|
DEFAULT_NODE_STAKE,
|
|
|
SocketAddrSpace::Unspecified,
|
|
SocketAddrSpace::Unspecified,
|
|
|
);
|
|
);
|
|
@@ -209,7 +208,7 @@ fn test_local_cluster_signature_subscribe() {
|
|
|
let num_nodes = 2;
|
|
let num_nodes = 2;
|
|
|
let cluster = LocalCluster::new_with_equal_stakes(
|
|
let cluster = LocalCluster::new_with_equal_stakes(
|
|
|
num_nodes,
|
|
num_nodes,
|
|
|
- DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
|
|
+ DEFAULT_MINT_LAMPORTS,
|
|
|
DEFAULT_NODE_STAKE,
|
|
DEFAULT_NODE_STAKE,
|
|
|
SocketAddrSpace::Unspecified,
|
|
SocketAddrSpace::Unspecified,
|
|
|
);
|
|
);
|
|
@@ -299,7 +298,7 @@ fn test_two_unbalanced_stakes() {
|
|
|
let mut cluster = LocalCluster::new(
|
|
let mut cluster = LocalCluster::new(
|
|
|
&mut ClusterConfig {
|
|
&mut ClusterConfig {
|
|
|
node_stakes: vec![DEFAULT_NODE_STAKE * 100, DEFAULT_NODE_STAKE],
|
|
node_stakes: vec![DEFAULT_NODE_STAKE * 100, DEFAULT_NODE_STAKE],
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS + DEFAULT_NODE_STAKE * 100,
|
|
|
|
|
|
|
+ mint_lamports: DEFAULT_MINT_LAMPORTS + DEFAULT_NODE_STAKE * 100,
|
|
|
validator_configs: make_identical_validator_configs(&validator_config, 2),
|
|
validator_configs: make_identical_validator_configs(&validator_config, 2),
|
|
|
ticks_per_slot: num_ticks_per_slot,
|
|
ticks_per_slot: num_ticks_per_slot,
|
|
|
slots_per_epoch: num_slots_per_epoch,
|
|
slots_per_epoch: num_slots_per_epoch,
|
|
@@ -330,7 +329,7 @@ fn test_forwarding() {
|
|
|
// will be have to be forwarded in order to be confirmed
|
|
// will be have to be forwarded in order to be confirmed
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
node_stakes: vec![DEFAULT_NODE_STAKE * 100, DEFAULT_NODE_STAKE],
|
|
node_stakes: vec![DEFAULT_NODE_STAKE * 100, DEFAULT_NODE_STAKE],
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS + DEFAULT_NODE_STAKE * 100,
|
|
|
|
|
|
|
+ mint_lamports: DEFAULT_MINT_LAMPORTS + DEFAULT_NODE_STAKE * 100,
|
|
|
validator_configs: make_identical_validator_configs(
|
|
validator_configs: make_identical_validator_configs(
|
|
|
&ValidatorConfig::default_for_test(),
|
|
&ValidatorConfig::default_for_test(),
|
|
|
2,
|
|
2,
|
|
@@ -376,7 +375,6 @@ fn test_restart_node() {
|
|
|
let mut cluster = LocalCluster::new(
|
|
let mut cluster = LocalCluster::new(
|
|
|
&mut ClusterConfig {
|
|
&mut ClusterConfig {
|
|
|
node_stakes: vec![DEFAULT_NODE_STAKE],
|
|
node_stakes: vec![DEFAULT_NODE_STAKE],
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
validator_configs: vec![safe_clone_config(&validator_config)],
|
|
validator_configs: vec![safe_clone_config(&validator_config)],
|
|
|
ticks_per_slot,
|
|
ticks_per_slot,
|
|
|
slots_per_epoch,
|
|
slots_per_epoch,
|
|
@@ -417,7 +415,6 @@ fn test_mainnet_beta_cluster_type() {
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
cluster_type: ClusterType::MainnetBeta,
|
|
cluster_type: ClusterType::MainnetBeta,
|
|
|
node_stakes: vec![DEFAULT_NODE_STAKE],
|
|
node_stakes: vec![DEFAULT_NODE_STAKE],
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
validator_configs: make_identical_validator_configs(
|
|
validator_configs: make_identical_validator_configs(
|
|
|
&ValidatorConfig::default_for_test(),
|
|
&ValidatorConfig::default_for_test(),
|
|
|
1,
|
|
1,
|
|
@@ -494,7 +491,6 @@ fn test_snapshot_download() {
|
|
|
let stake = DEFAULT_NODE_STAKE;
|
|
let stake = DEFAULT_NODE_STAKE;
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
node_stakes: vec![stake],
|
|
node_stakes: vec![stake],
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
validator_configs: make_identical_validator_configs(
|
|
validator_configs: make_identical_validator_configs(
|
|
|
&leader_snapshot_test_config.validator_config,
|
|
&leader_snapshot_test_config.validator_config,
|
|
|
1,
|
|
1,
|
|
@@ -580,7 +576,6 @@ fn test_incremental_snapshot_download() {
|
|
|
let stake = DEFAULT_NODE_STAKE;
|
|
let stake = DEFAULT_NODE_STAKE;
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
node_stakes: vec![stake],
|
|
node_stakes: vec![stake],
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
validator_configs: make_identical_validator_configs(
|
|
validator_configs: make_identical_validator_configs(
|
|
|
&leader_snapshot_test_config.validator_config,
|
|
&leader_snapshot_test_config.validator_config,
|
|
|
1,
|
|
1,
|
|
@@ -758,7 +753,6 @@ fn test_incremental_snapshot_download_with_crossing_full_snapshot_interval_at_st
|
|
|
let stake = DEFAULT_NODE_STAKE;
|
|
let stake = DEFAULT_NODE_STAKE;
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
node_stakes: vec![stake],
|
|
node_stakes: vec![stake],
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
validator_configs: make_identical_validator_configs(
|
|
validator_configs: make_identical_validator_configs(
|
|
|
&leader_snapshot_test_config.validator_config,
|
|
&leader_snapshot_test_config.validator_config,
|
|
|
1,
|
|
1,
|
|
@@ -1239,7 +1233,7 @@ fn test_snapshot_restart_tower() {
|
|
|
|
|
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
node_stakes: vec![DEFAULT_NODE_STAKE * 100, DEFAULT_NODE_STAKE],
|
|
node_stakes: vec![DEFAULT_NODE_STAKE * 100, DEFAULT_NODE_STAKE],
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS + DEFAULT_NODE_STAKE * 100,
|
|
|
|
|
|
|
+ mint_lamports: DEFAULT_MINT_LAMPORTS + DEFAULT_NODE_STAKE * 100,
|
|
|
validator_configs: vec![
|
|
validator_configs: vec![
|
|
|
safe_clone_config(&leader_snapshot_test_config.validator_config),
|
|
safe_clone_config(&leader_snapshot_test_config.validator_config),
|
|
|
safe_clone_config(&validator_snapshot_test_config.validator_config),
|
|
safe_clone_config(&validator_snapshot_test_config.validator_config),
|
|
@@ -1319,7 +1313,6 @@ fn test_snapshots_blockstore_floor() {
|
|
|
|
|
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
node_stakes: vec![DEFAULT_NODE_STAKE],
|
|
node_stakes: vec![DEFAULT_NODE_STAKE],
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
validator_configs: make_identical_validator_configs(
|
|
validator_configs: make_identical_validator_configs(
|
|
|
&leader_snapshot_test_config.validator_config,
|
|
&leader_snapshot_test_config.validator_config,
|
|
|
1,
|
|
1,
|
|
@@ -1431,7 +1424,6 @@ fn test_snapshots_restart_validity() {
|
|
|
)];
|
|
)];
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
node_stakes: vec![DEFAULT_NODE_STAKE],
|
|
node_stakes: vec![DEFAULT_NODE_STAKE],
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
validator_configs: make_identical_validator_configs(
|
|
validator_configs: make_identical_validator_configs(
|
|
|
&snapshot_test_config.validator_config,
|
|
&snapshot_test_config.validator_config,
|
|
|
1,
|
|
1,
|
|
@@ -1564,7 +1556,6 @@ fn test_wait_for_max_stake() {
|
|
|
let ticks_per_slot = 32;
|
|
let ticks_per_slot = 32;
|
|
|
let num_validators = 4;
|
|
let num_validators = 4;
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
node_stakes: vec![DEFAULT_NODE_STAKE; num_validators],
|
|
node_stakes: vec![DEFAULT_NODE_STAKE; num_validators],
|
|
|
validator_configs: make_identical_validator_configs(&validator_config, num_validators),
|
|
validator_configs: make_identical_validator_configs(&validator_config, num_validators),
|
|
|
slots_per_epoch,
|
|
slots_per_epoch,
|
|
@@ -1610,7 +1601,6 @@ fn test_no_voting() {
|
|
|
..ValidatorConfig::default_for_test()
|
|
..ValidatorConfig::default_for_test()
|
|
|
};
|
|
};
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
node_stakes: vec![DEFAULT_NODE_STAKE],
|
|
node_stakes: vec![DEFAULT_NODE_STAKE],
|
|
|
validator_configs: vec![validator_config],
|
|
validator_configs: vec![validator_config],
|
|
|
..ClusterConfig::default()
|
|
..ClusterConfig::default()
|
|
@@ -1664,7 +1654,7 @@ fn test_optimistic_confirmation_violation_detection() {
|
|
|
let node_to_restart = validator_keys[1].0.pubkey();
|
|
let node_to_restart = validator_keys[1].0.pubkey();
|
|
|
|
|
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS + node_stakes.iter().sum::<u64>(),
|
|
|
|
|
|
|
+ mint_lamports: DEFAULT_MINT_LAMPORTS + node_stakes.iter().sum::<u64>(),
|
|
|
node_stakes: node_stakes.clone(),
|
|
node_stakes: node_stakes.clone(),
|
|
|
validator_configs: make_identical_validator_configs(
|
|
validator_configs: make_identical_validator_configs(
|
|
|
&ValidatorConfig::default_for_test(),
|
|
&ValidatorConfig::default_for_test(),
|
|
@@ -1887,7 +1877,6 @@ fn test_validator_saves_tower() {
|
|
|
let validator_identity_keypair = Arc::new(Keypair::new());
|
|
let validator_identity_keypair = Arc::new(Keypair::new());
|
|
|
let validator_id = validator_identity_keypair.pubkey();
|
|
let validator_id = validator_identity_keypair.pubkey();
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
node_stakes: vec![DEFAULT_NODE_STAKE],
|
|
node_stakes: vec![DEFAULT_NODE_STAKE],
|
|
|
validator_configs: vec![validator_config],
|
|
validator_configs: vec![validator_config],
|
|
|
validator_keys: Some(vec![(validator_identity_keypair.clone(), true)]),
|
|
validator_keys: Some(vec![(validator_identity_keypair.clone(), true)]),
|
|
@@ -2060,7 +2049,7 @@ fn do_test_future_tower(cluster_mode: ClusterMode) {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS + DEFAULT_NODE_STAKE * 100,
|
|
|
|
|
|
|
+ mint_lamports: DEFAULT_MINT_LAMPORTS + DEFAULT_NODE_STAKE * 100,
|
|
|
node_stakes: node_stakes.clone(),
|
|
node_stakes: node_stakes.clone(),
|
|
|
validator_configs: make_identical_validator_configs(
|
|
validator_configs: make_identical_validator_configs(
|
|
|
&ValidatorConfig::default_for_test(),
|
|
&ValidatorConfig::default_for_test(),
|
|
@@ -2225,7 +2214,7 @@ fn test_hard_fork_invalidates_tower() {
|
|
|
let validator_b_pubkey = validators[1];
|
|
let validator_b_pubkey = validators[1];
|
|
|
|
|
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS + node_stakes.iter().sum::<u64>(),
|
|
|
|
|
|
|
+ mint_lamports: DEFAULT_MINT_LAMPORTS + node_stakes.iter().sum::<u64>(),
|
|
|
node_stakes: node_stakes.clone(),
|
|
node_stakes: node_stakes.clone(),
|
|
|
validator_configs: make_identical_validator_configs(
|
|
validator_configs: make_identical_validator_configs(
|
|
|
&ValidatorConfig::default_for_test(),
|
|
&ValidatorConfig::default_for_test(),
|
|
@@ -2399,7 +2388,7 @@ fn test_hard_fork_with_gap_in_roots() {
|
|
|
..ValidatorConfig::default_for_test()
|
|
..ValidatorConfig::default_for_test()
|
|
|
};
|
|
};
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
- cluster_lamports: 100_000,
|
|
|
|
|
|
|
+ mint_lamports: 100_000,
|
|
|
node_stakes: node_stakes.clone(),
|
|
node_stakes: node_stakes.clone(),
|
|
|
validator_configs: make_identical_validator_configs(&validator_config, node_stakes.len()),
|
|
validator_configs: make_identical_validator_configs(&validator_config, node_stakes.len()),
|
|
|
validator_keys: Some(validator_keys),
|
|
validator_keys: Some(validator_keys),
|
|
@@ -2559,7 +2548,7 @@ fn test_restart_tower_rollback() {
|
|
|
let b_pubkey = validator_keys[1].0.pubkey();
|
|
let b_pubkey = validator_keys[1].0.pubkey();
|
|
|
|
|
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS + DEFAULT_NODE_STAKE * 100,
|
|
|
|
|
|
|
+ mint_lamports: DEFAULT_MINT_LAMPORTS + DEFAULT_NODE_STAKE * 100,
|
|
|
node_stakes: node_stakes.clone(),
|
|
node_stakes: node_stakes.clone(),
|
|
|
validator_configs: make_identical_validator_configs(
|
|
validator_configs: make_identical_validator_configs(
|
|
|
&ValidatorConfig::default_for_test(),
|
|
&ValidatorConfig::default_for_test(),
|
|
@@ -2712,7 +2701,7 @@ fn test_rpc_block_subscribe() {
|
|
|
let rpc_node_pubkey = &validator_keys[1].0.pubkey();
|
|
let rpc_node_pubkey = &validator_keys[1].0.pubkey();
|
|
|
|
|
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
- cluster_lamports: total_stake,
|
|
|
|
|
|
|
+ mint_lamports: total_stake,
|
|
|
node_stakes,
|
|
node_stakes,
|
|
|
validator_configs: make_identical_validator_configs(&validator_config, 2),
|
|
validator_configs: make_identical_validator_configs(&validator_config, 2),
|
|
|
validator_keys: Some(validator_keys),
|
|
validator_keys: Some(validator_keys),
|
|
@@ -2794,7 +2783,7 @@ fn test_oc_bad_signatures() {
|
|
|
|
|
|
|
|
let our_id = validator_keys.last().unwrap().0.pubkey();
|
|
let our_id = validator_keys.last().unwrap().0.pubkey();
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
- cluster_lamports: total_stake,
|
|
|
|
|
|
|
+ mint_lamports: total_stake,
|
|
|
node_stakes,
|
|
node_stakes,
|
|
|
validator_configs: make_identical_validator_configs(&validator_config, 2),
|
|
validator_configs: make_identical_validator_configs(&validator_config, 2),
|
|
|
validator_keys: Some(validator_keys),
|
|
validator_keys: Some(validator_keys),
|
|
@@ -3164,7 +3153,7 @@ fn run_test_load_program_accounts(scan_commitment: CommitmentConfig) {
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS + node_stakes.iter().sum::<u64>(),
|
|
|
|
|
|
|
+ mint_lamports: DEFAULT_MINT_LAMPORTS + node_stakes.iter().sum::<u64>(),
|
|
|
node_stakes: node_stakes.clone(),
|
|
node_stakes: node_stakes.clone(),
|
|
|
validator_configs: make_identical_validator_configs(
|
|
validator_configs: make_identical_validator_configs(
|
|
|
&ValidatorConfig::default_for_test(),
|
|
&ValidatorConfig::default_for_test(),
|
|
@@ -3321,7 +3310,7 @@ fn do_test_lockout_violation_with_or_without_tower(with_tower: bool) {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS + node_stakes.iter().sum::<u64>(),
|
|
|
|
|
|
|
+ mint_lamports: DEFAULT_MINT_LAMPORTS + node_stakes.iter().sum::<u64>(),
|
|
|
node_stakes,
|
|
node_stakes,
|
|
|
validator_configs,
|
|
validator_configs,
|
|
|
validator_keys: Some(validator_keys),
|
|
validator_keys: Some(validator_keys),
|
|
@@ -4351,7 +4340,6 @@ fn test_switch_threshold_uses_gossip_votes() {
|
|
|
fn test_listener_startup() {
|
|
fn test_listener_startup() {
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
node_stakes: vec![DEFAULT_NODE_STAKE],
|
|
node_stakes: vec![DEFAULT_NODE_STAKE],
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
num_listeners: 3,
|
|
num_listeners: 3,
|
|
|
validator_configs: make_identical_validator_configs(
|
|
validator_configs: make_identical_validator_configs(
|
|
|
&ValidatorConfig::default_for_test(),
|
|
&ValidatorConfig::default_for_test(),
|
|
@@ -4478,7 +4466,6 @@ fn test_leader_failure_4() {
|
|
|
// not generating leader schedule, and stalling the cluster.
|
|
// not generating leader schedule, and stalling the cluster.
|
|
|
let skip_warmup_slots = true;
|
|
let skip_warmup_slots = true;
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
node_stakes: vec![DEFAULT_NODE_STAKE; num_nodes],
|
|
node_stakes: vec![DEFAULT_NODE_STAKE; num_nodes],
|
|
|
validator_configs: make_identical_validator_configs(&validator_config, num_nodes),
|
|
validator_configs: make_identical_validator_configs(&validator_config, num_nodes),
|
|
|
validator_keys,
|
|
validator_keys,
|
|
@@ -4562,7 +4549,7 @@ fn test_slot_hash_expiry() {
|
|
|
validator_configs[1].voting_disabled = true;
|
|
validator_configs[1].voting_disabled = true;
|
|
|
|
|
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS + node_stakes.iter().sum::<u64>(),
|
|
|
|
|
|
|
+ mint_lamports: DEFAULT_MINT_LAMPORTS + node_stakes.iter().sum::<u64>(),
|
|
|
node_stakes,
|
|
node_stakes,
|
|
|
validator_configs,
|
|
validator_configs,
|
|
|
validator_keys: Some(validator_keys),
|
|
validator_keys: Some(validator_keys),
|
|
@@ -4802,7 +4789,7 @@ fn test_duplicate_with_pruned_ancestor() {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
let mut config = ClusterConfig {
|
|
let mut config = ClusterConfig {
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS + node_stakes.iter().sum::<u64>(),
|
|
|
|
|
|
|
+ mint_lamports: DEFAULT_MINT_LAMPORTS + node_stakes.iter().sum::<u64>(),
|
|
|
node_stakes,
|
|
node_stakes,
|
|
|
validator_configs,
|
|
validator_configs,
|
|
|
validator_keys: Some(validator_keys),
|
|
validator_keys: Some(validator_keys),
|
|
@@ -5038,7 +5025,6 @@ fn test_boot_from_local_state() {
|
|
|
|
|
|
|
|
let mut cluster_config = ClusterConfig {
|
|
let mut cluster_config = ClusterConfig {
|
|
|
node_stakes: vec![100 * DEFAULT_NODE_STAKE],
|
|
node_stakes: vec![100 * DEFAULT_NODE_STAKE],
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
validator_configs: make_identical_validator_configs(&validator1_config.validator_config, 1),
|
|
validator_configs: make_identical_validator_configs(&validator1_config.validator_config, 1),
|
|
|
..ClusterConfig::default()
|
|
..ClusterConfig::default()
|
|
|
};
|
|
};
|
|
@@ -5319,7 +5305,6 @@ fn test_boot_from_local_state_missing_archive() {
|
|
|
|
|
|
|
|
let mut cluster_config = ClusterConfig {
|
|
let mut cluster_config = ClusterConfig {
|
|
|
node_stakes: vec![100 * DEFAULT_NODE_STAKE],
|
|
node_stakes: vec![100 * DEFAULT_NODE_STAKE],
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
validator_configs: make_identical_validator_configs(&validator_config.validator_config, 1),
|
|
validator_configs: make_identical_validator_configs(&validator_config.validator_config, 1),
|
|
|
..ClusterConfig::default()
|
|
..ClusterConfig::default()
|
|
|
};
|
|
};
|
|
@@ -5842,11 +5827,8 @@ fn test_randomly_mixed_block_verification_methods_between_bootstrap_and_not() {
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
let num_nodes = BlockVerificationMethod::COUNT;
|
|
let num_nodes = BlockVerificationMethod::COUNT;
|
|
|
- let mut config = ClusterConfig::new_with_equal_stakes(
|
|
|
|
|
- num_nodes,
|
|
|
|
|
- DEFAULT_CLUSTER_LAMPORTS,
|
|
|
|
|
- DEFAULT_NODE_STAKE,
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ let mut config =
|
|
|
|
|
+ ClusterConfig::new_with_equal_stakes(num_nodes, DEFAULT_MINT_LAMPORTS, DEFAULT_NODE_STAKE);
|
|
|
|
|
|
|
|
// Overwrite block_verification_method with shuffled variants
|
|
// Overwrite block_verification_method with shuffled variants
|
|
|
let mut methods = BlockVerificationMethod::iter().collect::<Vec<_>>();
|
|
let mut methods = BlockVerificationMethod::iter().collect::<Vec<_>>();
|
|
@@ -5906,7 +5888,7 @@ fn test_invalid_forks_persisted_on_restart() {
|
|
|
|
|
|
|
|
let mut cluster = LocalCluster::new(
|
|
let mut cluster = LocalCluster::new(
|
|
|
&mut ClusterConfig {
|
|
&mut ClusterConfig {
|
|
|
- cluster_lamports: DEFAULT_CLUSTER_LAMPORTS + node_stakes.iter().sum::<u64>(),
|
|
|
|
|
|
|
+ mint_lamports: DEFAULT_MINT_LAMPORTS + node_stakes.iter().sum::<u64>(),
|
|
|
validator_configs,
|
|
validator_configs,
|
|
|
node_stakes,
|
|
node_stakes,
|
|
|
validator_keys: Some(validator_keypairs),
|
|
validator_keys: Some(validator_keypairs),
|