diff --git a/docs/protocol-deep-dive.md b/docs/protocol-deep-dive.md index 9d1fc00..592ebda 100644 --- a/docs/protocol-deep-dive.md +++ b/docs/protocol-deep-dive.md @@ -51,6 +51,7 @@ One concept runs through every layer: the **[capsule](./concepts.md#capsule)** = | 6 | [The dig RPC](./protocol/dig-rpc.md) | the machine interface (JSON-RPC 2.0) | hub `retrieval`, `dig-node` | | 5 | [§21 transport & push](./protocol/transport-and-push.md) | `dig://` locator, REST, push v1 | `digstore-remote` | | 7 | [DIG Node peer network](./protocol/peer-network.md) | mTLS peer identity, NAT traversal, STUN, introducer, relay wire, peer RPC | `dig-gossip`, `dig-relay`, `dig-nat`, `dig-node` | +| 7 | [Content replication (the flywheel)](./protocol/content-replication.md) | discover holders, verify, cache, announce — every read makes a holder | `dig-dht`, `dig-download`, `dig-store-cache`, `dig-node` | | 6 | [Verification & provenance](./protocol/verification-and-provenance.md) | the four ordered integrity gates | `digstore-core::merkle`, `dig-node` | | 6 | [The blind host model](./protocol/blind-host-model.md) | provider-blindness; resolver; `/v1` control plane | hub `retrieval`/`resolver`/`api` | | — | [Conformance & parity](./protocol/conformance-and-parity.md) | the cross-impl parity discipline | frozen goldens, OpenRPC diff | @@ -75,4 +76,5 @@ A publisher **chunks + encrypts** (L1) content into a **capsule format** (L2) th - [Identity & naming](./protocol/identity-and-naming.md) — Layer 0, where the spec begins - [The dig RPC](./protocol/dig-rpc.md) — the protocol's machine interface - [DIG Node peer network](./protocol/peer-network.md) — how nodes find + reach each other (mTLS, NAT traversal, relay) +- [Content replication (the flywheel)](./protocol/content-replication.md) — how content spreads to wherever it is read - [Conformance & parity](./protocol/conformance-and-parity.md) — the cross-impl parity discipline diff --git a/docs/protocol/content-replication.md b/docs/protocol/content-replication.md new file mode 100644 index 0000000..8223d4f --- /dev/null +++ b/docs/protocol/content-replication.md @@ -0,0 +1,175 @@ +--- +sidebar_position: 14 +title: "L7 · Content replication (the flywheel)" +description: "The normative content-replication flywheel: how a DIG Node turns every read into a new holder — connect over mTLS, discover holders through the Kademlia provider DHT (find_providers) and the real-time signed holdings-announce (gossip opcode 222), fetch and merkle-verify the bytes against the chain-anchored root, admit the capsule into the bounded on-disk LRU cache (1 GiB default, pins exempt), then announce the gain so the reader becomes a discoverable holder — plus the eviction retract that keeps the holder map honest, the first-party landing gate that stops a stranger deciding what this node stores, and the untrusted-peer property that makes the loop safe: content is accepted because it verifies, never because of who served it." +keywords: + - content replication + - flywheel + - resharing + - reader becomes holder + - provider record + - find_providers + - holdings announce + - opcode 222 + - capsule cache + - LRU eviction + - retract + - merkle verification + - chain-anchored root + - untrusted peers + - no central CDN +tags: + - dig-node + - dig-dht + - dig-download + - dig-store-cache + - peer network +--- + +# Layer 7 · Content replication — the flywheel + +> **Canonical references:** `dig-node` (the composition root that wires the loop), `dig-dht` (the Kademlia provider DHT and `find_providers`), `dig-gossip` (the signed holdings-announce wire, opcode 222), `dig-download` (the multi-source, merkle-verified fetch), `dig-store-cache` (the bounded on-disk capsule cache), and `dig-store` (the `.dig` capsule format). This page is the ecosystem-wide spec for **how content spreads**; the [peer network](./peer-network) is the transport it rides, and [verification & provenance](./verification-and-provenance) is the integrity gate every stage defers to. + +DIG has **no origin server and no CDN**. A capsule is available because some set of nodes holds it, and that set is not curated by anyone — it grows wherever the content is actually read. This page specifies that mechanism. + +## The thesis: a read makes a holder + +Every stage below feeds the next, and the last stage feeds the first: + +**connect → discover → fetch + verify → cache → announce → (someone else discovers you) → …** + +The consequence is that **availability tracks demand**. A capsule nobody reads is held by its publisher. A capsule read widely is held widely, close to where it is read, with no operator deciding so and no coordination step. Churn heals the same way: a departed holder's provider record expires and is retracted, while every fresh read mints a new holder. + +Two properties make the loop safe rather than a rumour mill, and both are enforced, not assumed: + +- **Every peer is untrusted.** A holder claim is a claim. Content is accepted because it **verifies against the merkle root and the chain-anchored generation**, never because of who served it. A false claim buys the liar one failed dial. +- **A stranger cannot decide what this node stores.** Caching and announcing are side effects of a node's **own** reads. Serving another peer causes neither. + +## Stage 1 · Connect + +A node opens mutually-authenticated links to peers before it can discover or fetch anything. Peer identity is the hash of the TLS public key — `peer_id = SHA-256(TLS SubjectPublicKeyInfo DER)` — and the dial follows the ordered NAT-traversal ladder, preferring a direct path and relaying only as a last resort. + +This stage is specified in full on the [peer network](./peer-network) page. Everything below rides that same authenticated transport; there is no unauthenticated discovery or fetch traffic. + +## Stage 2 · Discover — who holds this capsule + +Discovery answers one question: **which peers hold content key X?** It has two halves, a durable one and a real-time one, and they carry different guarantees. + +### 2a · The provider DHT — durable, network-wide + +`dig-dht` is a Kademlia DHT whose values are **provider records**: "peer P holds content key K, reachable at these addresses, until `expires_at`". The content key is derived from the store id, generation root, and (for a resource) the retrieval key — the derivation and the four DHT methods are specified under [the DHT](./peer-network#dht). + +`find_providers(content)` is a **distributed iterative lookup**: the node queries the α closest contacts it knows, recurses toward peers closer to the key, converges on the k closest, and returns the union of the holder records it collected. A locally-held record is a fast path, never the whole answer. + +Two properties are load-bearing: + +- **Discovered records are hearsay.** A record learned during a lookup was asserted by some peer about some other peer, and nothing authenticated it. Such records are used on the **fetch** path — where a wrong candidate costs one failed dial, because the merkle bind catches it — and are **never re-served** in answer to another node's lookup and never republished. Only records this node holds authoritatively (the mTLS-verified announcer's own, or a signature-checked ingest) are served or published. +- **Records are TTL'd and republished.** A holder refreshes its records before they expire; a holder that stops refreshing drops out of discovery on its own. That is how the network forgets a node that went away without saying so. + +### 2b · The holdings announce — real time + +The DHT alone converges only as fast as the next PUT and the next TTL. `dig-gossip` **opcode 222, `HoldingsAnnounce`**, adds the real-time half: a **signed, batched** statement of add/remove deltas to a peer's holdings, flooded across the gossip pool, which upserts and removes provider records at receiving nodes within seconds. + +The announce is signed with the announcer's TLS leaf key over the `dig:holdings:v1` preimage, and acceptance is **fail-closed**. The wire contract — the preimage, the batch cap, and the five acceptance checks — is normative and specified on the [peer network](./peer-network) page. + +Because an inbound announce mutates another node's view of who holds what, the ingress is guarded over threat *classes* rather than individual attacks: + +| Class | What stops it | +|---|---| +| **Forged attribution** — naming another peer as a holder, or as *not* a holder | The provider identity is taken from the signature alone. No code path accepts a caller-supplied provider id, so an announcer can only ever speak about itself. | +| **Identity re-spelling** — one signer wearing many names | The peer id is canonicalized once, up front; every later comparison, map key and sink argument uses that single form. | +| **Amplification** — one cheap message causing expensive work | The ingress performs **no** egress: it never re-broadcasts, dials, probes, or fetches. Its cost is bounded local map work. | +| **Flood and Sybil eviction** — pushing an honest holder out of a full provider set | Two token buckets at one chokepoint, keyed differently (per announcing provider, and per transport sender). A rejected announcement charges neither, so the limiter cannot itself be weaponised. | +| **Replay** — resurrecting a retracted record | Two independent barriers: a per-provider monotonic sequence watermark, and a bounded-freshness check on the signed timestamp. Either alone is escapable; a removal in particular carries no expiry of its own. | +| **Self-poisoning** — replaying a node's own announce back at it | An announce attributed to the receiving node's own peer id is dropped. Only a node decides what it holds. | +| **Unbounded state** — the guard tables becoming the denial of service | A rejected announcement allocates nothing; admitted entries are capacity-bounded and evicted LRU. | + +### 2c · This is not the hop-by-hop ask + +Two different discovery mechanisms exist and they must not be confused. + +| | Provider DHT + holdings announce (this page) | Recursive hop-by-hop ask | +|---|---|---| +| **Shape** | An **iterative** Kademlia lookup: the seeker itself queries progressively closer peers and collects records. | A **transitive** ask: a peer that lacks the content asks its own peers, holding each hop's request open until its subtree answers. | +| **What comes back** | Provider *records* — holder identities and addresses. The seeker then dials a holder itself. | An answer routed back along the hops, either the bytes or the holder's dial address. | +| **Who carries the bytes** | Never the discovery path. The fetch is a separate, direct connection to a holder. | Optionally the hops themselves. | +| **Cost borne by** | The seeker. | The relaying intermediaries, which is why it needs its own bounds. | + +They have different trust and topology properties. A statement about one is not a statement about the other. + +## Stage 3 · Fetch and verify + +With a holder set in hand, `dig-download` fetches the content — from **multiple sources** where they exist, by byte range, resumable — and verifies as it goes. The [client-to-node resolution ladder](../run-a-node/point-a-consumer) governs which node a client asks in the first place; this stage governs what happens once bytes are moving. + +Verification is not a post-hoc check on the assembled result: + +- **Per-range integrity.** Each fetched range carries a merkle proof; a reassembly drawn from several peers is bound to one committed generation root, so no mixture of sources can forge a resource. +- **The proof must be complete.** The verifier requires that the named resource leaf **is** the proof's leaf, that the proof folds to its root, and that the root **is** the download's committed generation root. A half-specified binding — a proof with no root, or a root with no proof — **fails closed**. +- **A whole capsule self-verifies on install.** A capsule fetch carries no per-resource proof; its integrity comes from the capsule format's own structure. +- **The root is anchored on chain.** A generation is only ever *served as current* when its root equals the chain-anchored tip. The worst a stale or attacker-chosen root can achieve is caching a real but **older** generation — never fabricated content. + +**Verified is not the same as safe.** A capsule that verifies is exactly the bytes its publisher committed; it is still content from a stranger, and it is treated as untrusted input by everything that renders or executes it. Integrity is a statement about authorship, not about intent — see [the self-defending module](./self-defending-module) for how served content is confined. + +## Stage 4 · Cache — keep what you fetched + +A verified capsule is admitted to the node's **on-disk capsule cache** (`dig-store-cache`): + +- **Bounded, with LRU eviction.** The default capacity is **1 GiB**; it is configurable. When admitting a capsule would exceed the bound, least-recently-used capsules are evicted. +- **Pins are exempt.** A pinned capsule — a node's own published content, or one an operator chose to keep — is never reclaimed by eviction, and pins may push the cache over its nominal bound. +- **Path-based, never slurped.** A capsule can be around a gibibyte, so the cache hands out a path and consumers stream from it. +- **Admission is gated on verification.** Nothing enters the cache that did not pass stage 3. + +Two distinct paths land a capsule in the cache, and both reuse the same verified whole-store sync: + +1. **Backfill on a miss.** When a resource read is satisfied from another node, the node also pulls the **whole** capsule for that generation in the background, so the next read of that store is served locally. It is fire-and-forget — the in-flight read is never delayed — and deduplicated, so a burst of reads for the same not-yet-held store triggers one pull, not one per read. +2. **Reshare after serving.** The same landing primitive runs on the peer-serving path, subject to the gate below. + +### The first-party landing gate + +Caching and announcing are **durable side effects**, so who asked matters: + +- A **first-party** read — an operator at the local node, a CLI or SDK client — lands: it caches, and it announces. +- A read this node is performing **on behalf of a remote peer**, or one a browser reports was driven by another origin's page, **does not land**: the bytes are served, and there is no cache write, no announce, and no reshare. + +Without this gate, any stranger could choose what a node stores and what it advertises holding, by asking for it. Where a node does pull on inbound demand, that is an explicit operator opt-in and is additionally confined to the node's own keyspace neighbourhood, so it can only ever pull content near the id it already serves. + +## Stage 5 · Announce — become a holder, and stop being one honestly + +On an inventory **gain** — by whichever path put the capsule on disk — the node reconciles its provider records: it PUTs records at store and capsule granularity into the DHT and emits an opcode-222 **add** announce. It is now discoverable, and it serves the capsule over the peer RPC like any other holder. The loop is closed: the next seeker's `find_providers` returns this node. + +On an inventory **loss** — an eviction, a deletion — the node **actively retracts**. This is stronger than letting the record lapse: an active retract removes the local record immediately so this node stops asserting a holding it no longer has, rather than continuing to answer with it until a TTL elapses. A **remove** announce propagates the same fact in real time. Copies already PUT at distant peers still age out by TTL; the point of the active retract is that the node itself never lies about its own inventory. + +The advertised lifetime of an add is deliberately aligned with the DHT's own provider TTL and republish interval rather than chosen as a round number: claiming longer than the TTL is silently truncated, and claiming shorter than the republish interval would drop a still-serving holder out of discovery between refreshes. + +## Why this self-scales + +| Situation | What the flywheel does | +|---|---| +| A capsule becomes popular | Every reader that fetches it becomes a holder, so the holder set grows with demand and the publisher stops being a bottleneck. | +| Readers cluster in one region | Holders appear where the reads are, so later reads there are local. | +| A holder goes offline | Its records expire and are no longer refreshed; seekers converge on the remaining holders. | +| A holder evicts a capsule | It retracts immediately and stops advertising, so seekers are not sent to a node that will answer "no". | +| A peer lies about holding content | The seeker wastes one dial; the merkle bind means it can never receive wrong bytes, and the peer selector deranks the liar. | +| Nobody reads a capsule | It stays with its publisher, which is where a pin keeps it. Unread content costs the network nothing. | + +## Conformance + +An implementation conforms to this layer when all of the following hold: + +1. Holder discovery is a **distributed iterative** provider lookup, not a local-store read; a local hit is a fast path only. +2. Records learned during a lookup are **never re-served** in answer to another node's lookup and never republished. +3. An inbound holdings announce is accepted only on a valid signature whose derived peer id **is** the provider it speaks for, with monotonic-sequence and freshness replay barriers, per-provider and per-sender rate limits, and no egress of any kind. +4. Fetched ranges are merkle-verified against a committed generation root, with a half-specified proof-and-root binding failing closed. +5. A generation is served as current only when its root equals the chain-anchored tip. +6. The capsule cache is bounded with an eviction policy, admits only verified capsules, and exempts pins. +7. An inventory gain announces at store and capsule granularity; an inventory loss **actively retracts** rather than waiting for a TTL. +8. Cache-write, announce, and reshare occur only for first-party reads, never as a side effect of serving a remote peer. + +## Related + +- [DIG Node peer network](./peer-network) — the transport, the DHT wire, and the holdings-announce byte contract +- [Verification & provenance](./verification-and-provenance) — the ordered integrity gates every fetch defers to +- [Merkle inclusion proofs](./merkle-proofs) — the proof format the range verifier folds +- [On-chain anchoring](./on-chain-anchoring) — where the chain-anchored root comes from +- [Private retrieval (onion routing)](./onion-routing) — reading without revealing what you read +- [The dig RPC](./dig-rpc) — the availability, inventory, and range-fetch methods this layer uses diff --git a/i18n/de/docusaurus-plugin-content-docs/current/protocol-deep-dive.md b/i18n/de/docusaurus-plugin-content-docs/current/protocol-deep-dive.md index 76e9a80..f81d3e1 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/protocol-deep-dive.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/protocol-deep-dive.md @@ -63,6 +63,7 @@ capsule** definiert. | 6 | [The dig RPC](./protocol/dig-rpc.md) | die Maschinenschnittstelle (JSON-RPC 2.0) | hub `retrieval`, `dig-node` | | 5 | [§21 transport & push](./protocol/transport-and-push.md) | `dig://`-Locator, REST, Push v1 | `digstore-remote` | | 7 | [DIG Node peer network](./protocol/peer-network.md) | mTLS-Peer-Identität, NAT-Traversal, STUN, Introducer, Relay-Wire, Peer-RPC | `dig-gossip`, `dig-relay`, `dig-nat`, `dig-node` | +| 7 | [Content-Replikation (das Schwungrad)](./protocol/content-replication) | Halter finden, verifizieren, cachen, ankündigen — jeder Lesevorgang erzeugt einen neuen Halter | `dig-dht`, `dig-download`, `dig-store-cache`, `dig-node` | | 6 | [Verification & provenance](./protocol/verification-and-provenance.md) | die vier geordneten Integritäts-Gates | `digstore-core::merkle`, `dig-node` | | 6 | [The blind host model](./protocol/blind-host-model.md) | Provider-Blindheit; Resolver; `/v1`-Control-Plane | hub `retrieval`/`resolver`/`api` | | — | [Conformance & parity](./protocol/conformance-and-parity.md) | die Cross-Implementierungs-Paritätsdisziplin | eingefrorene Goldens, OpenRPC-Diff | @@ -93,4 +94,5 @@ Definition, geteilt über Produzent, Host und Verifizierer hinweg — die [C8-Pa - [Identity & naming](./protocol/identity-and-naming.md) — Schicht 0, wo die Spezifikation beginnt - [The dig RPC](./protocol/dig-rpc.md) — die Maschinenschnittstelle des Protokolls - [DIG Node peer network](./protocol/peer-network.md) — wie Nodes einander finden + erreichen (mTLS, NAT-Traversal, Relay) +- [Content-Replikation (das Schwungrad)](./protocol/content-replication) — wie sich Inhalte dorthin verbreiten, wo sie gelesen werden - [Conformance & parity](./protocol/conformance-and-parity.md) — die Cross-Implementierungs-Paritätsdisziplin diff --git a/i18n/es/docusaurus-plugin-content-docs/current/protocol-deep-dive.md b/i18n/es/docusaurus-plugin-content-docs/current/protocol-deep-dive.md index e0af515..211d538 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/protocol-deep-dive.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/protocol-deep-dive.md @@ -51,6 +51,7 @@ Un concepto atraviesa todas las capas: el **[capsule](./concepts.md#capsule)** = | 6 | [El dig RPC](./protocol/dig-rpc.md) | la interfaz de máquina (JSON-RPC 2.0) | hub `retrieval`, `dig-node` | | 5 | [Transporte y push §21](./protocol/transport-and-push.md) | localizador `dig://`, REST, push v1 | `digstore-remote` | | 7 | [Red de pares de DIG Node](./protocol/peer-network.md) | identidad de par mTLS, traversal NAT, STUN, introducer, wire de relay, RPC de par | `dig-gossip`, `dig-relay`, `dig-nat`, `dig-node` | +| 7 | [Replicación de contenido (el volante de inercia)](./protocol/content-replication) | descubrir poseedores, verificar, almacenar en caché, anunciar — cada lectura crea un poseedor | `dig-dht`, `dig-download`, `dig-store-cache`, `dig-node` | | 6 | [Verificación y procedencia](./protocol/verification-and-provenance.md) | las cuatro puertas de integridad ordenadas | `digstore-core::merkle`, `dig-node` | | 6 | [El modelo de host ciego](./protocol/blind-host-model.md) | ceguera del proveedor; resolver; plano de control `/v1` | hub `retrieval`/`resolver`/`api` | | — | [Conformidad y paridad](./protocol/conformance-and-parity.md) | la disciplina de paridad entre implementaciones | goldens congelados, diff de OpenRPC | @@ -75,4 +76,5 @@ Un publicador **fragmenta + cifra** (L1) el contenido en un **formato de capsule - [Identidad y nomenclatura](./protocol/identity-and-naming.md) — Capa 0, donde empieza la especificación - [El dig RPC](./protocol/dig-rpc.md) — la interfaz de máquina del protocolo - [Red de pares de DIG Node](./protocol/peer-network.md) — cómo los nodos se encuentran y se alcanzan entre sí (mTLS, traversal NAT, relay) +- [Replicación de contenido (el volante de inercia)](./protocol/content-replication) — cómo el contenido se propaga hasta donde se lee - [Conformidad y paridad](./protocol/conformance-and-parity.md) — la disciplina de paridad entre implementaciones diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/protocol-deep-dive.md b/i18n/fr/docusaurus-plugin-content-docs/current/protocol-deep-dive.md index 0ac50aa..59943b2 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/protocol-deep-dive.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/protocol-deep-dive.md @@ -51,6 +51,7 @@ Un concept traverse chaque couche : la **[capsule](./concepts.md#capsule)** = `( | 6 | [Le dig RPC](./protocol/dig-rpc.md) | l'interface machine (JSON-RPC 2.0) | hub `retrieval`, `dig-node` | | 5 | [Transport et push §21](./protocol/transport-and-push.md) | localisateur `dig://`, REST, push v1 | `digstore-remote` | | 7 | [Réseau de pairs DIG Node](./protocol/peer-network.md) | identité de pair mTLS, traversée NAT, STUN, introducteur, fil de relais, RPC de pair | `dig-gossip`, `dig-relay`, `dig-nat`, `dig-node` | +| 7 | [Réplication du contenu (le volant d'inertie)](./protocol/content-replication) | découvrir les détenteurs, vérifier, mettre en cache, annoncer — chaque lecture crée un détenteur | `dig-dht`, `dig-download`, `dig-store-cache`, `dig-node` | | 6 | [Vérification et provenance](./protocol/verification-and-provenance.md) | les quatre portes d'intégrité ordonnées | `digstore-core::merkle`, `dig-node` | | 6 | [Le modèle d'hébergeur aveugle](./protocol/blind-host-model.md) | cécité du fournisseur ; résolveur ; plan de contrôle `/v1` | hub `retrieval`/`resolver`/`api` | | — | [Conformité et parité](./protocol/conformance-and-parity.md) | la discipline de parité inter-implémentations | goldens figés, diff OpenRPC | @@ -75,4 +76,5 @@ Un éditeur **découpe + chiffre** (L1) le contenu dans un **format de capsule** - [Identité et nommage](./protocol/identity-and-naming.md) — Couche 0, où la spécification commence - [Le dig RPC](./protocol/dig-rpc.md) — l'interface machine du protocole - [Réseau de pairs DIG Node](./protocol/peer-network.md) — comment les nœuds se trouvent et s'atteignent (mTLS, traversée NAT, relais) +- [Réplication du contenu (le volant d'inertie)](./protocol/content-replication) — comment le contenu se propage là où il est lu - [Conformité et parité](./protocol/conformance-and-parity.md) — la discipline de parité inter-implémentations diff --git a/i18n/hi/docusaurus-plugin-content-docs/current/protocol-deep-dive.md b/i18n/hi/docusaurus-plugin-content-docs/current/protocol-deep-dive.md index f967ff8..e7b8562 100644 --- a/i18n/hi/docusaurus-plugin-content-docs/current/protocol-deep-dive.md +++ b/i18n/hi/docusaurus-plugin-content-docs/current/protocol-deep-dive.md @@ -51,6 +51,7 @@ tags: | 6 | [The dig RPC](./protocol/dig-rpc.md) | मशीन इंटरफेस (JSON-RPC 2.0) | hub `retrieval`, `dig-node` | | 5 | [§21 transport & push](./protocol/transport-and-push.md) | `dig://` locator, REST, push v1 | `digstore-remote` | | 7 | [DIG Node peer network](./protocol/peer-network.md) | mTLS peer identity, NAT traversal, STUN, introducer, relay wire, peer RPC | `dig-gossip`, `dig-relay`, `dig-nat`, `dig-node` | +| 7 | [कंटेंट प्रतिकृति (फ्लाईव्हील)](./protocol/content-replication) | धारक खोजें, सत्यापित करें, कैश करें, घोषित करें — हर पठन एक नया धारक बनाता है | `dig-dht`, `dig-download`, `dig-store-cache`, `dig-node` | | 6 | [Verification & provenance](./protocol/verification-and-provenance.md) | चार क्रमबद्ध integrity gates | `digstore-core::merkle`, `dig-node` | | 6 | [The blind host model](./protocol/blind-host-model.md) | provider-blindness; resolver; `/v1` कंट्रोल प्लेन | hub `retrieval`/`resolver`/`api` | | — | [Conformance & parity](./protocol/conformance-and-parity.md) | क्रॉस-implementation parity अनुशासन | frozen goldens, OpenRPC diff | @@ -75,4 +76,5 @@ tags: - [Identity & naming](./protocol/identity-and-naming.md) — Layer 0, जहां स्पेक शुरू होता है - [The dig RPC](./protocol/dig-rpc.md) — प्रोटोकॉल का मशीन इंटरफेस - [DIG Node peer network](./protocol/peer-network.md) — nodes एक-दूसरे को कैसे खोजते + पहुंचते हैं (mTLS, NAT traversal, relay) +- [कंटेंट प्रतिकृति (फ्लाईव्हील)](./protocol/content-replication) — सामग्री वहाँ कैसे फैलती है जहाँ उसे पढ़ा जाता है - [Conformance & parity](./protocol/conformance-and-parity.md) — क्रॉस-implementation parity अनुशासन diff --git a/i18n/id/docusaurus-plugin-content-docs/current/protocol-deep-dive.md b/i18n/id/docusaurus-plugin-content-docs/current/protocol-deep-dive.md index ef14ab1..66b50e8 100644 --- a/i18n/id/docusaurus-plugin-content-docs/current/protocol-deep-dive.md +++ b/i18n/id/docusaurus-plugin-content-docs/current/protocol-deep-dive.md @@ -51,6 +51,7 @@ Satu konsep mengalir melalui setiap lapisan: **[capsule](./concepts.md#capsule)* | 6 | [The dig RPC](./protocol/dig-rpc.md) | Antarmuka mesin (JSON-RPC 2.0) | hub `retrieval`, `dig-node` | | 5 | [§21 transport & push](./protocol/transport-and-push.md) | Locator `dig://`, REST, push v1 | `digstore-remote` | | 7 | [DIG Node peer network](./protocol/peer-network.md) | Identitas peer mTLS, NAT traversal, STUN, introducer, wire relay, RPC peer | `dig-gossip`, `dig-relay`, `dig-nat`, `dig-node` | +| 7 | [Replikasi konten (roda gila)](./protocol/content-replication) | temukan pemegang, verifikasi, cache, umumkan — setiap pembacaan menciptakan pemegang baru | `dig-dht`, `dig-download`, `dig-store-cache`, `dig-node` | | 6 | [Verification & provenance](./protocol/verification-and-provenance.md) | Empat gerbang integritas berurutan | `digstore-core::merkle`, `dig-node` | | 6 | [The blind host model](./protocol/blind-host-model.md) | Provider-blindness; resolver; control plane `/v1` | hub `retrieval`/`resolver`/`api` | | — | [Conformance & parity](./protocol/conformance-and-parity.md) | Disiplin paritas lintas-implementasi | golden yang dibekukan, diff OpenRPC | @@ -75,4 +76,5 @@ Seorang penerbit **melakukan chunking + enkripsi** (L1) konten menjadi sebuah ** - [Identity & naming](./protocol/identity-and-naming.md) — Lapisan 0, tempat spesifikasi dimulai - [The dig RPC](./protocol/dig-rpc.md) — antarmuka mesin protokolnya - [DIG Node peer network](./protocol/peer-network.md) — bagaimana node saling menemukan + menjangkau (mTLS, NAT traversal, relay) +- [Replikasi konten (roda gila)](./protocol/content-replication) — bagaimana konten menyebar ke tempat ia dibaca - [Conformance & parity](./protocol/conformance-and-parity.md) — disiplin paritas lintas-implementasi diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/protocol-deep-dive.md b/i18n/ja/docusaurus-plugin-content-docs/current/protocol-deep-dive.md index ffd45a1..b4b1c3b 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/protocol-deep-dive.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/protocol-deep-dive.md @@ -51,6 +51,7 @@ tags: | 6 | [dig RPC](./protocol/dig-rpc.md) | マシンインターフェース(JSON-RPC 2.0) | hub `retrieval`、`dig-node` | | 5 | [§21トランスポートとプッシュ](./protocol/transport-and-push.md) | `dig://`ロケーター、REST、pushバージョン1 | `digstore-remote` | | 7 | [DIG Nodeピアネットワーク](./protocol/peer-network.md) | mTLSピアアイデンティティ、NATトラバーサル、STUN、イントロデューサー、リレーワイヤー、ピアRPC | `dig-gossip`、`dig-relay`、`dig-nat`、`dig-node` | +| 7 | [コンテンツ複製(フライホイール)](./protocol/content-replication) | 保持者の発見、検証、キャッシュ、アナウンス — 読み取りごとに新たな保持者が生まれる | `dig-dht`, `dig-download`, `dig-store-cache`, `dig-node` | | 6 | [検証と来歴](./protocol/verification-and-provenance.md) | 4つの順序付き完全性ゲート | `digstore-core::merkle`、`dig-node` | | 6 | [盲目ホストモデル](./protocol/blind-host-model.md) | プロバイダーの非公開性;リゾルバー;`/v1`制御プレーン | hub `retrieval`/`resolver`/`api` | | — | [準拠性とパリティ](./protocol/conformance-and-parity.md) | 実装間のパリティ規律 | 凍結されたゴールデン、OpenRPC差分 | @@ -75,4 +76,5 @@ tags: - [アイデンティティと命名](./protocol/identity-and-naming.md) — 層0、仕様が始まる場所 - [dig RPC](./protocol/dig-rpc.md) — プロトコルのマシンインターフェース - [DIG Nodeピアネットワーク](./protocol/peer-network.md) — ノード同士がどう見つけ合い、到達し合うか(mTLS、NATトラバーサル、リレー) +- [コンテンツ複製(フライホイール)](./protocol/content-replication) — コンテンツが読まれる場所へどう広がるか - [準拠性とパリティ](./protocol/conformance-and-parity.md) — 実装間のパリティ規律 diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/protocol-deep-dive.md b/i18n/ko/docusaurus-plugin-content-docs/current/protocol-deep-dive.md index 1982a9e..569de81 100644 --- a/i18n/ko/docusaurus-plugin-content-docs/current/protocol-deep-dive.md +++ b/i18n/ko/docusaurus-plugin-content-docs/current/protocol-deep-dive.md @@ -51,6 +51,7 @@ tags: | 6 | [dig RPC](./protocol/dig-rpc.md) | 머신 인터페이스(JSON-RPC 2.0) | hub `retrieval`, `dig-node` | | 5 | [§21 전송 및 push](./protocol/transport-and-push.md) | `dig://` 로케이터, REST, push v1 | `digstore-remote` | | 7 | [DIG 노드 피어 네트워크](./protocol/peer-network.md) | mTLS 피어 식별, NAT 통과, STUN, introducer, relay wire, 피어 RPC | `dig-gossip`, `dig-relay`, `dig-nat`, `dig-node` | +| 7 | [콘텐츠 복제(플라이휠)](./protocol/content-replication) | 보유자 발견, 검증, 캐시, 공지 — 모든 읽기가 새로운 보유자를 만든다 | `dig-dht`, `dig-download`, `dig-store-cache`, `dig-node` | | 6 | [검증 및 출처 증명](./protocol/verification-and-provenance.md) | 4단계 순차 무결성 게이트 | `digstore-core::merkle`, `dig-node` | | 6 | [내용을 모르는 호스트 모델](./protocol/blind-host-model.md) | 프로바이더 블라인드성; 리졸버; `/v1` 컨트롤 플레인 | hub `retrieval`/`resolver`/`api` | | — | [정합성 및 패리티](./protocol/conformance-and-parity.md) | 구현 간 패리티 규율 | 고정된 골든 데이터, OpenRPC diff | @@ -75,4 +76,5 @@ tags: - [식별 및 네이밍](./protocol/identity-and-naming.md) — 명세가 시작되는 레이어 0 - [dig RPC](./protocol/dig-rpc.md) — 프로토콜의 머신 인터페이스 - [DIG 노드 피어 네트워크](./protocol/peer-network.md) — 노드들이 서로를 찾고 연결하는 방법(mTLS, NAT 통과, relay) +- [콘텐츠 복제(플라이휠)](./protocol/content-replication) — 콘텐츠가 읽히는 곳으로 어떻게 퍼지는가 - [정합성 및 패리티](./protocol/conformance-and-parity.md) — 구현 간 패리티 규율 diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/protocol-deep-dive.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/protocol-deep-dive.md index 0c46b60..8fe23ff 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/protocol-deep-dive.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/protocol-deep-dive.md @@ -51,6 +51,7 @@ Um conceito percorre todas as camadas: o **[capsule](./concepts.md#capsule)** = | 6 | [O dig RPC](./protocol/dig-rpc.md) | a interface de máquina (JSON-RPC 2.0) | hub `retrieval`, `dig-node` | | 5 | [Transporte e push §21](./protocol/transport-and-push.md) | localizador `dig://`, REST, push v1 | `digstore-remote` | | 7 | [Rede de peers do DIG Node](./protocol/peer-network.md) | identidade de peer mTLS, NAT traversal, STUN, introducer, wire de relay, RPC de peer | `dig-gossip`, `dig-relay`, `dig-nat`, `dig-node` | +| 7 | [Replicação de conteúdo (o volante)](./protocol/content-replication) | descobrir detentores, verificar, armazenar em cache, anunciar — cada leitura cria um detentor | `dig-dht`, `dig-download`, `dig-store-cache`, `dig-node` | | 6 | [Verificação e proveniência](./protocol/verification-and-provenance.md) | os quatro gates de integridade ordenados | `digstore-core::merkle`, `dig-node` | | 6 | [O modelo de host cego](./protocol/blind-host-model.md) | cegueira do provedor; resolver; plano de controle `/v1` | hub `retrieval`/`resolver`/`api` | | — | [Conformidade e paridade](./protocol/conformance-and-parity.md) | a disciplina de paridade entre implementações | goldens congelados, diff do OpenRPC | @@ -75,4 +76,5 @@ Um publicador **fragmenta + criptografa** (L1) o conteúdo em um **formato de ca - [Identidade e nomenclatura](./protocol/identity-and-naming.md) — Camada 0, onde a especificação começa - [O dig RPC](./protocol/dig-rpc.md) — a interface de máquina do protocolo - [Rede de peers do DIG Node](./protocol/peer-network.md) — como os nós se encontram + se alcançam (mTLS, NAT traversal, relay) +- [Replicação de conteúdo (o volante)](./protocol/content-replication) — como o conteúdo se espalha para onde é lido - [Conformidade e paridade](./protocol/conformance-and-parity.md) — a disciplina de paridade entre implementações diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/protocol-deep-dive.md b/i18n/ru/docusaurus-plugin-content-docs/current/protocol-deep-dive.md index e626799..268c0b4 100644 --- a/i18n/ru/docusaurus-plugin-content-docs/current/protocol-deep-dive.md +++ b/i18n/ru/docusaurus-plugin-content-docs/current/protocol-deep-dive.md @@ -51,6 +51,7 @@ tags: | 6 | [dig RPC](./protocol/dig-rpc.md) | машинный интерфейс (JSON-RPC 2.0) | hub `retrieval`, `dig-node` | | 5 | [Транспорт §21 и push](./protocol/transport-and-push.md) | локатор `dig://`, REST, push v1 | `digstore-remote` | | 7 | [Одноранговая сеть DIG Node](./protocol/peer-network.md) | mTLS-идентичность узла, обход NAT, STUN, интродьюсер, релейный протокол, peer RPC | `dig-gossip`, `dig-relay`, `dig-nat`, `dig-node` | +| 7 | [Репликация контента (маховик)](./protocol/content-replication) | найти держателей, проверить, закэшировать, объявить — каждое чтение создаёт держателя | `dig-dht`, `dig-download`, `dig-store-cache`, `dig-node` | | 6 | [Верификация и происхождение](./protocol/verification-and-provenance.md) | четыре упорядоченных шлюза целостности | `digstore-core::merkle`, `dig-node` | | 6 | [Модель слепого хоста](./protocol/blind-host-model.md) | слепота провайдера; резолвер; плоскость управления `/v1` | hub `retrieval`/`resolver`/`api` | | — | [Соответствие и паритет](./protocol/conformance-and-parity.md) | дисциплина паритета между реализациями | замороженные golden-файлы, диф OpenRPC | @@ -75,4 +76,5 @@ tags: - [Идентичность и именование](./protocol/identity-and-naming.md) — Слой 0, с которого начинается спецификация - [dig RPC](./protocol/dig-rpc.md) — машинный интерфейс протокола - [Одноранговая сеть DIG Node](./protocol/peer-network.md) — как узлы находят и достигают друг друга (mTLS, обход NAT, релей) +- [Репликация контента (маховик)](./protocol/content-replication) — как контент распространяется туда, где его читают - [Соответствие и паритет](./protocol/conformance-and-parity.md) — дисциплина паритета между реализациями diff --git a/i18n/tr/docusaurus-plugin-content-docs/current/protocol-deep-dive.md b/i18n/tr/docusaurus-plugin-content-docs/current/protocol-deep-dive.md index 0a5601e..feb31f2 100644 --- a/i18n/tr/docusaurus-plugin-content-docs/current/protocol-deep-dive.md +++ b/i18n/tr/docusaurus-plugin-content-docs/current/protocol-deep-dive.md @@ -51,6 +51,7 @@ Her katmanda geçen bir kavram var: **[capsule](./concepts.md#capsule)** = `(sto | 6 | [dig RPC](./protocol/dig-rpc.md) | makine arayüzü (JSON-RPC 2.0) | hub `retrieval`, `dig-node` | | 5 | [§21 aktarım & push](./protocol/transport-and-push.md) | `dig://` konumlandırıcı, REST, push v1 | `digstore-remote` | | 7 | [DIG Node eş ağı](./protocol/peer-network.md) | mTLS eş kimliği, NAT geçişi, STUN, tanıtıcı (introducer), relay teli, eş RPC'si | `dig-gossip`, `dig-relay`, `dig-nat`, `dig-node` | +| 7 | [İçerik çoğaltma (volan)](./protocol/content-replication) | tutucuları bul, doğrula, önbelleğe al, duyur — her okuma yeni bir tutucu yaratır | `dig-dht`, `dig-download`, `dig-store-cache`, `dig-node` | | 6 | [Doğrulama & köken kanıtı](./protocol/verification-and-provenance.md) | dört sıralı bütünlük geçidi | `digstore-core::merkle`, `dig-node` | | 6 | [Kör host modeli](./protocol/blind-host-model.md) | sağlayıcı-körlüğü; çözücü; `/v1` kontrol düzlemi | hub `retrieval`/`resolver`/`api` | | — | [Uygunluk & eşitlik](./protocol/conformance-and-parity.md) | çapraz-uygulama eşitlik disiplini | dondurulmuş goldenlar, OpenRPC diff'i | @@ -75,4 +76,5 @@ Bir yayıncı içeriği **parçalar + şifreler** (K1) bir **capsule formatına* - [Kimlik & adlandırma](./protocol/identity-and-naming.md) — şartnamenin başladığı Katman 0 - [dig RPC](./protocol/dig-rpc.md) — protokolün makine arayüzü - [DIG Node eş ağı](./protocol/peer-network.md) — düğümlerin birbirini nasıl bulup ulaştığı (mTLS, NAT geçişi, relay) +- [İçerik çoğaltma (volan)](./protocol/content-replication) — içeriğin okunduğu yere nasıl yayıldığı - [Uygunluk & eşitlik](./protocol/conformance-and-parity.md) — çapraz-uygulama eşitlik disiplini diff --git a/i18n/vi/docusaurus-plugin-content-docs/current/protocol-deep-dive.md b/i18n/vi/docusaurus-plugin-content-docs/current/protocol-deep-dive.md index adb845c..1c1c27b 100644 --- a/i18n/vi/docusaurus-plugin-content-docs/current/protocol-deep-dive.md +++ b/i18n/vi/docusaurus-plugin-content-docs/current/protocol-deep-dive.md @@ -51,6 +51,7 @@ Một khái niệm xuyên suốt mọi lớp: **[capsule](./concepts.md#capsule) | 6 | [dig RPC](./protocol/dig-rpc.md) | giao diện máy (JSON-RPC 2.0) | hub `retrieval`, `dig-node` | | 5 | [Vận chuyển & đẩy §21](./protocol/transport-and-push.md) | locator `dig://`, REST, push v1 | `digstore-remote` | | 7 | [Mạng peer DIG Node](./protocol/peer-network.md) | danh tính peer mTLS, xuyên NAT, STUN, introducer, wire relay, RPC peer | `dig-gossip`, `dig-relay`, `dig-nat`, `dig-node` | +| 7 | [Nhân bản nội dung (bánh đà)](./protocol/content-replication) | tìm bên nắm giữ, xác minh, lưu đệm, thông báo — mỗi lần đọc tạo ra một bên nắm giữ mới | `dig-dht`, `dig-download`, `dig-store-cache`, `dig-node` | | 6 | [Xác minh & nguồn gốc](./protocol/verification-and-provenance.md) | bốn cổng toàn vẹn theo thứ tự | `digstore-core::merkle`, `dig-node` | | 6 | [Mô hình host ẩn danh](./protocol/blind-host-model.md) | tính ẩn danh nhà cung cấp; resolver; control plane `/v1` | hub `retrieval`/`resolver`/`api` | | — | [Tuân thủ & tương đương](./protocol/conformance-and-parity.md) | kỷ luật tương đương xuyên bản triển khai | golden đông cứng, diff OpenRPC | @@ -75,4 +76,5 @@ Một người xuất bản **chia chunk + mã hóa** (L1) nội dung thành m - [Danh tính & định danh](./protocol/identity-and-naming.md) — Lớp 0, nơi đặc tả bắt đầu - [dig RPC](./protocol/dig-rpc.md) — giao diện máy của giao thức - [Mạng peer DIG Node](./protocol/peer-network.md) — cách các node tìm + tiếp cận nhau (mTLS, xuyên NAT, relay) +- [Nhân bản nội dung (bánh đà)](./protocol/content-replication) — cách nội dung lan đến nơi nó được đọc - [Tuân thủ & tương đương](./protocol/conformance-and-parity.md) — kỷ luật tương đương xuyên bản triển khai diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/protocol-deep-dive.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/protocol-deep-dive.md index 241c304..f034d33 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/protocol-deep-dive.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/protocol-deep-dive.md @@ -51,6 +51,7 @@ tags: | 6 | [dig RPC](./protocol/dig-rpc.md) | 机器接口(JSON-RPC 2.0) | hub `retrieval`、`dig-node` | | 5 | [§21 传输与推送](./protocol/transport-and-push.md) | `dig://` 定位符、REST、push v1 | `digstore-remote` | | 7 | [DIG 节点对等网络](./protocol/peer-network.md) | mTLS 对等身份、NAT 穿透、STUN、introducer、中继协议、对等 RPC | `dig-gossip`、`dig-relay`、`dig-nat`、`dig-node` | +| 7 | [内容复制(飞轮)](./protocol/content-replication) | 发现持有者、验证、缓存、公告 —— 每一次读取都会产生一个新的持有者 | `dig-dht`, `dig-download`, `dig-store-cache`, `dig-node` | | 6 | [验证与溯源](./protocol/verification-and-provenance.md) | 四道有序的完整性关卡 | `digstore-core::merkle`、`dig-node` | | 6 | [盲态主机模型](./protocol/blind-host-model.md) | 提供者匿名性;解析器;`/v1` 控制平面 | hub `retrieval`/`resolver`/`api` | | — | [一致性与对等实现](./protocol/conformance-and-parity.md) | 跨实现的一致性纪律 | 固定的黄金基准数据、OpenRPC diff | @@ -75,4 +76,5 @@ tags: - [身份与命名](./protocol/identity-and-naming.md) —— 第 0 层,规范文档的起点 - [dig RPC](./protocol/dig-rpc.md) —— 协议的机器接口 - [DIG 节点对等网络](./protocol/peer-network.md) —— 节点如何互相发现和连接(mTLS、NAT 穿透、中继) +- [内容复制(飞轮)](./protocol/content-replication) — 内容如何扩散到被读取的地方 - [一致性与对等实现](./protocol/conformance-and-parity.md) —— 跨实现的一致性纪律 diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/protocol-deep-dive.md b/i18n/zh-TW/docusaurus-plugin-content-docs/current/protocol-deep-dive.md index eed7772..444cdd3 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/protocol-deep-dive.md +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/protocol-deep-dive.md @@ -51,6 +51,7 @@ tags: | 6 | [dig RPC](./protocol/dig-rpc.md) | 機器介面(JSON-RPC 2.0) | hub `retrieval`、`dig-node` | | 5 | [§21 傳輸與推送](./protocol/transport-and-push.md) | `dig://` 定位器、REST、推送 v1 | `digstore-remote` | | 7 | [DIG 節點對等網路](./protocol/peer-network.md) | mTLS 對等身分、NAT 穿越、STUN、介紹者(introducer)、中繼傳輸協定、對等 RPC | `dig-gossip`、`dig-relay`、`dig-nat`、`dig-node` | +| 7 | [內容複製(飛輪)](./protocol/content-replication) | 發現持有者、驗證、快取、公告 —— 每一次讀取都會產生一個新的持有者 | `dig-dht`, `dig-download`, `dig-store-cache`, `dig-node` | | 6 | [驗證與來源證明](./protocol/verification-and-provenance.md) | 四道有序的完整性關卡 | `digstore-core::merkle`、`dig-node` | | 6 | [盲目主機模型](./protocol/blind-host-model.md) | 對提供者的盲目性;解析器;`/v1` 控制平面 | hub `retrieval`/`resolver`/`api` | | — | [一致性與對等驗證](./protocol/conformance-and-parity.md) | 跨實作的一致性紀律 | 固定的黃金測資、OpenRPC diff | @@ -75,4 +76,5 @@ tags: - [身分與命名](./protocol/identity-and-naming.md)——第 0 層,規格由此開始 - [dig RPC](./protocol/dig-rpc.md)——協定的機器介面 - [DIG 節點對等網路](./protocol/peer-network.md)——節點如何找到並連接彼此(mTLS、NAT 穿越、中繼) +- [內容複製(飛輪)](./protocol/content-replication) — 內容如何擴散到被讀取的地方 - [一致性與對等驗證](./protocol/conformance-and-parity.md)——跨實作的一致性紀律 diff --git a/package.json b/package.json index bd4819a..bb3168a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "docs-dig-net", - "version": "0.16.1", + "version": "0.17.0", "private": true, "scripts": { "docusaurus": "docusaurus", diff --git a/sidebars.ts b/sidebars.ts index 9ea3807..d1e206e 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -173,6 +173,7 @@ const sidebars: SidebarsConfig = { "protocol/dig-rpc", "protocol/transport-and-push", "protocol/peer-network", + "protocol/content-replication", "protocol/onion-routing", "protocol/verification-and-provenance", "protocol/blind-host-model", diff --git a/static/knowledge-graph.json b/static/knowledge-graph.json index 96b81f9..f3623de 100644 --- a/static/knowledge-graph.json +++ b/static/knowledge-graph.json @@ -784,6 +784,19 @@ "encryption" ] }, + { + "id": "/docs/protocol/content-replication", + "type": "doc", + "title": "L7 · Content replication (the flywheel)", + "url": "https://docs.dig.net/docs/protocol/content-replication", + "tags": [ + "dig-node", + "dig-dht", + "dig-download", + "dig-store-cache", + "peer network" + ] + }, { "id": "/docs/protocol/cryptography", "type": "doc", @@ -4541,6 +4554,11 @@ "to": "/docs/protocol/peer-network", "type": "see-also" }, + { + "from": "/docs/protocol-deep-dive", + "to": "/docs/protocol/content-replication", + "type": "see-also" + }, { "from": "/docs/protocol-deep-dive", "to": "/docs/protocol/conformance-and-parity", diff --git a/static/llms.txt b/static/llms.txt index 3a023ad..5c794c1 100644 --- a/static/llms.txt +++ b/static/llms.txt @@ -104,6 +104,7 @@ The protocol is specified as SEVEN bottom-up layers, each naming its canonical c - [L6 · The dig RPC (machine interface)](https://docs.dig.net/docs/protocol/dig-rpc): JSON-RPC 2.0 over POST, the method catalogue, the chunk wire object (chunk_lens first-window-only, NO decoy field), range/window math, error codes incl. -32004 and the node-profile -32006, the node profile vs the network profile. - [L5 · §21 transport & push](https://docs.dig.net/docs/protocol/transport-and-push): dig:// locator resolution, the REST surface, JSON-outer/Chia-codec-inner envelope, 2-leg push v1, the authenticated head (PUSH_DST), per-request §21.9 auth, tombstones, decoy indistinguishability. - [L7 · DIG Node peer network](https://docs.dig.net/docs/protocol/peer-network): the normative node↔node protocol — mTLS peer identity (peer_id = SHA-256(TLS SubjectPublicKeyInfo DER)), the ordered NAT-traversal ladder (direct → UPnP → NAT-PMP → PCP → relay-coordinated hole-punch (signalling only) → relayed/TURN transport, relay-data-last), the relay's four roles (STUN, introducer, hole-punch signalling, relayed transport), STUN reflexive-address discovery, introducer + gossip peer discovery, the Kademlia DHT (§4c) with provider records that locate WHICH peers hold content — content-key = SHA-256(domain-tag ‖ store_id[‖root[‖retrieval_key]]) (tags 0x01/0x02/0x03), node id = peer_id, distance = XOR, bucket = 255−leading_zeros; the four DHT RPC methods (find_node / find_providers / add_provider / ping + error envelope, type-tagged JSON u32-BE length-prefixed over a dig-nat mTLS stream — NOT JSON-RPC 2.0) returning Contact / ProviderRecord shapes (addresses byte-compatible with dig.getPeers), provider records TTL'd + republished + GC'd and every inbound RPC folding the mTLS-verified caller into the routing table; a holder announcing each newly-held content key promptly on an inventory gain (whichever path put the capsule on disk — so a reader that caches a capsule becomes a discoverable holder of it) at store + capsule granularity and withdrawing what it no longer holds; the holdings-announce wire (gossip-pool broadcast opcode 222 at bulk priority, NOT a DHT method) — a signed batch of add (content_key ‖ addresses ‖ expires_at) / remove (content_key) deltas, at most 256, signed "dig:holdings:v1" ‖ peer_id ‖ seq ‖ announced_at ‖ canonical_encode(changes) with the TLS leaf key (ECDSA-P256, peer_id derived as SHA-256(spki), acceptance fail-closed on five checks); the gossip/peer-RPC port relationship (gossip 9445 = peer 9444 + 1 — a gossip-pool address is not a peer-RPC dial target, translate first) — the relay RelayMessage JSON wire (RLY-001..RLY-007), streaming-first content transport over a multiplexed stream connection, availability/inventory queries (dig.getAvailability batch has_store/has_root/has_capsule + dig.listInventory) as the pre-fetch step, byte-range multi-source content/.dig fetch (dig.fetchRange) with per-range merkle integrity + resume, the peer RPC methods (dig.getPeers / dig.announce / dig.getNetworkInfo / dig.getAvailability / dig.listInventory / dig.fetchRange + -32006 / -32007), and the relay-last-fallback invariant. The anchor dig-nat/dig-relay/dig-gossip/dig-dht/dig-node conform to. +- [L7 · Content replication (the flywheel)](https://docs.dig.net/docs/protocol/content-replication): how content spreads with no origin server or CDN — the connect -> discover -> fetch+verify -> cache -> announce loop that turns every reader into a discoverable holder; the two discovery halves (the DISTRIBUTED ITERATIVE Kademlia find_providers provider lookup, durable and TTL-republished, plus the real-time signed gossip opcode-222 holdings-announce) and why a record learned during a lookup is HEARSAY that is used for fetching but never re-served or republished; the announce-ingress guards stated per threat CLASS (forged attribution, identity re-spelling, amplification, flood/Sybil eviction, replay, self-poisoning, unbounded state); per-range merkle verification bound to the chain-anchored generation root with a half-specified proof/root binding failing CLOSED; the bounded on-disk capsule cache (1 GiB default, LRU, pins exempt, verified-only admission) and its two landing paths (background whole-capsule backfill on a miss, and reshare after serving); the FIRST-PARTY landing gate — a read performed for a remote peer or driven cross-site serves bytes but causes no cache write, no announce and no reshare, so a stranger can never choose what a node stores; the active retract on eviction (immediate, not TTL-lapse) that keeps a node from advertising a holding it no longer has; and the conformance list. Distinct from the recursive hop-by-hop ask: this is an ITERATIVE lookup returning holder RECORDS the seeker then dials itself, not a transitive ask holding each hop open. - [L6 · Verification, provenance & anchoring](https://docs.dig.net/docs/protocol/verification-and-provenance): the four ordered integrity gates (merkle → authenticated decryption → anchored-root pinning → risc0), anchored-root pinning against the singleton via coinset.org, the MOCK-by-default risc0 caveat, provenance UX. - [L6 · The blind host model](https://docs.dig.net/docs/protocol/blind-host-model): provider-blindness, serve_blind (framing-only decode), the resolver (*.on.dig.net + custom domains), the /v1 control plane (CHIP-0002 login, JWT sessions, refresh reuse-detection, action re-auth, GitHub-OIDC CI), accept-on-signature push trust. - [Conformance & parity](https://docs.dig.net/docs/protocol/conformance-and-parity): the cross-impl parity discipline (frozen canonical()/retrieval_key() goldens, C8 crypto fixtures), the URN conformance vectors, the OpenRPC-vs-server diff. diff --git a/static/openrpc-node.json b/static/openrpc-node.json index d100e1a..756f2db 100644 --- a/static/openrpc-node.json +++ b/static/openrpc-node.json @@ -2,7 +2,7 @@ "openrpc": "1.2.6", "info": { "title": "dig RPC — node profile (local dig-node / in-process DIG Browser)", - "version": "0.15.0", + "version": "0.17.0", "description": "The NODE PROFILE: a distinct, smaller surface than the network profile. Of the byte methods it implements ONLY dig.getContent (local-first, else proxy); everything else proxies upstream or returns -32601. It ADDS node-only methods the security model depends on — chiefly dig.getAnchoredRoot (the CHIP-0035 on-chain head, the trusted root for mandatory root-pinning), dig.stage, and cache.*. Gate on dig.methods rather than assuming one uniform surface. See https://docs.dig.net/docs/protocol/dig-rpc#node-profile.", "license": { "name": "GPL-2.0", diff --git a/static/openrpc.json b/static/openrpc.json index 24341ff..350801f 100644 --- a/static/openrpc.json +++ b/static/openrpc.json @@ -2,7 +2,7 @@ "openrpc": "1.2.6", "info": { "title": "dig RPC — DIG Network Content Interface (network profile)", - "version": "0.15.0", + "version": "0.17.0", "description": "The network-wide read interface for DIG content over JSON-RPC 2.0 — the NETWORK PROFILE served by the canonical node at rpc.dig.net. Blind by construction (the node holds no URN and no key), verifiable without trust (merkle inclusion proofs against the chain-anchored root), and streamable at any size. There is no `decoy` field on the wire and no CDN. See https://docs.dig.net/docs/protocol/dig-rpc.", "license": { "name": "GPL-2.0",