From aa7b1e939a31d7d6a5f1a9f0de8301709a9c275b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 1 Jun 2026 14:08:06 +0100 Subject: [PATCH] fix score inflation for throttled nodes (#6842) --- .../nym-network-monitor-agent/Cargo.toml | 2 +- .../nym-network-monitor-agent/src/agent/tester.rs | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/nym-network-monitor-v3/nym-network-monitor-agent/Cargo.toml b/nym-network-monitor-v3/nym-network-monitor-agent/Cargo.toml index 9500df46f1..b274b18c1f 100644 --- a/nym-network-monitor-v3/nym-network-monitor-agent/Cargo.toml +++ b/nym-network-monitor-v3/nym-network-monitor-agent/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "nym-network-monitor-agent" description = "Agent used for stress testing Nym mixnodes" -version = "1.0.3" +version = "1.0.4" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/nym-network-monitor-v3/nym-network-monitor-agent/src/agent/tester.rs b/nym-network-monitor-v3/nym-network-monitor-agent/src/agent/tester.rs index f4277ce9d4..24862d168f 100644 --- a/nym-network-monitor-v3/nym-network-monitor-agent/src/agent/tester.rs +++ b/nym-network-monitor-v3/nym-network-monitor-agent/src/agent/tester.rs @@ -350,6 +350,13 @@ impl NodeStressTester { "did not manage to send all required packets within the sending window. sent {sent}/{total_packets}" ); } + // Report `total_packets` (= expected) rather than `sent` so the orchestrator's + // `received / sent` score formula effectively becomes `received / expected` - + // a node that throttled us via TCP back-pressure into not pushing all packets + // through is correctly penalised. Per-batch `set_packets_sent(sent)` updates + // above remain in place for the `Ok(false)` early-exit (send error) path, so + // partial-progress visibility is preserved when the test aborts mid-run. + result.set_packets_sent(total_packets); Ok(true) }