-
Notifications
You must be signed in to change notification settings - Fork 0
06 Delay Tolerant Networking and Bundle Forwarding
Corresponding Specifications:
sys-arch/06-dtn-store-carry-forward-architecture.md
Key Crates:crates/siar-dtn-bundle,crates/siar-dtn,crates/siar-storage
When two nodes are physically partitioned with no direct radio path and no Internet relay, SIAR utilizes Delay-Tolerant Networking (DTN). Any participating device (or solar-powered repeater) acts as a physical data mule:
[Sender Alice]
| (BLE / Wi-Fi direct transfer)
v
[Carrier Mule Bob] ==== (Bob walks/drives 5 km) ====> [Carrier Mule Bob]
| (Radio transfer)
v
[Recipient Charlie]
Bundles are immutable, self-contained protocol units encapsulated with forwarding metadata. To preserve metadata privacy across untrusted intermediate carriers, destination and source identities are masked using unlinkable RouteToken identifiers rather than raw public keys:
pub struct DtnBundle {
pub bundle_id: BundleId, // BLAKE3 deterministic hash of envelope
pub source: RouteToken, // Unlinkable rotating route token
pub destination: DtnDestination, // Unlinkable RouteToken or MulticastTopic
pub created_at: Timestamp, // Monotonic Unix timestamp
pub expires_at: Timestamp, // Enforced TTL expiration time
pub hop_limit: u8, // Decremented at each hop
pub replication_budget: u8, // Remaining copies for binary spray
pub custody_requested: bool, // Hop-by-hop custody transfer flag
pub priority: DtnPriority, // Emergency, Interactive, Bulk, Background
pub storage_class: StorageClass, // Flash persistent vs RAM ephemeral
pub payload: PayloadReference, // Typed ref: EventId, BlobId, or Inline bytes
pub integrity: BundleIntegrity, // Ed25519 signature & transcript hash
}Implemented in siar-dtn-bundle, [forwarding::decide_forwarding] selects the optimal routing decision based on link type, peer capabilities, and forwarding class:
graph TD
BundleArrival[Inbound DTN Bundle] --> CheckDest{Is Peer Final Destination?}
CheckDest -->|Yes| DirectDeliver[Direct Delivery Preemption: Transmit & Deliver]
CheckDest -->|No| StrategySelect{Evaluate ForwardingClass}
StrategySelect -->|DirectOnly| HoldStorage[Hold in Storage until Destination in Direct Range]
StrategySelect -->|GatewayPreference| CheckGateway{Is Peer an Internet Gateway?}
CheckGateway -->|Yes| FwdGateway[Forward Bundle to Gateway Node]
CheckGateway -->|No| HoldOrSpray[Fallback Hold / Conservative Local Mule]
StrategySelect -->|SprayAndWait| SprayCheck{Budget > 1?}
SprayCheck -->|Yes| BinarySplit[Binary Spray: Share half budget with encountered peer]
SprayCheck -->|No (Wait Phase)| DirectOnlyWait[Retain sole copy; wait for final destination]
-
Spray Phase: The sender initializes the bundle with
$L$ copies (e.g.,$L = 8$ ). - When the carrier encounters a new node
$M$ that does not have the bundle:- The carrier gives
$\lfloor L / 2 \rfloor$ copies to node$M$ . - The carrier retains
$\lceil L / 2 \rceil$ copies.
- The carrier gives
-
Wait Phase: When
$L = 1$ , the node will only transmit the bundle directly to the final destination. - Outcome: Achieves delivery delays comparable to Epidemic routing while consuming only a tiny fraction of total network transmissions.
To guarantee delivery without accumulating unbounded bundle duplicates across the mesh:
-
Custody Acceptance: When an intermediate mule accepts custody of a bundle, it sends a signed
CustodyReceiptback to the forwarder. - Release of Responsibility: The forwarder can now safely prune the bundle from its high-priority storage.
-
Delivery Tombstones: When the destination node receives and decrypts the bundle, it emits a
DeliveryTombstone. As the tombstone gossips across the mesh, mules purge the corresponding bundle from local cache.
SIAR — Survivable Identity & Autonomous Routing
Open Source Mesh & DTN Communications Platform | Dual Licensed under MIT / Apache-2.0 / Commercial
Documentation Index • GitHub Repository • System Specifications
- 04-Autonomous-Routing-and-Policy-Engine
- 05-Proximity-and-Hardware-Transports
- 06-Delay-Tolerant-Networking-and-Bundle-Forwarding
- 07-Battery-Aware-Scheduling-and-Emergency-Mesh
- 08-Offline-Event-Log-and-Outbox-Engine
- 09-Robust-Blob-Storage-and-Chunk-Transfers
- 10-Crash-Recovery-and-Data-Portability
- 11-Realtime-Audio-Video-Calling-Architecture
- 12-Cross-Platform-Client-Architecture
- 13-Messaging-Timeline-Composer-and-Inbox
- 14-Contacts-Groups-and-Security-Center
- 15-Nearby-Discovery-and-Out-of-Band-Pairing
- 16-Notifications-Presence-and-Background-Lifecycle
- 17-Local-Knowledge-Retrieval-and-Search
- 25-Design-System-Tokens-and-Responsive-Layouts
- 26-UI-UX-Performance-Testing-and-Quality-Gates
- 18-Protocol-Extensions-and-WASM-Plugins
- 19-Headless-Daemons-and-Embedded-Nodes
- 20-C-ABI-FFI-and-Native-Language-Bindings
- 21-Testing-Fuzzing-and-Network-Diagnostics
- 22-Getting-Started-and-Developer-Guide
- 23-Off-Grid-Survival-and-Field-Operations-Guide
- 24-System-Comparison-and-Benchmarking