Plan1

Peer‑to‑Peer Network Exerciser for Rust systems

Plan1 helps you exercise and validate P2P behavior: bring up ephemeral swarms, script traffic patterns, measure latencies and churn, and reproduce bugs with deterministic seeds.

Get started View on GitHub

Why Plan1?

Testing peer‑to‑peer protocols in the wild is hard. Plan1 gives you controllable, scriptable scenarios to stress connections, NAT traversal, discovery, and failure modes. Use it locally or in CI to prevent regressions.

Deterministic scenarios

Seeded RNG and reproducible runs for reliable debugging.

Swarm orchestration

Spin up N nodes, configure topologies, churn rates, and message mixes.

Metrics first

Latency, throughput, failure rates, and event traces ready for export.

Rust native

Zero‑cost abstractions and async I/O built with Rust's safety guarantees.

Quick start

Clone and build:


git clone https://github.com/Jmarinis/plan1.git
cd plan1
cargo build --release
      

Launch a 5‑node swarm with a ring topology and a simple ping mix:


./target/release/plan1 run \
  --nodes 5 \
  --topology ring \
  --mix ping \
  --duration 60s \
  --seed 42 \
  --metrics out/metrics.json

# Inspect metrics
jq '.summary' out/metrics.json
      

Prefer YAML? Define a scenario file and run plan1 run -f scenario.yaml.

Project status

Actively under development. Interfaces may evolve; pin versions for CI reproducibility.