1. Meshnode Host Daemon (node)

The node package (packaged as fleetmesh-node and executed as meshnode) is the production host daemon. It coordinates 29 decoupled compartments across six architectural planes, orchestrates multi-rung network transport, manages local cryptographic enclaves, and hosts the control socket interface.

1.1. Core Architectural Principles

  • Decoupled Compartments: The node is not a monolithic application. Every capability lives inside an isolated compartment declaring explicit PARAMS, CHANNELS, METRICS, COMMANDS, and STORES.

  • Six Planes: Compartments are arranged in six functional planes: * Identity: Announce, Discovery, Linked IDs, and Presence. * Peering: Session Handshake, Budgeting, Capacity Shedding, Reporter, Strain, and Trust. * Operations: Task Scheduler and Software Updates. * Services: Settlement, Paid Fetch, Sidecars, Compute Sandboxing, Compute Wire, DVM Gateways, Gossip, and nsite. * Store: Sync Reconciliation, Retention Policy, Blob Wire, and Blob Replication. * Transport: Link Watchdog, LAN Probing, P2P NAT Traversal, Sidecar Bridge, and Circuit Mediation.

  • Multi-Rung Transport Ladder: Traffic moves through a prioritized ladder of transports: 1. FIPS/DoD Rung (Rank 5): FIPS 140-3 TLS / mTLS and datagram peering. 2. Iroh Rung (Rank 10): High-speed direct QUIC connections with NAT hole punching. 3. Rhio Rung (Rank 12): NATS JetStream cluster synchronization via the Rhio sidecar. 4. P2Panda Rung (Rank 15): Peer-to-peer delivery over signed append-only operation chains. 5. Relay Rung (Rank 30): Standard Nostr relays via WebSockets (NIP-59 gift-wrap fallback).

  • Control Socket & UCAN Authorization: Local and remote control through Unix domain sockets with fine-grained capability checks.

1.2. Meshnode Subsystems

Subsystem

Documentation

Application Host

Host lifecycle, configuration assembler, control socket server, and systemd integration.

The Six Planes

Compartment implementations for Identity, Peering, Operations, Services, Store, and Transport planes.

Transport Subsystem

Router, multi-rung ladder, relay client/server, Iroh QUIC rung, and FIPS rung.

Storage Subsystem

SQLite, PostgreSQL, content locator, grant indexing, and accounting ledgers.

Pluggable Protocols

Pluggable protocol packages (fleetmesh_node.protocols) for p2panda, Rhio, Nostr, ATProto, ActivityPub, and SSB.

Nostr Protocol Layer

Relay client, peer tables, event storage, Blossom media server, and descriptor parsing.

Command Dispatcher

UCAN-gated CLI and RPC commands, subsystem command adapters, and execution context.

Compartment Framework

Component lifecycle (wired -> configured -> running -> teardown), needs, refusals, and stores.

Configuration System

Typed parameter blocks, hierarchical overrides, and atomic config change stores.

Channels & Metrics

In-memory event pub/sub bus, event journaling, Prometheus metrics, and status faces.

Keystore & Enclave

Master key derivation, seed generation, hardware enclave bindings, and signers.

Interfaces

Shared abstract interfaces and protocol boundaries.

CLI & Runner

Command-line parser, subcommands, and daemon management.

1.3. Module Documentation