|
|
@@ -108,7 +108,7 @@ use {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_local_cluster_start_and_exit() {
|
|
|
- solana_logger::setup();
|
|
|
+ agave_logger::setup();
|
|
|
let num_nodes = 1;
|
|
|
let cluster = LocalCluster::new_with_equal_stakes(
|
|
|
num_nodes,
|
|
|
@@ -122,7 +122,7 @@ fn test_local_cluster_start_and_exit() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_local_cluster_start_and_exit_with_config() {
|
|
|
- solana_logger::setup();
|
|
|
+ agave_logger::setup();
|
|
|
const NUM_NODES: usize = 1;
|
|
|
let mut config = ClusterConfig {
|
|
|
validator_configs: make_identical_validator_configs(
|
|
|
@@ -142,7 +142,7 @@ fn test_local_cluster_start_and_exit_with_config() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_spend_and_verify_all_nodes_1() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
error!("test_spend_and_verify_all_nodes_1");
|
|
|
let num_nodes = 1;
|
|
|
let local = LocalCluster::new_with_equal_stakes(
|
|
|
@@ -164,7 +164,7 @@ fn test_spend_and_verify_all_nodes_1() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_spend_and_verify_all_nodes_2() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
error!("test_spend_and_verify_all_nodes_2");
|
|
|
let num_nodes = 2;
|
|
|
let local = LocalCluster::new_with_equal_stakes(
|
|
|
@@ -186,7 +186,7 @@ fn test_spend_and_verify_all_nodes_2() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_spend_and_verify_all_nodes_3() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
error!("test_spend_and_verify_all_nodes_3");
|
|
|
let num_nodes = 3;
|
|
|
let local = LocalCluster::new_with_equal_stakes(
|
|
|
@@ -208,7 +208,7 @@ fn test_spend_and_verify_all_nodes_3() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_local_cluster_signature_subscribe() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
let num_nodes = 2;
|
|
|
let cluster = LocalCluster::new_with_equal_stakes(
|
|
|
num_nodes,
|
|
|
@@ -291,7 +291,7 @@ fn test_local_cluster_signature_subscribe() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_two_unbalanced_stakes() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
error!("test_two_unbalanced_stakes");
|
|
|
let validator_config = ValidatorConfig::default_for_test();
|
|
|
let num_ticks_per_second = 100;
|
|
|
@@ -327,7 +327,7 @@ fn test_two_unbalanced_stakes() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_forwarding() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
// Set up a cluster where one node is never the leader, so all txs sent to this node
|
|
|
// will be have to be forwarded in order to be confirmed
|
|
|
let mut config = ClusterConfig {
|
|
|
@@ -370,7 +370,7 @@ fn test_forwarding() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_restart_node() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
error!("test_restart_node");
|
|
|
let slots_per_epoch = MINIMUM_SLOTS_PER_EPOCH * 2;
|
|
|
let ticks_per_slot = 16;
|
|
|
@@ -413,7 +413,7 @@ fn test_restart_node() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_mainnet_beta_cluster_type() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
|
|
|
let mut config = ClusterConfig {
|
|
|
cluster_type: ClusterType::MainnetBeta,
|
|
|
@@ -481,7 +481,7 @@ fn test_mainnet_beta_cluster_type() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_snapshot_download() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
// First set up the cluster with 1 node
|
|
|
let snapshot_interval_slots = NonZeroU64::new(50).unwrap();
|
|
|
let num_account_paths = 3;
|
|
|
@@ -556,7 +556,7 @@ fn test_snapshot_download() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_incremental_snapshot_download() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
// First set up the cluster with 1 node
|
|
|
let incremental_snapshot_interval = 9;
|
|
|
let full_snapshot_interval = incremental_snapshot_interval * 3;
|
|
|
@@ -729,7 +729,7 @@ fn test_incremental_snapshot_download() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_incremental_snapshot_download_with_crossing_full_snapshot_interval_at_startup() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
// If these intervals change, also make sure to change the loop timers accordingly.
|
|
|
let incremental_snapshot_interval = 9;
|
|
|
let full_snapshot_interval = incremental_snapshot_interval * 5;
|
|
|
@@ -1237,7 +1237,7 @@ fn test_incremental_snapshot_download_with_crossing_full_snapshot_interval_at_st
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_snapshot_restart_tower() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
// First set up the cluster with 2 nodes
|
|
|
let snapshot_interval_slots = NonZeroU64::new(10).unwrap();
|
|
|
let num_account_paths = 2;
|
|
|
@@ -1310,7 +1310,7 @@ fn test_snapshot_restart_tower() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_snapshots_blockstore_floor() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
// First set up the cluster with 1 snapshotting leader
|
|
|
let snapshot_interval_slots = NonZeroU64::new(100).unwrap();
|
|
|
let num_account_paths = 4;
|
|
|
@@ -1423,7 +1423,7 @@ fn test_snapshots_blockstore_floor() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_snapshots_restart_validity() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
let snapshot_interval_slots = NonZeroU64::new(100).unwrap();
|
|
|
let num_account_paths = 1;
|
|
|
let mut snapshot_test_config =
|
|
|
@@ -1512,7 +1512,7 @@ fn test_snapshots_restart_validity() {
|
|
|
#[allow(unused_attributes)]
|
|
|
#[ignore]
|
|
|
fn test_fail_entry_verification_leader() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
let leader_stake = (DUPLICATE_THRESHOLD * 100.0) as u64 + 1;
|
|
|
let validator_stake1 = (100 - leader_stake) / 2;
|
|
|
let validator_stake2 = 100 - leader_stake - validator_stake1;
|
|
|
@@ -1534,7 +1534,7 @@ fn test_fail_entry_verification_leader() {
|
|
|
#[ignore]
|
|
|
#[allow(unused_attributes)]
|
|
|
fn test_fake_shreds_broadcast_leader() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
let node_stakes = vec![300, 100];
|
|
|
let (cluster, _) = test_faulty_node(
|
|
|
BroadcastStageType::BroadcastFakeShreds,
|
|
|
@@ -1552,7 +1552,7 @@ fn test_fake_shreds_broadcast_leader() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_wait_for_max_stake() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
let validator_config = ValidatorConfig::default_for_test();
|
|
|
let slots_per_epoch = MINIMUM_SLOTS_PER_EPOCH;
|
|
|
// Set this large enough to allow for skipped slots but still be able to
|
|
|
@@ -1610,7 +1610,7 @@ fn test_wait_for_max_stake() {
|
|
|
// Test that when a leader is leader for banks B_i..B_{i+n}, and B_i is not
|
|
|
// votable, then B_{i+1} still chains to B_i
|
|
|
fn test_no_voting() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
let validator_config = ValidatorConfig {
|
|
|
voting_disabled: true,
|
|
|
..ValidatorConfig::default_for_test()
|
|
|
@@ -1650,7 +1650,7 @@ fn test_no_voting() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_optimistic_confirmation_violation_detection() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
// First set up the cluster with 2 nodes
|
|
|
let slots_per_epoch = 2048;
|
|
|
let node_stakes = vec![50 * DEFAULT_NODE_STAKE, 51 * DEFAULT_NODE_STAKE];
|
|
|
@@ -1887,7 +1887,7 @@ fn test_optimistic_confirmation_violation_detection() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_validator_saves_tower() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
|
|
|
let validator_config = ValidatorConfig {
|
|
|
require_tower: true,
|
|
|
@@ -2037,7 +2037,7 @@ enum ClusterMode {
|
|
|
}
|
|
|
|
|
|
fn do_test_future_tower(cluster_mode: ClusterMode) {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
|
|
|
// First set up the cluster with 4 nodes
|
|
|
let slots_per_epoch = 2048;
|
|
|
@@ -2205,7 +2205,7 @@ fn restart_whole_cluster_after_hard_fork(
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_hard_fork_invalidates_tower() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
|
|
|
// First set up the cluster with 2 nodes
|
|
|
let slots_per_epoch = 2048;
|
|
|
@@ -2378,7 +2378,7 @@ fn create_snapshot_to_hard_fork(
|
|
|
#[ignore]
|
|
|
#[serial]
|
|
|
fn test_hard_fork_with_gap_in_roots() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
|
|
|
// First set up the cluster with 2 nodes
|
|
|
let slots_per_epoch = 2048;
|
|
|
@@ -2545,7 +2545,7 @@ fn test_restart_tower_rollback() {
|
|
|
// Test node crashing and failing to save its tower before restart
|
|
|
// Cluster continues to make progress, this node is able to rejoin with
|
|
|
// outdated tower post restart.
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
|
|
|
// First set up the cluster with 2 nodes
|
|
|
let slots_per_epoch = 2048;
|
|
|
@@ -2778,7 +2778,7 @@ fn test_rpc_block_subscribe() {
|
|
|
#[serial]
|
|
|
#[allow(unused_attributes)]
|
|
|
fn test_oc_bad_signatures() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
|
|
|
let total_stake = 100 * DEFAULT_NODE_STAKE;
|
|
|
let leader_stake = (total_stake as f64 * VOTE_THRESHOLD_SIZE) as u64;
|
|
|
@@ -3150,7 +3150,7 @@ fn setup_transfer_scan_threads(
|
|
|
}
|
|
|
|
|
|
fn run_test_load_program_accounts(scan_commitment: CommitmentConfig) {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
// First set up the cluster with 2 nodes
|
|
|
let slots_per_epoch = 2048;
|
|
|
let node_stakes = vec![51 * DEFAULT_NODE_STAKE, 50 * DEFAULT_NODE_STAKE];
|
|
|
@@ -3265,7 +3265,7 @@ fn test_lockout_violation_without_tower() {
|
|
|
// `A` should not be able to generate a switching proof.
|
|
|
//
|
|
|
fn do_test_lockout_violation_with_or_without_tower(with_tower: bool) {
|
|
|
- solana_logger::setup_with("info");
|
|
|
+ agave_logger::setup_with("info");
|
|
|
|
|
|
// First set up the cluster with 4 nodes
|
|
|
let slots_per_epoch = 2048;
|
|
|
@@ -3545,7 +3545,7 @@ fn do_test_lockout_violation_with_or_without_tower(with_tower: bool) {
|
|
|
// stalling the network.
|
|
|
|
|
|
fn test_fork_choice_refresh_old_votes() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
let max_switch_threshold_failure_pct = 1.0 - 2.0 * SWITCH_FORK_THRESHOLD;
|
|
|
let total_stake = 100 * DEFAULT_NODE_STAKE;
|
|
|
let max_failures_stake = (max_switch_threshold_failure_pct * total_stake as f64) as u64;
|
|
|
@@ -3942,7 +3942,7 @@ fn test_duplicate_shreds_broadcast_leader_ancestor_hashes() {
|
|
|
}
|
|
|
|
|
|
fn run_duplicate_shreds_broadcast_leader(vote_on_duplicate: bool) {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
// Create 4 nodes:
|
|
|
// 1) Bad leader sending different versions of shreds to both of the other nodes
|
|
|
// 2) 1 node who's voting behavior in gossip
|
|
|
@@ -4120,7 +4120,7 @@ fn run_duplicate_shreds_broadcast_leader(vote_on_duplicate: bool) {
|
|
|
#[serial]
|
|
|
#[ignore]
|
|
|
fn test_switch_threshold_uses_gossip_votes() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
let total_stake = 100 * DEFAULT_NODE_STAKE;
|
|
|
|
|
|
// Minimum stake needed to generate a switching proof
|
|
|
@@ -4449,7 +4449,7 @@ fn test_cluster_partition_1_1_1() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_leader_failure_4() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
error!("test_leader_failure_4");
|
|
|
// Cluster needs a supermajority to remain even after taking 1 node offline,
|
|
|
// so the minimum number of nodes for this test is 4.
|
|
|
@@ -4524,7 +4524,7 @@ fn test_leader_failure_4() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_slot_hash_expiry() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
solana_slot_hashes::set_entries_for_tests_only(64);
|
|
|
|
|
|
let slots_per_epoch = 2048;
|
|
|
@@ -4740,7 +4740,7 @@ fn test_slot_hash_expiry() {
|
|
|
#[serial]
|
|
|
#[ignore]
|
|
|
fn test_duplicate_with_pruned_ancestor() {
|
|
|
- solana_logger::setup_with("info,solana_metrics=off");
|
|
|
+ agave_logger::setup_with("info,solana_metrics=off");
|
|
|
solana_core::repair::duplicate_repair_status::set_ancestor_hash_repair_sample_size_for_tests_only(3);
|
|
|
|
|
|
let majority_leader_stake = 10_000_000 * DEFAULT_NODE_STAKE;
|
|
|
@@ -4984,7 +4984,7 @@ fn test_duplicate_with_pruned_ancestor() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_boot_from_local_state() {
|
|
|
- solana_logger::setup_with_default("error,local_cluster=info");
|
|
|
+ agave_logger::setup_with_default("error,local_cluster=info");
|
|
|
const FULL_SNAPSHOT_INTERVAL: SnapshotInterval =
|
|
|
SnapshotInterval::Slots(NonZeroU64::new(100).unwrap());
|
|
|
const INCREMENTAL_SNAPSHOT_INTERVAL: SnapshotInterval =
|
|
|
@@ -5279,7 +5279,7 @@ fn test_boot_from_local_state() {
|
|
|
#[test]
|
|
|
#[serial]
|
|
|
fn test_boot_from_local_state_missing_archive() {
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
const FULL_SNAPSHOT_INTERVAL: SnapshotInterval =
|
|
|
SnapshotInterval::Slots(NonZeroU64::new(20).unwrap());
|
|
|
const INCREMENTAL_SNAPSHOT_INTERVAL: SnapshotInterval =
|
|
|
@@ -5454,7 +5454,7 @@ fn test_duplicate_shreds_switch_failure() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- solana_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
+ agave_logger::setup_with_default(RUST_LOG_FILTER);
|
|
|
let validator_keypairs = [
|
|
|
"28bN3xyvrP4E8LwEgtLjhnkb7cY4amQb6DrYAbAYjgRV4GAGgkVM2K7wnxnAS7WDneuavza7x21MiafLu1HkwQt4",
|
|
|
"2saHBBoTkLMmttmPQP8KfBkcCw45S5cwtV3wTdGCscRC8uxdgvHxpHiWXKx4LvJjNJtnNcbSv5NdheokFFqnNDt8",
|
|
|
@@ -5784,7 +5784,7 @@ fn test_duplicate_shreds_switch_failure() {
|
|
|
#[serial]
|
|
|
fn test_randomly_mixed_block_verification_methods_between_bootstrap_and_not() {
|
|
|
// tailored logging just to see two block verification methods are working correctly
|
|
|
- solana_logger::setup_with_default(
|
|
|
+ agave_logger::setup_with_default(
|
|
|
"solana_metrics::metrics=warn,solana_core=warn,\
|
|
|
solana_runtime::installed_scheduler_pool=trace,solana_ledger::blockstore_processor=debug,\
|
|
|
info",
|
|
|
@@ -5817,7 +5817,7 @@ fn test_randomly_mixed_block_verification_methods_between_bootstrap_and_not() {
|
|
|
#[ignore]
|
|
|
#[serial]
|
|
|
fn test_invalid_forks_persisted_on_restart() {
|
|
|
- solana_logger::setup_with("info,solana_metrics=off,solana_ledger=off");
|
|
|
+ agave_logger::setup_with("info,solana_metrics=off,solana_ledger=off");
|
|
|
|
|
|
let dup_slot = 10;
|
|
|
let validator_keypairs = [
|