Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2bfc447
wip
kpop-dfinity Feb 9, 2026
215553b
clean up BUILD
kpop-dfinity Feb 9, 2026
ebdda5c
fix
kpop-dfinity Feb 9, 2026
840f2c9
fix tests
kpop-dfinity Feb 10, 2026
e4f457a
fix more tests
kpop-dfinity Feb 10, 2026
f2aa618
even more test fixes...
kpop-dfinity Feb 10, 2026
6eab7d7
clippy
kpop-dfinity Feb 10, 2026
6a54a98
rm tokio
kpop-dfinity Feb 10, 2026
8d04803
.
kpop-dfinity Feb 10, 2026
03ea2a5
.
kpop-dfinity Feb 10, 2026
9859a90
.
kpop-dfinity Feb 11, 2026
0216b76
RegistryClientImpl -> FakeRegistryClient
kpop-dfinity Feb 11, 2026
65815b3
rm tokio
kpop-dfinity Feb 11, 2026
2efbc28
fix cargo.toml dependency name
kpop-dfinity Feb 11, 2026
edd7d89
Merge branch 'master' into kpop/feat/nns_size
kpop-dfinity Feb 11, 2026
4274c2a
Merge branch 'master' into kpop/feat/nns_size
kpop-dfinity Feb 12, 2026
0c39856
comments
kpop-dfinity Feb 16, 2026
38872e6
.
kpop-dfinity Feb 16, 2026
4062111
.
kpop-dfinity Feb 17, 2026
222a6a8
Update rs/ingress_manager/src/proptests.rs
kpop-dfinity Feb 17, 2026
ad26bb3
128 -> 64
kpop-dfinity Feb 17, 2026
a1b7fdf
make it faster
kpop-dfinity Feb 17, 2026
33ac43f
changelog
kpop-dfinity Feb 17, 2026
7c306cd
Merge branch 'kpop/feat/nns_size' into kpop/tests/adapt_consensus_per…
kpop-dfinity Feb 17, 2026
750b278
Automatically fixing code for linting and formatting issues
Feb 17, 2026
451605d
.
kpop-dfinity Feb 17, 2026
2c9d424
fix Cargo.toml
kpop-dfinity Feb 18, 2026
267a173
Merge branch 'master' into kpop/tests/adapt_consensus_performance
kpop-dfinity Feb 24, 2026
9430286
fix merge
kpop-dfinity Feb 24, 2026
90b754c
fix fix merge
kpop-dfinity Feb 24, 2026
89814ea
.
kpop-dfinity Feb 24, 2026
9448e86
more metrics
kpop-dfinity Feb 25, 2026
54268a2
.
kpop-dfinity Feb 25, 2026
3f25926
comments
kpop-dfinity Feb 27, 2026
f2dc851
named enum
kpop-dfinity Feb 27, 2026
5f8a46c
clippy
kpop-dfinity Mar 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 56 additions & 13 deletions rs/tests/consensus/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@rules_rust//rust:defs.bzl", "rust_library")
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library")
load("//rs/tests:common.bzl", "CANISTER_SANDBOX_RUNTIME_DEPS", "COUNTER_CANISTER_RUNTIME_DEPS", "IMPERSONATE_UPSTREAMS_RUNTIME_DEPS", "MESSAGE_CANISTER_RUNTIME_DEPS", "UNIVERSAL_CANISTER_RUNTIME_DEPS")
load("//rs/tests:system_tests.bzl", "system_test", "system_test_nns")

Expand Down Expand Up @@ -323,8 +323,26 @@ system_test(
],
)

rust_binary(
name = "consensus_performance_bin",
testonly = True,
srcs = ["consensus_performance.rs"],
deps = [
# Keep sorted.
"//rs/registry/subnet_type",
"//rs/tests/consensus/utils",
"//rs/tests/driver:ic-system-test-driver",
"//rs/types/types",
"@crate_index//:anyhow",
"@crate_index//:reqwest",
"@crate_index//:serde_json",
"@crate_index//:slog",
"@crate_index//:tokio",
],
)

system_test_nns(
name = "consensus_performance",
name = "consensus_performance_4MB",
additional_colocate_tags = [
"system_test_benchmark",
],
Expand All @@ -340,28 +358,53 @@ system_test_nns(
}),
enable_head_nns_variant = False,
enable_metrics = True,
env = {
"MAX_INGRESS_BYTES_PER_BLOCK": "4194304",
},
prometheus_vm_required_host_features = ["performance"],
tags = [
"colocate",
"manual",
],
test_driver_target = ":consensus_performance_bin",
test_timeout = "eternal",
runtime_deps = COUNTER_CANISTER_RUNTIME_DEPS | {
"IC_VERSION_FILE": "//bazel:version.txt",
"JAEGER_UVM_CONFIG_IMAGE_ZST": "//rs/tests:jaeger_uvm_config_image",
},
deps = [
# Keep sorted.
"//rs/registry/subnet_type",
"//rs/tests/consensus/utils",
"//rs/tests/driver:ic-system-test-driver",
"//rs/types/types",
"@crate_index//:anyhow",
"@crate_index//:reqwest",
"@crate_index//:serde_json",
"@crate_index//:slog",
"@crate_index//:tokio",
)

system_test_nns(
name = "consensus_performance_8MB",
additional_colocate_tags = [
"system_test_benchmark",
],
colocated_test_driver_vm_required_host_features = ["performance"],
colocated_test_driver_vm_resources = {
"vcpus": 64,
"memory_kibibytes": 512142680,
"boot_image_minimal_size_gibibytes": 500,
},
crate_features = select({
"//bazel:upload_perf_systest_results_enabled": ["upload_perf_systest_results"],
"//conditions:default": [],
}),
enable_head_nns_variant = False,
enable_metrics = True,
env = {
"MAX_INGRESS_BYTES_PER_BLOCK": "8388608",
},
prometheus_vm_required_host_features = ["performance"],
tags = [
"colocate",
"manual",
],
test_driver_target = ":consensus_performance_bin",
test_timeout = "eternal",
runtime_deps = COUNTER_CANISTER_RUNTIME_DEPS | {
"IC_VERSION_FILE": "//bazel:version.txt",
"JAEGER_UVM_CONFIG_IMAGE_ZST": "//rs/tests:jaeger_uvm_config_image",
},
)

system_test_nns(
Expand Down
44 changes: 23 additions & 21 deletions rs/tests/consensus/consensus_performance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ fn setup(env: TestEnv) {
));
}

let max_ingress_bytes: u64 = std::env::var("MAX_INGRESS_BYTES_PER_BLOCK")
.expect("`MAX_INGRESS_BYTES_PER_BLOCK` env variable must be set")
.parse()
.unwrap();

ic_builder
.with_required_host_features(vec![HostFeature::Performance])
.add_subnet(
Expand All @@ -128,6 +133,7 @@ fn setup(env: TestEnv) {
boot_image_minimal_size_gibibytes: Some(ImageSizeGiB::new(500)),
})
.with_dkg_interval_length(Height::from(DKG_INTERVAL))
.with_max_ingress_bytes_per_block(max_ingress_bytes)
.add_nodes(NODES_COUNT),
)
.setup_and_start(&env)
Expand All @@ -143,7 +149,13 @@ fn setup(env: TestEnv) {
app_subnet.apply_network_settings(NETWORK_SIMULATION);
}

fn test(env: TestEnv, message_size: usize, rps: f64) {
#[derive(Debug)]
struct TestParameters {
message_size: usize,
rps: f64,
}

fn test(env: TestEnv, TestParameters { message_size, rps }: TestParameters) {
let logger = env.logger();

// create the runtime that lives until this variable is dropped.
Expand Down Expand Up @@ -179,27 +191,17 @@ fn test(env: TestEnv, message_size: usize, rps: f64) {
LATENCY,
BANDWIDTH_MBITS * 1_000_000,
NODES_COUNT,
Some(
std::env::var("MAX_INGRESS_BYTES_PER_BLOCK")
.expect("If we are here then we know the variable has been set")
.parse()
.expect("If we are here then we know the content is parsable"),
),
&logger,
));
}
}

fn test_few_small_messages(env: TestEnv) {
test(env, 1, 1.0)
}

fn test_small_messages(env: TestEnv) {
test(env, 4_000, 500.0)
}

fn test_few_large_messages(env: TestEnv) {
test(env, 1_999_000, 1.0)
}

fn test_large_messages(env: TestEnv) {
test(env, 950_000, 4.0)
}

fn teardown(env: TestEnv) {
let should_download_prometheus_data =
std::env::var("DOWNLOAD_P8S_DATA").is_ok_and(|v| v == "true" || v == "1");
Expand All @@ -224,10 +226,10 @@ fn main() -> Result<()> {
// of 10 minutes to setup this large testnet so let's increase the timeout:
.with_timeout_per_test(Duration::from_secs(60 * 30))
.with_setup(setup)
.add_test(systest!(test_few_small_messages))
.add_test(systest!(test_small_messages))
.add_test(systest!(test_few_large_messages))
.add_test(systest!(test_large_messages))
.add_test(systest!(test; TestParameters { message_size: 1, rps: 1.0 }))
.add_test(systest!(test; TestParameters { message_size: 9_500, rps: 1_000.0 }))
.add_test(systest!(test; TestParameters { message_size: 1_999_500, rps: 1.0 }))
.add_test(systest!(test; TestParameters { message_size: 1_999_500, rps: 5.0 }))
.with_teardown(teardown)
.execute_from_args()?;
Ok(())
Expand Down
1 change: 1 addition & 0 deletions rs/tests/consensus/utils/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ rust_library(
"//rs/canister_client",
"//rs/config",
"//rs/http_utils",
"//rs/limits",
"//rs/nervous_system/common",
"//rs/nervous_system/common/test_keys",
"//rs/nns/cmc",
Expand Down
1 change: 1 addition & 0 deletions rs/tests/consensus/utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ic-base-types = { path = "../../../types/base_types" }
ic-canister-client = { path = "../../../canister_client" }
ic-config = { path = "../../../config" }
ic-http-utils = { path = "../../../http_utils" }
ic-limits = { path = "../../../limits" }
ic-management-canister-types-private = { path = "../../../types/management_canister_types" }
ic-nervous-system-common-test-keys = { path = "../../../nervous_system/common/test_keys" }
ic-nns-common = { path = "../../../nns/common" }
Expand Down
Loading
Loading