FleetMesh fleetmesh
Mesh Guide 8 Chapters
L3 Data, Replication & Content L3 Data, Replication & Content

Data, Replication & Content.

Layer 1 gave every node unforgeable identity and Layer 2 opened resilient peer-to-peer pipes. Layer 3 solves the data plane: how do peers sync only what is missing, verify every kilobyte of a stream on the fly, organize events and files into one composable graph, and keep historical shards alive without charging storage rent?

3.0 · Layer 3 Big Picture

Zero blind downloads across a self-verifying data plane

In cloud software, one central database decides what exists and streams files from a trusted CDN. In a peer-to-peer mesh, you pull history and media from dozens of strangers—some fast, some offline for days, and a few potentially corrupt or malicious.

Layer 3 turns untrusted peers into reliable mirrors by combining five open primitives: 1 KB SHA-256 Bao verified streaming, NIP-77 Negentropy logarithmic delta sync, the 8-layer Textile content graph, Blossom CAS blob mirrors, and falsifiable kind 30803 reciprocal coverage backed by pluggable local engines.

Interactive Lab 3.0 · Layer 3 Data Plane Router
Pick a real workload to trace how Layer 3 moves and verifies it
L3 L3
Companion Explainer 3.0
Layer 3: Data, Replication & Content
1 KB Bao Streaming 1 KB Bao Streaming

3.1 · Incremental Merkle Verification

1 KB SHA-256 Bao Verified Streaming

The Concept

A flat file hash forces a painful trade-off: if you stream a 2 GB video from a stranger, you cannot check whether byte #500 was tampered with until all 2,000,000,000 bytes finish downloading. Bao verified streaming turns a file into a binary Merkle tree of tiny 1,024-byte chunks rolled up to a single root hash—so every slice verifies independently the instant it arrives.

FleetMesh Implementation

  • Domain-separated 1,024 B SHA-256 leaves: Every blob commits its exact byte length into the root hash, defeating length-extension and truncation attacks.
  • Instant HTTP 206 seeking: Readers request any byte range with a compact O(log N) sibling proof and verify slice 0 in microseconds.
  • Zero-trust swarm defense: Pull chunks from multiple mirrors in parallel and cut off any corrupt peer on the very first bad kilobyte (feeding straight into Layer 4 S4 evidence).
Interactive Lab 3.1 · Real WebCrypto 1 KB Bao Merkle Verifier
Click any 1,024-byte chunk to inject 1 tampered byte and watch the proof catch it
Computing 8-chunk SHA-256 Bao Merkle tree...
Bao Bao
Companion Explainer 3.1
1 KB SHA-256 Bao Verified Streaming
NIP-77 Negentropy NIP-77 Negentropy

3.2 · Logarithmic Set Reconciliation

NIP-77 Negentropy Set Reconciliation

The Concept

How do two peers holding 50,000 events discover the 12 events one side missed while offline? Asking for “everything since yesterday” misses backfilled history and breaks on clock skew, while sending all 50,000 IDs wastes megabytes. Negentropy sorts records by timestamp and ID, hashes entire spans into 16-byte range fingerprints, and recursively splits only the spans that differ.

FleetMesh Implementation

  • O(log N) timestamp bisection: Matching time spans skip in a single 16-byte modular-sum fingerprint check; only divergent buckets bisect down to exact missing IDs.
  • Encrypted DIDComm sync/1.0: Carries the full Negentropy conversation (open, range, have, need, deliver, done, handover) over any Layer 2 transport.
  • Grant-metered catch-up: Reconciles offline LAN clusters and intermittent Edge nodes without blowing past Layer 4 bilateral byte limits.
Interactive Lab 3.2 · NIP-77 Negentropy Range Bisection Stepper
Step through reconciling 10,000 events when only 3 events are missing
Negentropy Negentropy
Companion Explainer 3.2
NIP-77 Negentropy Set Reconciliation
8-Layer Textile Model 8-Layer Textile Model

3.3 · FM-11 Unified Content Graph

8-Layer Textile Content Model

The Concept

Raw files and isolated chat events are too flat to express rich applications like threaded discussions, curated media playlists, software packages, and local retention policies. Textile (FM-11) gives the mesh one shared grammar—layering immutable bytes upward into signed pointers, ordered sequences, typed schemas, curated collections, full app bundles, local quotas, and clean deletions.

FleetMesh Implementation

  • Bottom weave (Fiber → Strand → Spool): Immutable 1 KB Bao Fibers get signed kind 30821 Strands and ordered Spools.
  • App structures (Fabric → Quilt → Suit): Typed Fabrics, multi-author curated Quilts, and portable sovereign application Suits.
  • Local governance (Fit → Tombstone): Per-node Fit disk quotas and signed logical Tombstones (plus experimental blinded tombstones for private Circles) implemented in @fleetmesh/textile.
Interactive Lab 3.3 · 8-Layer Textile Graph Inspector (FM-11)
Click any layer from Fiber to Tombstone to inspect its role and wire structure
Textile Textile
Companion Explainer 3.3
8-Layer Textile Content Model (FM-11)
Blossom CAS Blossom CAS

3.4 · Content-Addressed Blob Mirrors

Blossom CAS (BUD-01 – BUD-04)

The Concept

Normal web media URLs tie a file to one company’s domain—if that host dies or bans you, every link breaks forever. Blossom turns ordinary HTTP servers into interchangeable Content-Addressable Storage (CAS) mirrors where every blob lives at /<sha256>, so clients can fetch the identical verified bytes from any mirror still online.

FleetMesh Implementation

  • Location-independent retrieval (BUD-01): Clients fetch blobs by SHA-256 hash and verify every slice via 1 KB Bao proofs.
  • Zero-password Nostr auth (BUD-02): Uploads, lists, and deletes authorize with short-lived, BIP-340 signed kind 24242 events bound to exact hash and expiration.
  • Server lists & mirroring (BUD-03 / BUD-04): Users publish preferred mirrors in kind 10063 while Anchors mirror shards server-to-server under opt-in blob_bytes ceilings.
Interactive Lab 3.4 · Blossom BUD-01..04 Wire & Auth Inspector
Inspect each Blossom operation and its signed kind 24242 authorization envelope
Blossom Blossom
Companion Explainer 3.4
Blossom Content-Addressable Storage (BUD-01..04)
Reciprocal Coverage & Storage Reciprocal Coverage & Storage

3.5 · Falsifiable Shards & Pluggable Backends

Reciprocal Coverage & Storage Engines

The Concept

Unlike transit (a continuous flow) or compute (a finite job), long-term storage is an open-ended promise about the future—making perpetual storage rent brittle and dispute-prone. Instead, communities that mutually care about a shard replicate it reciprocally, advertising exactly which time windows and kinds they hold so peers can sample and verify honesty over time.

FleetMesh Implementation

  • Signed coverage claims (kind 30803): Declares retained time windows, event kinds, and blob namespaces as either falsifiable asserted or best-effort.
  • Zero default storage rent: Standard grants ship with blob_bytes = 0 and settlement = none; any future payment settles strictly on atomic verified retrieval (see storage.html).
  • 4 pluggable storage backends: Zero-dependency SQLite (default), PostgreSQL (psycopg), the C++/LMDB strfry bridge, and IndexedDB in browser Leaves.
Interactive Lab 3.5 · Coverage Claim (kind 30803) & Backend Selector
Compare storage backends and inspect each node’s signed coverage claim
Reciprocal Storage Reciprocal Storage
Companion Explainer 3.5
Reciprocal Coverage & Pluggable Storage Engines