Rename nym-lp-speedtest to nym-lp-client and fix KCP bug
- Rename crate from nym-lp-speedtest to nym-lp-client - Fix KCP bug: add driver.update() call before fetch_outgoing() Without update(), KCP never moves segments from snd_queue to snd_buf - Update CLI name, about string, and user agent to match new name
This commit is contained in:
committed by
Jędrzej Stuczyński
parent
bd475b5572
commit
246d061975
Generated
+5
-5
@@ -6702,11 +6702,7 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-lp-common"
|
||||
version = "0.1.0"
|
||||
|
||||
[[package]]
|
||||
name = "nym-lp-speedtest"
|
||||
name = "nym-lp-client"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
@@ -6737,6 +6733,10 @@ dependencies = [
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-lp-common"
|
||||
version = "0.1.0"
|
||||
|
||||
[[package]]
|
||||
name = "nym-metrics"
|
||||
version = "0.1.0"
|
||||
|
||||
+1
-1
@@ -164,7 +164,7 @@ members = [
|
||||
"tools/internal/validator-status-check",
|
||||
"tools/nym-cli",
|
||||
"tools/nym-id-cli",
|
||||
"tools/nym-lp-speedtest",
|
||||
"tools/nym-lp-client",
|
||||
"tools/nym-nr-query",
|
||||
"tools/nymvisor",
|
||||
"tools/ts-rs-cli",
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
[package]
|
||||
name = "nym-lp-speedtest"
|
||||
name = "nym-lp-client"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "LP+KCP mixnet speedtest client"
|
||||
description = "LP+KCP mixnet client"
|
||||
license.workspace = true
|
||||
|
||||
[[bin]]
|
||||
name = "nym-lp-speedtest"
|
||||
name = "nym-lp-client"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
@@ -163,7 +163,7 @@ impl SpeedtestClient {
|
||||
|
||||
// Step 1: Feed payload to KCP for reliable delivery
|
||||
driver.send(payload);
|
||||
tokio::time::sleep(Duration::from_millis(10)).await;
|
||||
driver.update(10); // Process KCP state machine to produce outgoing packets
|
||||
|
||||
let outgoing = driver.fetch_outgoing();
|
||||
if outgoing.is_empty() {
|
||||
@@ -1,8 +1,7 @@
|
||||
//! LP+KCP Mixnet Speedtest Client
|
||||
//! LP+KCP Mixnet Client
|
||||
//!
|
||||
//! A client that registers with the Nym mixnet using LP transport,
|
||||
//! sends traffic through Sphinx routing with KCP framing,
|
||||
//! and measures network performance.
|
||||
//! and sends traffic through Sphinx routing with KCP framing.
|
||||
|
||||
mod client;
|
||||
mod speedtest;
|
||||
@@ -20,8 +19,8 @@ use client::SpeedtestClient;
|
||||
use topology::SpeedtestTopology;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(name = "nym-lp-speedtest")]
|
||||
#[command(about = "LP+KCP mixnet speedtest client")]
|
||||
#[command(name = "nym-lp-client")]
|
||||
#[command(about = "LP+KCP mixnet client")]
|
||||
struct Cli {
|
||||
/// Nym API URL for topology discovery
|
||||
#[arg(long, default_value = "https://validator.nymtech.net/api")]
|
||||
@@ -98,7 +97,7 @@ async fn main() -> Result<()> {
|
||||
|
||||
// Test data path through mixnet
|
||||
info!("Testing data path through mixnet...");
|
||||
let test_payload = b"Hello from nym-lp-speedtest!";
|
||||
let test_payload = b"Hello from nym-lp-client!";
|
||||
|
||||
// Test one-way send (no SURBs)
|
||||
match client.send_data(test_payload).await {
|
||||
@@ -42,7 +42,7 @@ impl SpeedtestTopology {
|
||||
info!("Fetching topology from {}", nym_api);
|
||||
|
||||
let user_agent = UserAgent {
|
||||
application: "nym-lp-speedtest".to_string(),
|
||||
application: "nym-lp-client".to_string(),
|
||||
version: VERSION.to_string(),
|
||||
platform: std::env::consts::OS.to_string(),
|
||||
git_commit: "unknown".to_string(),
|
||||
Reference in New Issue
Block a user