Repository navigation
ADR 022: Content discovery via cdn/dht/v1 (Kademlia) from PoC onward - #194
Merged
Merged
Conversation
- Add adr/022-content-discovery.md: lightweight Kademlia subset over iroh QUIC as primary discovery mechanism from PoC day one. Probe fan-out retained as bootstrap fallback (routing table < k entries) and emergency fallback (DHT miss). Two popularity signals: popular_hashes gossip (advisory) and DHT FIND_VALUE query frequency (non-suppressible oracle). No discovery fees. Market dynamics section explains self-limiting suppression and honest-oracle properties. - Update adr/001-network.md: rewrite Content Discovery section (DHT + Probe), remove three-strategy Future Work block (now resolved by ADR 022), update prefetch path, Consequences section, and cross-references throughout. - Update adr/005-protocol.md: change content discovery description from probe fan-out to cdn/dht/v1 + cdn/probe/v1; update anchor reference. - Update adr/012-client.md: client now uses DHT FIND_VALUE for discovery, falls back to broadcast probe during bootstrap. - Update adr/architecture.md: ADR 022 summary updated to DHT-from-day-one, cache miss and pull-through descriptions updated, CRDT/indexer sections updated to reflect DHT as primary; multiple probe fan-out references replaced. Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request introduces ADR 022, which establishes a Kademlia-based content DHT (cdn/dht/v1) as the primary content discovery mechanism, replacing the O(N) broadcast probe fan-out approach. The changes update the network, protocol, and client ADRs to reflect this O(log N) discovery model and define new popularity signals. Feedback identifies a missing 'Key Invariants' heading in the architecture document and an inconsistency in the summarized DHT rollout strategy compared to the authoritative specification.
…Is Not Decided Yet - Restore accidentally-removed '## Key Invariants' heading above the invariant bullet list in architecture.md - Replace stale phased-rollout description of ADR 022 with correct DHT-from-day-one summary Co-authored-by: Copilot <[email protected]>
12 of 17 tasks
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.
Summary
Closes part of #190 (Missing ADRs — Content Discovery at Scale).
Adds ADR 022 and updates four existing ADRs for cross-ADR consistency.
Decision
cdn/dht/v1— a lightweight Kademlia subset over iroh QUIC — is the primary content discovery mechanism from PoC day one. Probe fan-out (cdn/probe/v1) is retained as:At PoC scale (30 nodes), FIND_VALUE resolves in 1–2 hops, overhead is negligible.
Why DHT from the start
Popularity signals
popular_hashesgossip — advisory, suppression is self-limiting (hiding popular content raises LoadHint, reduces selection score)Cross-ADR updates