Skip to content

Latest commit

 

History

History
34 lines (31 loc) · 1.55 KB

File metadata and controls

34 lines (31 loc) · 1.55 KB

Testing & Deployment

Test pyramid

  1. Unit tests (host)tests/, run with make -C tests.
    • CRC, ringbuf, bloom, replay window, AES-CCM vectors, frame pack/unpack, dedup, fragmentation reassembly, routing decisions.
  2. Integration tests (host simulator)tools/sim/.
    • In-process N-node mesh over a virtual radio with packet loss + delay.
    • Scenarios: 3-node line, 5-node star, partition + heal, flood attack, replay attack, route churn.
  3. Hardware-in-the-loop
    • 2-node ping (RSSI sanity).
    • 3-node forced relay (block direct path with antenna mismatch).
    • 24 h soak (memory leaks, duty-cycle accountancy).
  4. Security tests
    • KAT vectors for AES-CCM (NIST SP 800-38C).
    • Replay injection.
    • MIC fail injection → IDS reaction.
    • Flood injection (>20 fps) → blacklist.

Simulator

tools/sim/altnet_sim builds the same source tree with -DALTNET_HOST=1 and links N node instances against a virtual_radio HAL that dispatches frames in memory with configurable BER, jitter, and topology adjacency.

Deployment guide (field)

  1. Provision each node with tools/provisioner/provision.py.
  2. Place at least one gateway with WiFi access for monitoring.
  3. Verify topology in the dashboard — every node should see ≥ 2 neighbors for resilience.
  4. Tune SF: SF7 for dense urban (<500 m), SF9 default, SF12 only for long-range fixed nodes (heavy duty-cycle penalty).
  5. Set realm NK and admin pubkey identical across all nodes.
  6. Smoke test: send broadcast ping, expect ACKs from N-1 nodes.