WeaveDocs
Weft
Distribution

Weft

Sharded large-blob distribution model — BLAKE3-addressed chunks under a deterministic Merkle root.

What Weft is

Weft is the off-chain data model Weave uses to distribute large immutable payloads — training datasets, model weights, video, image archives — to many peers without putting bytes on-chain. Each payload is split into fixed-size chunks, each chunk is named by its BLAKE3 hash, and the chunks are committed under a single Merkle root.

The root is the only identifier consumers need. Given the root and one peer that can serve the manifest, any peer can verify and reconstruct the original bytes.

When to use Weft

WorkloadWeft fit
Distributing model weights, datasets, images, videoStrong
Multi-gigabyte content addressed once, served many timesStrong
Tiny mutable values (KV)Use Lens
Append-only logsUse Strand
Filesystem-shaped contentUse Locus
Live streaming mediaOut of scope (Weft is for static commitments)

How Weft fits the stack

   Sigil chain commits the Weft root


   WeftManifest (signed, content-addressed)


   Ordered chunks (BLAKE3 ids, 4 MiB default)


   Peer storage: LocalWeftStore | WeftDhtStore<K>


   Discovery: DiscoveryPublisher trait


   Network: weave-dht, libp2p adapters

Weft owns the data model and the verification rules. Live network transport is provided by adapters above this crate.

Key invariants

  • Chunks are content-addressed. A chunk's id is BLAKE3(domain || bytes), where domain is the constant weave/weft/chunk/v1\n. Any byte change produces a new id.
  • Manifests are deterministic. Given the same bytes and the same ChunkConfig, two producers compute the same root.
  • Manifests are signed. The producer's DID and signature are part of the manifest. The signing payload is the manifest bytes with the signature field cleared.
  • Parity is reserved. A ParitySpec field exists for future erasure coding; the current build fails closed if parity is Some(_).

At a glance

FieldValue
Crate/packageweave-weft
Version0.1.0
Sourcemodels/weft
Default chunk size4 MiB (DEFAULT_CHUNK_SIZE)
Max chunk size64 MiB (MAX_CHUNK_SIZE)
HashBLAKE3 32-byte, hex-encoded
Manifest schemaweave.weft.manifest.v1
Discovery protocolweave.weft.availability.v1
Asynctokio (fetch path); sync (publish path)

Page map

Source modules

  • src/chunk.rs — chunking and chunk IDs
  • src/tree.rs — Merkle tree and proofs
  • src/manifest.rsWeftManifest, producer signatures
  • src/local.rsLocalWeftStore
  • src/dht.rsWeftDhtStore<K> and DhtKv
  • src/fetch.rsfetch_manifest, ChunkSource
  • src/discovery.rs — availability advertisements, DiscoveryPublisher

Spec

See specs/WEFT.md in the Weave repository for wire semantics and readiness constraints.