| Document Info | Details |
|---|---|
| Project | Hardy (Cloud-based DTN Router) |
| Repository | github.com/ricktaylor/hardy |
| Version | 1.1 |
| Status | DRAFT |
This document defines the strategic approach for verifying the hardy Delay Tolerant Networking (DTN) router. It outlines the testing methodology, environments, and tools required to ensure compliance with RFC 9171 (BPv7), RFC 9172/3 (BPSec), and RFC 9174 (TCPCLv4).
This strategy employs a Modular Verification Architecture, where individual functional areas (CBOR, BPv7, Security, Addressing) have dedicated Test Plans for Unit and Fuzz testing, culminating in System-level verification.
It is designed to verify the High-Level Requirements (HLR) and Low-Level Requirements (LLR) defined in requirements.md.
This Strategy is the parent document. Verification is executed according to the following child plans:
| Functional Area | Test Type | Document ID | Scope |
|---|---|---|---|
| CBOR | Unit | UTP-CBOR-01 |
RFC 8949 compliance, canonicalization. |
| CBOR | Fuzz | FUZZ-CBOR-01 |
Decoder robustness (Stack/OOM). |
| BPv7 Core | Unit | UTP-BPV7-01 |
RFC 9171 parsing, factories, EID logic. |
| BPv7 Core | Fuzz | FUZZ-BPV7-01 |
Bundle parsing, EID string/CBOR parsing. |
| BPv7 Core | Component | COMP-BPV7-CLI-01 |
CLI-driven verification of library logic. |
| BPSec | Unit | UTP-BPSEC-01 |
RFC 9172/3 Integrity & Confidentiality. |
| EID Patterns | Unit | UTP-PAT-01 |
Draft-05 Pattern matching logic. |
| EID Patterns | Fuzz | FUZZ-PAT-01 |
Pattern DSL parser robustness. |
| BPA Logic | Unit | UTP-BPA-01 |
BPA internal algorithms (Routing, Policy). |
| BPA Logic | Integration | PLAN-BPA-01 |
Routing, Pipeline, Performance Benchmarks. |
| BPA Pipeline | Fuzz | FUZZ-BPA-01 |
Async pipeline stability and deadlocks. |
| TCPCLv4 | Component | PLAN-TCPCL-01 |
Session state machine via duplex harness. |
| TCPCLv4 | Fuzz | FUZZ-TCPCL-01 |
Protocol stream parsing and state machine robustness. |
| TCPCLv4 Server | System | PLAN-TCPCL-SERVER-01 |
Application lifecycle, config, packaging. |
| CLA Trait | Integration | PLAN-CLA-01 |
Generic Convergence Layer Trait verification. |
| Service Trait | Integration | PLAN-SVC-01 |
Generic Application Service Trait verification. |
| Storage | Integration | PLAN-STORE-01 |
Generic Storage Trait verification. |
| Storage | Component | PLAN-SQLITE-01 |
SQLite Metadata persistence. |
| Storage | Component | PLAN-LD-01 |
Local Disk Bundle persistence. |
| API | Component | COMP-GRPC-CLIENT-01 |
Streaming gRPC interfaces (App/CLA). |
| System | System | PLAN-SERVER-01 |
Application lifecycle, config, OpenTelemetry. |
| System | Interop | PLAN-INTEROP-01 |
Interoperability with ION/DTNME/etc. (REQ-20). |
We adhere to a risk-based testing pyramid:
-
Scope: Individual Rust functions and modules (
hardy-cbor,hardy-bpv7,hardy-eid-patterns). -
Goal: Verify logic correctness, memory safety, and parsing rules against RFCs.
-
Methodology:
- Tests are mapped explicitly to LLRs and RFC sections.
- Strict separation of "Syntax/Parsing" tests from "BPA/Policy" tests.
- Verification of "Factories" (Builders/Editors) to ensure API correctness.
-
Tooling:
cargo test,tarpaulin(coverage).
-
Scope:
hardy-bpv7via CLI,hardy-tcpclvia duplex pipes, Storage via real DBs. -
Goal: Black-box verification of library logic and state machines without mocking internal implementation details.
-
Methodology:
- Shell-scripted test suites invoking the
bundlebinary. - Rust integration tests using
tokioharnesses for async modules.
- Shell-scripted test suites invoking the
-
Scope: Public-facing parsers (
CBOR,Bundle,EID,Pattern) and Async Pipelines (BPA). -
Goal: Identify crash-causing inputs, panics, memory vulnerabilities (OOM, Stack Overflow), and logic deadlocks.
-
Methodology:
- Dedicated Fuzz Plans for each target.
- Continuous execution using
cargo-fuzz(libFuzzer). - Sanitizer enabled (ASAN) runs to catch subtle memory violations.
-
Scope: Full system running in Docker/Kubernetes (
hardy-bpa-server). -
Goal: Verify component interaction (BPA <-> Storage <-> TCPCL) and Interoperability.
-
Execution: Pre-release verification in GCP Staging environment using
bpingandtshark.
-
Runner: Standard Linux x64 (GitHub Actions).
-
Dependencies: Rust Stable, OpenSSL.
To simulate a realistic cloud deployment, the following architecture is required:
-
Orchestration: GKE Autopilot or Docker Compose.
-
Topology:
Node A(Sender) ->Node B(Router/Hardy) ->Node C(Receiver).- Simulated Latency:
tc(Traffic Control) ortoxiproxyinjected between nodes.
-
Storage Backend:
- S3 (Google CLoud Storage) for bundle persistence.
- PostgreSQL for metadata persistence.
| Tool | Purpose | Source |
|---|---|---|
| cargo test | Unit test runner | Rust Standard Lib |
| cargo-fuzz | Security/Fuzz testing | Rust Embedded |
| hardy-bpv7-tools | Component Test Driver | Internal (bin/bundle) |
| bping | DTN Traffic Generation | DTN Suite |
| Wireshark | Protocol Analysis | Standard (with BPv7 plugins) |
| LocalStack | AWS/GCP mocking | Docker Hub |
| Grafana LGTM | Trace/Metric Analysis | Docker Hub (grafana/otel-lgtm) |
| Risk | Impact | Mitigation Strategy |
|---|---|---|
| Protocol Non-Compliance | Interop failure with other BPv7 implementations. | Execute the full Interoperability Test Plan (PLAN-INTEROP-01) against multiple reference implementations (ION, DTNME, etc.). |
| Parser Panics | DoS vulnerability in production. | Enforce 100% fuzz coverage on all parsers (CBOR, Bundle, EID). |
| Key Wrapping Failures | Data loss or Security breach. | Specific Unit Tests for RFC 9173 Key Wrapping (AES-KW). |
| Async Deadlocks | Router hangs under load. | Property-based fuzzing of the BPA pipeline state machine. |
Performance verification (REQ-13) is distributed across the testing hierarchy to ensure bottlenecks are identified early:
- Component Level: Micro-benchmarks for specific algorithms (e.g., Reassembly, Routing Table lookups) are defined in
PLAN-BPA-01. - System Level: End-to-end throughput, latency, and storage scalability tests (10Gbps, 1TB capacity) are defined in
PLAN-SERVER-01.