docs(protocol): real-time capsule-holder discovery (find_providers + holdings-announce) - #47
Merged
Merged
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
Document the push half of the provider map on the L7 peer-network page: the opcode-222 holdings announce — its gossip-pool transport, message + signed byte layout, the fail-closed leaf-key verification, the ingest rules for add and remove deltas, and when a holder announces (including the runtime cache gain that turns a reader into a discoverable holder). Also states the gossip/peer-RPC port relationship a dial path must translate, extends the provider-record lifecycle and DHT usage rules, adds the conformance row, and refreshes the llms.txt summary for machine consumers. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
MichaelTaylor3d
marked this pull request as ready for review
July 26, 2026 11:25
…2 as wire only Holder discovery is documented as the provider-record path it is: a holder diffs its inventory and announces each newly-held content key promptly at store + capsule granularity, withdrawing what it no longer holds. The flywheel statement stays, attributed to that announce. The opcode-222 subsection is now strictly the wire contract — fields, canonical encoding, signing preimage, the five fail-closed acceptance checks, and the leaf-key identity reasoning — with no claim about when a peer announces and no provider-store semantics. Conformance row and the llms.txt summary follow. The gossip/peer-RPC port translation warning is retained and restated so it stands on gossip-pool addresses generally. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents capsule-holder discovery on the L7 peer-network page (dig_ecosystem #1430, the docs-coherence sibling of the #1394 discovery epic / #1425 flywheel map). All additions sit inside the existing §4c "Content discovery — the DHT"; no new page, no IA change.
What changed
docs/protocol/peer-network.mdstore_id:root.:::warning"Two ports, one node" — gossip9445= peer-RPC/DHT9444+ 1; a peer's dial targets are peer-RPC addresses while a node's own gossip-pool observations are gossip addresses, so a path that seeds DHT routing or a download-candidate list from a gossip-pool address must subtract the offset. Dialing9445for a peer-RPC stream reaches the gossip protocol and surfaces as a content miss rather than a connection error — the failure mode that caused two prior outages.#### The holdings-announce wire — opcode 222subsection ({#holdings-announce}) — strictly the wire contract: that it is a gossip-pool broadcast message type at bulk priority and not one of the four DHT RPC methods; the field table (provider_peer_id/provider_spki/seq/announced_at/changes≤256 /signature); the add/remove delta canonical encoding; the wire layout and the domain-separateddig:holdings:v1signing preimage; the five fail-closed acceptance checks; why signing with the TLS leaf key thepeer_idalready commits to makes the message unforgeable standalone with no graftable identity binding; that it is a public all-peers statement, signed rather than recipient-sealed; and what a valid signature does not establish — addresses are untrusted, non-amplifiable dial hints and content is merkle-verified against the chain-anchored root before it is trusted or re-served.peer_id.static/llms.txt— the peer-network entry now summarizes the announce-on-gain provider-record behaviour, the holdings-announce wire, and the port relationship, matching the page.Deliberately unchanged:
static/dht-methods.jsondocuments the four-method DHT RPC wire, and a holdings announce is a gossip-pool broadcast, not a DHT method.How verified
npm ci && npm run build— green, all 15 locales.onBrokenLinks: "throw"+onBrokenAnchors: "throw"are enabled, so every new anchor and cross-link is build-validated.postbuildhreflang sitemaps regenerated cleanly (14 sitemaps, 1680 urls).npm run typecheck(tsc) clean;npm run lint(eslint) clean;npm run test:unit26/26.origin/main, not inferred: the shipped discovery path isdig-nodecrates/dig-node-core/src/seams/dig_peer/dht.rs—announce_inventory(per-content-idannounce_provider),inventory_content_ids(store + capsule granularity),inventory_diff,sync_inventory(prompt announce of new ids,withdraw_providerfor dropped ids, TTL age-out), reached viarefresh_dht_inventoryinseams/dig_peer/peer_network.rs. The opcode-222 wire isdig-gossipsrc/service/holdings_announce.rs(opcode222,SIG_DOMAIN_TAG = b"dig:holdings:v1",MAX_CHANGES = 256,canonical_encode,holdings_signing_message,encode/decode,verify_holdings_announce) with its broadcast/priority classification insrc/gossip/broadcaster.rs+src/gossip/priority.rs. Ports and the fixed offset come from the canonical port contract.Review finding addressed
The first revision described provider-store ingest semantics, announce triggers, and a receive-side apply rule for opcode 222.
git grep -lI -E "holdings_announce|HoldingsAnnounce|HOLDINGS_ANNOUNCE" origin/main -- '*.rs'returns zero hits across dig-node, and in dig-gossip the only references outside the wire module are thelib.rsre-exports and the priority/broadcast classification — so no producer emits an announce and no consumer applies one. Those passages described behaviour that does not exist and have been removed; the page now documents the provider-record path that actually carries discovery, and keeps opcode 222 only as the byte-exact wire contract a conforming implementation reproduces.Version bump — 0.5.3 → 0.6.0 (minor)
New capability documented (a previously undocumented protocol surface, a new conformance row, and a new anchor other pages can link to), additive only, nothing removed or restated differently.
Closes #1430 (dig_ecosystem).