7.3 KiB
7.3 KiB
Status Log
2026-03-31 — FAPP: Free Appointment Propagation Protocol
Completed
- Protocol spec —
docs/specs/fapp-protocol.md: decentralized psychotherapy appointment discovery over mesh - Rust module —
crates/quicprochat-p2p/src/fapp.rs: full data structures, store, query matching, signature verification - Message types: SlotAnnounce, SlotQuery, SlotResponse, SlotReserve, SlotConfirm
- Domain model: Fachrichtung, Modalitaet, Kostentraeger, SlotType (German enum names for domain concepts)
- FappStore: in-memory cache with dedup (therapist_address + sequence), TTL expiry, signature verification, capacity limits
- Query matching: filter by Fachrichtung, Modalitaet, Kostentraeger, PLZ prefix, time range, SlotType, max_results
- Tests: 16 inline tests covering creation, signing, verification, tampering, forwarding, expiry, CBOR roundtrip, store dedup, sequence supersede, query filters (PLZ, SlotType, Kostentraeger, max_results)
- Privacy model: therapist identity public (Approbation-bound), patient queries anonymous
Design Decisions
- Extends announce.rs capability bitfield with CAP_FAPP_THERAPIST (0x0100), CAP_FAPP_RELAY (0x0200), CAP_FAPP_PATIENT (0x0400)
- Uses same signing pattern as MeshAnnounce: hop_count excluded from signature, forwarding nodes don't re-sign
- CBOR wire format consistent with existing envelope/announce code
- Location hint is PLZ only (e.g. "80331") — never exact address
- Anti-spam: Approbation hash binding, signature verification, sequence-based dedup, rate limiting, TTL enforcement
What's Next
- Integrate FAPP message handling into mesh_router.rs
- SlotReserve/SlotConfirm E2E encryption (X25519 key exchange)
- Return-path routing for anonymous SlotQuery responses
- Rate limiting per therapist address in FappStore
2026-03-30 — Implementation Sprint (S4-S5 + MLS-Lite)
Completed
- S4: Multi-hop routing —
MeshRouterwithsend(),handle_incoming(),forward(),drain_store_for() - S4: REPL commands —
/mesh trace <address>and/mesh stats - S5: Truncated addresses —
MeshEnvelopeV2with 16-byte addresses (~18% smaller) - MLS-Lite — Lightweight symmetric mode for constrained links (
mls_lite.rs) - Size measurements — Actual MLS and envelope sizes benchmarked
Actual Measured Sizes (Key Finding!)
| Component | Size | LoRa SF12 fragments |
|---|---|---|
| MLS KeyPackage | 306 bytes | 6 |
| MLS Welcome | 840 bytes | 17 |
| MLS-Lite (no sig) | 129 bytes | 3 |
| MLS-Lite (with sig) | 262 bytes | 6 |
| MeshEnvelope V1 | 410 bytes | 9 |
| MeshEnvelope V2 | 336 bytes | 7 |
| MLS KeyPackage (PQ hybrid) | 2,676 bytes | 53 |
Key insight: Classical MLS is actually LoRa-viable! 6 fragments for KeyPackage, ~14 sec for group setup at 1% duty. PQ hybrid remains impractical.
What's Next
- KeyPackage distribution over mesh (announce-based)
- Transport capability negotiation
- Real hardware testing (LoRa boards)
- MLS-Lite upgrade path to full MLS
2026-03-30 — Mesh Protocol Gap Analysis
Completed
- Created
docs/plans/mesh-protocol-gaps.md— honest assessment of QuicProChat vs. Reticulum/Meshtastic/Briar - Created
docs/src/design-rationale/mesh-protocol-comparison.md— technical comparison document - Updated
docs/positioning.md— sharper messaging + honest limitations
Key Insight
QuicProChat has best-in-class crypto AND viable mesh efficiency (for classical MLS). PQ hybrid mode needs constrained-link fallback.
Open Design Questions
- How to distribute KeyPackages over mesh without server?
- Should we implement LXMF compatibility for Reticulum interop?
2026-03-30 — Sprint 6: LoRa transport & integration demo
Completed
- Added
transport_lora.rs:LoRaConfig, Semtech-style airtime estimate,DutyCycleTracker(rolling 1 h window,eu868_one_percent()),LoRaMockMedium+LoRaTransportimplementingMeshTransport(loraname forTransportManager), LR framing with automatic fragmentation/reassembly, tests (mock roundtrip, fragmentation, duty accounting,split_for_mtu). - Example
mesh_lora_relay_demo: A (LoRa mock) → B (relay) → C (TCP) and reply path;scripts/mesh-demo.shruns it. - Wired
pub mod transport_lorainlib.rs. - Adjusted
cbor_smaller_than_jsonto assert CBOR is materially smaller than JSON (fixed overhead dominates; a strict half-JSON threshold failed on current envelope sizes).
What's next
- Optional: UART-backed
LoRaTransportbehind a feature flag (modem-specific framing). - Hardware runbook: replace mock medium with RNode / SX1262 serial when available.
2026-03-30 — Sprint 3: Announce & Discovery Protocol
Completed
- Created
MeshAnnouncestruct with Ed25519 signed announcements, CBOR wire format, hop forwarding - Created
compute_address()— SHA-256 truncation of identity key to 16-byte mesh address - Created
RoutingTablewithRoutingEntry— keyed by 16-byte address, supports lookup by address or full key, TTL-based expiry, sequence-based stale rejection - Created
AnnounceDedupfor loop prevention (address+sequence deduplication) - Created
AnnounceConfigwith sensible defaults (10min interval, 30min max age, 8 max hops) - Created
create_announce()andprocess_received_announce()— complete announce processing pipeline (verify, expiry check, dedup, routing update, propagation decision) - Capability flags: CAP_RELAY, CAP_STORE, CAP_GATEWAY, CAP_CONSTRAINED
- Tests: 17 tests across 3 modules covering signature verification, tampering, forwarding, expiry, dedup, routing updates, stale rejection, CBOR roundtrip, address determinism
- Updated lib.rs with
announce,announce_protocol,routing_tablemodules
What's Next
- S4: Multi-Hop Routing
- Integrate announce protocol with TransportManager for actual broadcast/receive loops
- Add tokio async announce loop (periodic re-announce, GC timer)
Notes
- Signature excludes
hop_count(same design as MeshEnvelope) so forwarding doesn't break verification - Protocol engine uses free functions rather than a stateful struct — simpler, more testable
- Cannot run
cargo testin this environment (no C toolchain / linker available)
2026-03-30 — Sprint 2: Transport Abstraction Layer
Completed
- Created
MeshTransporttrait withsend,recv,discover,closemethods - Created
TransportAddrenum for transport-agnostic addressing (Iroh, Socket, LoRa, Serial, Raw) - Created
TransportInfostruct for transport capability metadata - Implemented
IrohTransportwrapping irohEndpointwith same length-prefixed framing asP2pNode - Implemented
TcpTransportusing tokioTcpListener/TcpStreamwith length-prefixed framing - Implemented
TransportManagerfor multi-transport routing based on address type - Added
async-traitdependency, enabled tokionet+io-utilfeatures - Tests: TransportAddr Display formatting, TCP roundtrip, TransportManager routing, error cases
What's Next
- S3: Announce & Discovery Protocol
- Future: integrate transport layer into
HybridRouter/ replace direct iroh usage
Notes
- New transport layer sits alongside existing
P2pNode— no breaking changes IrohTransportuses separate ALPN (quicprochat/mesh/1) to avoid conflicts withP2pNode- Cannot run
cargo test/cargo clippyin this environment (no Rust toolchain installed)