diff --git a/config/src/config/consensus_config.rs b/config/src/config/consensus_config.rs index bd72be00347fc8..b8ce51a5609960 100644 --- a/config/src/config/consensus_config.rs +++ b/config/src/config/consensus_config.rs @@ -102,8 +102,8 @@ impl Default for ConsensusConfig { max_sending_block_bytes: 600 * 1024, // 600 KB max_sending_block_bytes_quorum_store_override: 5 * 1024 * 1024, // 5MB max_receiving_block_txns: 10000, - max_receiving_block_txns_quorum_store_override: 2 - * MAX_SENDING_BLOCK_TXNS_QUORUM_STORE_OVERRIDE, + max_receiving_block_txns_quorum_store_override: 10000.max( + 2 * MAX_SENDING_BLOCK_TXNS_QUORUM_STORE_OVERRIDE), max_receiving_block_bytes: 3 * 1024 * 1024, // 3MB max_receiving_block_bytes_quorum_store_override: 6 * 1024 * 1024, // 6MB max_pruned_blocks_in_mem: 100, diff --git a/testsuite/forge-cli/src/main.rs b/testsuite/forge-cli/src/main.rs index e51d48039a2a68..6e11658a6a5842 100644 --- a/testsuite/forge-cli/src/main.rs +++ b/testsuite/forge-cli/src/main.rs @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 use anyhow::{format_err, Context, Result}; -use aptos_config::config::ConsensusConfig; +use aptos_config::config::{ConsensusConfig, PipelineBackpressureValues, ChainHealthBackoffValues}; use aptos_forge::{ args::TransactionTypeArg, success_criteria::{LatencyType, StateProgressThreshold, SuccessCriteria}, @@ -232,9 +232,9 @@ fn main() -> Result<()> { let suite_name: &str = args.suite.as_ref(); let suite_name = if suite_name == "land_blocking" { - "realistic_env_load_sweep" + "realistic_network_tuned_for_throughput" } else { - suite_name + panic!() }; let runtime = Runtime::new()?; @@ -494,11 +494,12 @@ fn single_test_suite(test_name: &str, duration: Duration) -> Result let single_test_suite = match test_name { // Land-blocking tests to be run on every PR: "land_blocking" => land_blocking_test_suite(duration), // to remove land_blocking, superseeded by the below - "realistic_env_max_throughput" => realistic_env_max_throughput_test_suite(duration), + "realistic_env_max_throughput" => realistic_env_max_throughput_test(duration), "compat" => compat(), "framework_upgrade" => upgrade(), // Rest of the tests: "realistic_env_load_sweep" => realistic_env_load_sweep_test(), + "realistic_network_tuned_for_throughput" => realistic_network_tuned_for_throughput_test(), "epoch_changer_performance" => epoch_changer_performance(), "state_sync_perf_fullnodes_apply_outputs" => state_sync_perf_fullnodes_apply_outputs(), "state_sync_perf_fullnodes_execute_transactions" => { @@ -1365,7 +1366,7 @@ fn land_blocking_test_suite(duration: Duration) -> ForgeConfig { } // TODO: Replace land_blocking when performance reaches on par with current land_blocking -fn realistic_env_max_throughput_test_suite(duration: Duration) -> ForgeConfig { +fn realistic_env_max_throughput_test(duration: Duration) -> ForgeConfig { ForgeConfig::default() .with_initial_validator_count(NonZeroUsize::new(20).unwrap()) .with_initial_fullnode_count(10) @@ -1418,6 +1419,45 @@ fn realistic_env_max_throughput_test_suite(duration: Duration) -> ForgeConfig { ) } +fn realistic_network_tuned_for_throughput_test() -> ForgeConfig { + ForgeConfig::default() + .with_initial_validator_count(NonZeroUsize::new(20).unwrap()) + .with_initial_fullnode_count(10) + .add_network_test(MultiRegionNetworkEmulationTest { + override_config: None, + }) + .with_node_helm_config_fn(Arc::new(move |helm_values| { + helm_values["validator"]["config"]["consensus"]["max_sending_block_txns_quorum_store_override"] = + 10000.into(); + helm_values["validator"]["config"]["consensus"]["pipeline_backpressure"] = + serde_yaml::to_value(Vec::::new()).unwrap(); + helm_values["validator"]["config"]["consensus"]["chain_health_backoff"] = + serde_yaml::to_value(Vec::::new()).unwrap(); + + helm_values["validator"]["config"]["consensus"]["quorum_store_configs"]["back_pressure"]["backlog_txn_limit_count"] = + 100000.into(); + + // Experimental storage optimizations + helm_values["validator"]["config"]["storage"]["rocksdb_configs"]["use_state_kv_db"] = true.into(); + helm_values["validator"]["config"]["storage"]["rocksdb_configs"]["use_sharded_state_merkle_db"] = true.into(); + })) + .with_success_criteria( + SuccessCriteria::new(7000) + .add_no_restarts() + .add_wait_for_catchup_s(60) + .add_system_metrics_threshold(SystemMetricsThreshold::new( + // Check that we don't use more than 12 CPU cores for 30% of the time. + MetricsThreshold::new(12, 30), + // Check that we don't use more than 10 GB of memory for 30% of the time. + MetricsThreshold::new(10 * 1024 * 1024 * 1024, 30), + )) + .add_chain_progress(StateProgressThreshold { + max_no_progress_secs: 10.0, + max_round_gap: 4, + }), + ) +} + fn pre_release_suite() -> ForgeConfig { ForgeConfig::default() .with_initial_validator_count(NonZeroUsize::new(30).unwrap())