Skip to content

docs(adr): drop popular_hashes from NodeAnnounce; DHT FIND_VALUE is the demand signal (#412) - #416

Merged
thiras merged 4 commits into
mainfrom
adr/drop-popular-hashes
May 6, 2026
Merged

thiras merged 4 commits into
mainfrom
adr/drop-popular-hashes

Conversation

@alpergundogdu

Copy link
Copy Markdown
Contributor

Closes #412.

Drops popular_hashes from NodeAnnounce. The field originally provided a content-inventory hint for clients before content discovery had a primary mechanism. After ADR 022 made DHT FIND_VALUE primary, popular_hashes became a redundant "demand signal" duplicating information already available through DHT FIND_VALUE query frequency (non-suppressible by construction) and local cache-miss timestamps.

ADR 017 P-01 explicitly flagged popular_hashes as a content-inventory leak (T1 / network-passive threat). Production cardinality was cut from 20 → 5 to mitigate; dropping the field eliminates the threat row entirely rather than reducing it.

Wire format change

struct NodeAnnounce {
    node_id: NodeId,
    region: String,
    load: LoadHint,
-   popular_hashes: Vec<Hash>,   // top-N most-requested hashes (max 20, unique)
    timestamp_us: u64,
    signature: Signature,
}

Files changed

  • adr/001-network.md — drop popular_hashes field from NodeAnnounce struct, mermaid diagram, and validation rule (6); merge "Network popularity signal" into the local-demand section under a new "Prefetching from Local Demand" heading; drop the negative-consequences bullet about popular_hashes
  • adr/013-schema-evolution.md — drop popular_hashes from the NodeAnnounceBody examples in §Tier 1 and §Signed Field Freezing
  • adr/017-privacy.md — drop P-01 row from inventory; rename "Content demand patterns" subsection to discuss DHT FIND_VALUE traffic as the surviving correlation channel; drop §5.2 (popular_hashes Cardinality Reduction) and renumber subsequent §5.3 → §5.2 etc; drop P-01 from Disposition Summary, Prioritized Mitigation Roadmap, Consequences, and References
  • adr/022-content-discovery.md — drop §2.1 "Signal 1: popular_hashes Gossip"; promote DHT FIND_VALUE to Signal 1; add "Signal 2: Local Cache-Miss Frequency" derived from ADR 001; drop the popular_hashes row from the Prefetch Decision table and the §Interaction-with-Existing-Protocols row; update Acceptance Criteria ADR 003: Specify EIP-712 domain separator for voucher signatures #8
  • adr/011-content-takedown.md — replace "Stop announcing — omit the hash from popular_hashes" with "Stop publishing — withdraw any DHT STORE records for the hash"; drop popular_hashes from cross-ADR consistency notes
  • adr/012-client.md — drop popular_hashes from gossip-integrity and trust-boundary discussions
  • adr/019-node-onboarding.md — drop popular_hashes: vec![] from the registration NodeAnnounce example
  • adr/appendix-poc-production-seams.md — drop the popular_hashes cardinality row from the inventory; drop popular_hashes_max from NetworkConstants; drop the seam-by-ADR table row for ADR 017 (since the cardinality split was the only ADR-017 entry); update the no-magic-numbers rule example
  • adr/architecture.md — replace "popularity surfaced via popular_hashes gossip" with DHT FIND_VALUE query frequency; rewrite Prefetching paragraph as a single local-demand signal

Wins

  • ~640 bytes saved per NodeAnnounce at 20-hash PoC cardinality; ~160 bytes at 5-hash production cardinality
  • ADR 017 P-01 retired (was: "Mitigate, Pre-mainnet")
  • One PoC/production split removed (popular_hashes_max constant in NetworkConstants)
  • ADR 022 collapses to a single non-suppressible popularity signal (DHT FIND_VALUE) plus local demand
  • Simpler NodeAnnounce schema and validation rules

Same simplification pattern as #408, #410, and #411: a field that was added to solve a discovery problem (pre-DHT) and survived past its purpose, with measurable cost (privacy, bandwidth) for marginal benefit (a duplicate demand signal).

Test plan

  • Verify no remaining popular_hashes references in canonical ADRs (history file _history/alternatives-pre-launch.md would not have any since this field never appeared in the alternatives table)
  • Verify ADR 022 §2 Prefetch Decision thresholds and ADR 001 § Prefetching from Local Demand thresholds are internally consistent
  • Verify P-01 doesn't appear anywhere except the explicit "there is no popular_hashes gossip signal" assertion in ADR 017

🤖 Generated with Claude Code

…he demand signal (#412)

Removes popular_hashes from NodeAnnounce. The field originally
provided a content-inventory hint for clients before content
discovery had a primary mechanism. After ADR 022 made DHT
FIND_VALUE primary, popular_hashes became a redundant "demand
signal" duplicating information already available through:

- DHT FIND_VALUE query frequency (non-suppressible by construction)
- Local cache-miss timestamps (already specified in ADR 001)

ADR 017 P-01 explicitly flagged popular_hashes as a content-
inventory leak (T1 / network-passive threat). Production cardinality
was cut from 20 → 5 to mitigate; dropping the field eliminates the
threat row entirely rather than reducing it.

Wins:
- ~640 bytes saved per NodeAnnounce at 20-hash PoC cardinality;
  ~160 bytes at 5-hash production cardinality
- ADR 017 P-01 retired (was: "Mitigate, Pre-mainnet")
- One PoC/production split removed (popular_hashes_max constant)
- Simpler NodeAnnounce schema and validation rules
- ADR 022 collapses to a single non-suppressible popularity signal
  (DHT FIND_VALUE) plus local demand

Same simplification pattern as #408. Closes #412.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the popular_hashes field from the NodeAnnounce message across several Architecture Decision Records (ADRs). This change simplifies the protocol and eliminates a significant privacy surface related to content demand patterns. Consequently, prefetching logic has been updated to rely on DHT FIND_VALUE query frequency and local cache-miss timestamps rather than explicit gossip signals. Feedback was provided to correct broken internal section references in the mitigation roadmap within adr/017-privacy.md that occurred due to the removal and renumbering of sections.

Comment thread adr/017-privacy.md Resolved
alpergundogdu and others added 2 commits May 5, 2026 18:23
After dropping the popular_hashes cardinality reduction subsection in
§5 and renumbering subsequent subsections, the Prioritized Mitigation
Roadmap table in §6 still pointed to the pre-renumber section numbers.
Update priorities 2 and 4-6 to point to their current section numbers
(§5.3, §5.4, §5.5, §5.6 respectively).

Address Gemini review comment on PR #416.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…gossip section

Follow-up to PR #416: the gossip section in ADR 005 still claimed
NodeAnnounce carried 'a list of popular hashes (max 20)' even though
the field was removed from NodeAnnounce in PR #416. Update the prose
to match ADR 001: NodeAnnounce carries node-level metadata (region
and load hint) only, with no demand signals.

Addresses leftover-references sweep finding on PR #416.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@alpergundogdu

Copy link
Copy Markdown
Contributor Author

Follow-up commit 24d380f drops a stale leftover reference in ADR 005 § Gossip — node metadata that still claimed NodeAnnounce carried 'a list of popular hashes (max 20)'. The gossip-section prose now matches ADR 001's struct definition (region + load hint only).

# Conflicts:
#	adr/001-network.md
#	adr/005-protocol.md
#	adr/017-privacy.md
@thiras
thiras merged commit a82a659 into main May 6, 2026
16 of 18 checks passed
@thiras
thiras deleted the adr/drop-popular-hashes branch May 6, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop popular_hashes from NodeAnnounce; DHT FIND_VALUE is the demand signal

2 participants