RFC 9106: WEAVE - P2P Mesh Network Protocol (Core Specification)
1. OVERVIEW
WEAVE (Wireless Edge-Aware Vector Exchange) is a Latency-Based Causal Broadcast (LCB) protocol for multi-hop mesh networks with strict latency bounds and Byzantine fault tolerance. Key Properties:- P99 latency < 8ms (default), configurable 5ms-15ms
- Causal ordering: receive events after all causally-prior events
- Byzantine-resilient routing: detects and isolates faulty peers
- Multi-underlay support: WebRTC/QUIC/BLE/TCP fallback
2. PROTOCOL MODEL
2.1 Network Topology
2.2 Vector Clock Model
Each peer maintains logical timestamp:2.3 Causal Ordering
3. LATENCY-BASED CAUSAL BROADCAST ALGORITHM
3.1 Message Broadcast
3.2 Message Delivery
3.3 Pending Event Queue
4. MULTI-UNDERLAY ROUTING
4.1 Underlay Selection
Each peer maintains latency metrics per underlay:4.2 Latency-Based Route Selection
4.3 Underlay Characteristics
| Underlay | Latency | Bandwidth | Reliability | Use Case |
|---|---|---|---|---|
| WebRTC | 2-5ms | 10-100 Mbps | 99.5% | LAN P2P |
| QUIC | 5-15ms | 50-500 Mbps | 99.9% | WAN unicast |
| BLE | 50-200ms | 1 Mbps | 70% | Low-power nodes |
| TCP | 10-100ms | 1-1000 Mbps | 99% | Fallback |
5. BYZANTINE FAULT DETECTION
5.1 Anomaly Detection
Detect faulty peers by monitoring:5.2 Reputation System
5.3 Byzantine Resilience
6. CONVERGENCE GUARANTEES
6.1 Strong Eventual Consistency (SEC)
6.2 Partition Handling
7. CONVERGENCE TIME ANALYSIS
7.1 Latency Bound
P99 latency = time for message to reach 99% of peers7.2 Causal Dependency Queue
8. STATE MACHINE
9. INTEGRATION WITH FNP/VEST/TNP
9.1 Message Content
WEAVE broadcasts messages from upper layers:9.2 Clock Synchronization
10. CONFORMANCE REQUIREMENTS
All WEAVE implementations MUST:- ✅ Implement Latency-Based Causal Broadcast
- ✅ Support vector clock ordering
- ✅ Queue causal dependencies
- ✅ Support multi-underlay routing (WebRTC + fallback)
- ✅ Monitor and report latency metrics
- ✅ Detect Byzantine anomalies
- ✅ Handle network partitions correctly
- ✅ Guarantee strong eventual consistency
- ✅ Achieve P99 latency < config.max_latency_ms
11. EXAMPLES
Example 1: Causal Delivery
REFERENCES
- “Latency-Based Causal Broadcast” (distributed systems literature)
- RFC 9100: TNP (temporal ordering)
- RFC 9104: FNP (deterministic merge)
- RFC 9102: VEST (signatures)
END OF RFC 9106