Skip to main content

Validation & Test Guide

EphemeralNet ships with an extensive ctest suite spanning CLI flows, storage guarantees, networking, proof-of-work, and security boundaries. Use this guide to plan test coverage, run targeted suites, and understand what each file in tests/ exercises.

Running the suite

cmake -S . -B build
cmake --build build
ctest --test-dir build

Filter by regex with ctest -R <pattern> to narrow focus (e.g., ctest -R cli_control_flow).

Test categories

PathFocus
tests/advertise_discovery.cppManifest discovery hints, manual vs. auto-advertised endpoints, conflict diagnostics.
tests/announce_abuse.cpp, tests/announce_distribution.cppANNOUNCE PoW thresholds, throttling, shard assignment under load.
tests/bootstrap.cpp, tests/bootstrap_gossip.cpp, tests/cli_bootstrap_flow.cppBootstrap process, DHT seeding, CLI orchestration against shardian bootstrap nodes.
tests/cli_*Argument parsing, config layering, fetch directory behaviour, interleaved args, error surfaces.
tests/crypto_hardening.cpp, tests/key_schedule.cpp, tests/shamir.cppCryptographic primitives, key rotation, secret sharing.
tests/dht_buckets.cppKademlia bucket insert/evict/TTL sweeps.
tests/fetch_priority.cpp, tests/fetch_retry.cpp, tests/store_fetch_plan_rotation.cppFetch retry logic, prioritisation, plan rotation.
tests/handshake.cpp, tests/transport_handshake.cppTransport handshake PoW, protocol negotiation, session adoption.
tests/nat_node.cpp, tests/nat_traversal.cppSTUN diagnostics, relay fallback recommendations.
tests/persistent_storage.cpp, tests/ttl_audit.cppPersistence mode, secure wipe, TTL enforcement.
tests/pow_monitoring.cppMetrics accounting for handshake/store/announce PoW.
tests/protocol_*.cpp, tests/manifest_fuzz.cppProtocol and manifest encoding/decoding plus fuzz coverage.
tests/relay_client_integration.cppRelay REGISTER/CONNECT flows.
tests/secure_exchange.cpp, tests/secure_transport.cppEncryption/MAC verification and session resumption.
tests/swarm_*.cpp, tests/upload_choking*.cppSwarm fairness, choking scheduler, peer role enforcement.
tests/smoke.cppEnd-to-end store/fetch/expiry sanity check.

Quality gates

  • ctest must pass before merging; treat failures as release blockers.
  • Fuzzers (manifest_fuzz, protocol_fuzz) guard against malformed inputs; run them on release candidates.
  • Observability: integrate docs/observability dashboards and alerts so PoW counters and announce throttles raise incidents before customers notice.
  • Governance: record results of ttl-audit and pow_monitoring in compliance reports to prove TTL and PoW controls hold.

Use this validation chapter alongside the deployment and performance guides to maintain confidence that every change preserves EphemeralNet’s guarantees.