* - standardise versions for all nym-sdk workspace dependencies - prepend sqlx-pool-guard with 'nym-' * Test remove nym-api from deps * Add oneliner to client_pool doc comments * Add note to commented out docs.rs link in sdk * remove nym-api from script * add publishing file * bring non-binary / contract / tools into workspace version * added more info to publishing.md * make deps workspace version * remove uploaded sphinx-types crate from script * remove erroueously included ignore-defaults * add zeroise to feature * chore: Release * add topology to batch * more cargo versioning * more cargo versioning - wasm utils * more cargo versioning - wasm utils * Add publish=false to manifest for cargo workspaces / crates.io publishing exclusion * remove script now switched to manifest based exclusion * rename import based on rename of contracts-common dep * Making workspace versions for publication + removing unnecessary crates from publication * Remove OOD info from publishing sdk guide * rename contract imports + remove package * temp commit: continuing with removal of path from cargo manifest and replacing with workspace version import for publication * continuing with cargo.toml updates * dryrun only erroring on known version problem crates * remove old published-crates file * Minor comment change * remove default features warning * Additional info on workspace dep comment re publish list * Add missing description to cargo.toml * Fix missing feature flags * Add missing descriptions * Fix remaining path import * Add workspace repo / homepage / documentation links to cargo.toml files * remove workspace version from excluded crate * Remove todo descriptions * Minor comment change * add homepage etc * move from bls git import to nym_bls_fork crate * Modify rest of imports from path to workspace import, excluding binaries * add directory/homepage info * fix cargo fmt * add notes to gitignore * better solution to contracts/ experiment * wasm -> nym_wasm crate renaming * fix fatfinger * add metadata to ecash cargo.toml * stub publishing guide * fix misrevolved netlink- version * Fixes and block publication of rebase re: LP * first pass @ workflows
Nym Network Monitor
Monitors the Nym network by sending itself packages across the mixnet.
Network monitor is running two tokio tasks, one manages mixnet clients and another manages monitoring itself. Monitor is designed to be driven externally, via an HTTP api. This means that it does not do any monitoring unless driven by something like locust. This allows us to tailor the load externally, potentially distributing it across multiple monitors.
Client manager
On start network monitor will spawn C clients, with 10 being the default. Random client is dropped every T, defaults to 60 seconds, and a new one is created. Clients chose a random gateway to connect to the mixnet. Meaning that on average all gateways will be tested in NUMBER_OF_GATEWAYS/N*T, assuming at least one request per client per T.
Network monitor API
Swagger UI is available at /v1/ui/, ie http://localhost:8080/v1/ui/
Driving the monitor with Locust
- Head over to https://locust.io/ and get
locust - Start everything
# Start the network monitor
cargo run --release
# Start locus in a separate terminal
python -m locust -H http://127.0.0.1:8080 --processes 4
- Head over to http://127.0.0.1:8089/ and start a testing run
Usage
Usage: nym-network-monitor [OPTIONS]
Options:
-C, --clients <N_CLIENTS> Number of clients to spawn [default: 10]
-T, --client-lifetime <CLIENT_LIFETIME> Lifetime of each client in seconds [default: 60]
--port <PORT> Port to listen on [default: 8080]
--host <HOST> Host to listen on [default: 127.0.0.1]
-t, --topology <TOPOLOGY> Path to the topology file
-e, --env <ENV> Path to the environment file
-m, --mixnet-timeout <MIXNET_TIMEOUT> [default: 10]
--generate-key-pair
--private-key <PRIVATE_KEY>
-h, --help Print help
-V, --version Print version