Skip to content

Commit e87408c

Browse files
authored
Add smoke tests for mainnet and testnet protocol configs (#22132)
## Description Describe the changes or additions included in this PR. ## Test plan How did you test the new or updated feature? --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] gRPC: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK:
1 parent dc8b816 commit e87408c

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

crates/sui-benchmark/tests/simtest.rs

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ mod test {
3838
register_fail_point_async, register_fail_point_if, register_fail_points, sim_test,
3939
};
4040
use sui_protocol_config::{
41-
ExecutionTimeEstimateParams, PerObjectCongestionControlMode, ProtocolConfig,
41+
Chain, ExecutionTimeEstimateParams, PerObjectCongestionControlMode, ProtocolConfig,
4242
ProtocolVersion,
4343
};
4444
use sui_simulator::tempfile::TempDir;
@@ -97,10 +97,40 @@ mod test {
9797
#[sim_test(config = "test_config()")]
9898
async fn test_simulated_load_with_reconfig() {
9999
sui_protocol_config::ProtocolConfig::poison_get_for_min_version();
100-
let test_cluster = build_test_cluster(4, 1000, 1).await;
100+
let test_cluster = build_test_cluster(2, 3000, 1).await;
101101
test_simulated_load(test_cluster, 60).await;
102102
}
103103

104+
#[sim_test(config = "test_config()")]
105+
async fn test_mainnet_config() {
106+
chain_config_smoke_test(Chain::Mainnet).await;
107+
}
108+
109+
#[sim_test(config = "test_config()")]
110+
async fn test_testnet_config() {
111+
chain_config_smoke_test(Chain::Testnet).await;
112+
}
113+
114+
async fn chain_config_smoke_test(chain: Chain) {
115+
sui_protocol_config::ProtocolConfig::poison_get_for_min_version();
116+
let test_cluster = init_test_cluster_builder(2, 3000)
117+
.with_authority_overload_config(AuthorityOverloadConfig {
118+
// Disable system overload checks for the test - during tests with crashes,
119+
// it is possible for overload protection to trigger due to validators
120+
// having queued certs which are missing dependencies.
121+
check_system_overload_at_execution: false,
122+
check_system_overload_at_signing: false,
123+
..Default::default()
124+
})
125+
.with_submit_delay_step_override_millis(3000)
126+
.with_num_unpruned_validators(1)
127+
.with_chain_override(chain)
128+
.build()
129+
.await
130+
.into();
131+
test_simulated_load(test_cluster, 30).await;
132+
}
133+
104134
// Ensure that with half the committee enabling v2 and half not,
105135
// we still arrive at the same root state hash (we do not split brain
106136
// fork).

0 commit comments

Comments
 (0)