Skip to content

Drop popular_hashes from NodeAnnounce; DHT FIND_VALUE is the demand signal #412

Closed

Description

@alpergundogdu

Context

NodeAnnounce (broadcast over iroh-gossip per ADR 001) currently carries popular_hashes: Vec<Hash> — up to 20 BLAKE3 hashes per node per announcement (PoC), reduced to 5 in production for privacy.

The field's original purpose was content-inventory hinting: before ADR 022 made DHT FIND_VALUE the primary content-discovery mechanism, clients leaned on NodeAnnounce to know which nodes held which content. With the DHT in place, popular_hashes is now described as a "demand signal" — telling other nodes which content is hot (ADR 001 § Local demand signal).

Why drop now

Same pattern as #408: a mechanism whose original purpose was superseded but the field stayed for a vague secondary reason.

Privacy: ADR 017 P-01 explicitly flags popular_hashes as a content-inventory leak (T1 / network-passive threat). The production cardinality cut from 20→5 is itself a partial mitigation acknowledgment — but the leak remains real, and dropping the field eliminates the entire P-01 threat row rather than reducing it.

Demand signal redundancy: the same information is already available through cheaper, less leaky channels:

  • cdn/dht/v1 FIND_VALUE traffic exposes per-hash demand to nodes responsible for that hash's keyspace, not the entire network
  • The local demand signal in ADR 001 § Local demand signal tracks miss timestamps per hash and triggers proactive pulls — already specified, no gossip needed
  • Cache eviction telemetry surfaces demand patterns within an operator's own infrastructure

So popular_hashes is duplicating a signal we have, broadcasting it to every node in the mesh, and creating a privacy concern in the process.

Proposed change

Drop popular_hashes from NodeAnnounce. The struct becomes:

struct NodeAnnounce {
    node_id: NodeId,
    region: String,        // ISO 3166-1 alpha-2
    load: LoadHint,
    timestamp_us: u64,
    signature: Signature,  // Ed25519, unchanged
}

NodeAnnounce continues to carry node-level metadata (region, load) that is genuinely network-wide and not derivable from DHT traffic.

Wins

  • ~640 bytes saved per NodeAnnounce at the 20-hash PoC cardinality (~32 bytes/hash + framing); ~160 bytes at the 5-hash production cardinality
  • ADR 017 P-01 threat retired entirely (rather than partially mitigated by cardinality cuts)
  • Simpler NodeAnnounce schema: drops the popular_hashes validation path (no duplicates, max-20-entries, etc.)
  • Drops the seams-appendix row "popular_hashes cardinality: 20 vs 5" — one fewer PoC/production split

ADRs to update

  • adr/001-network.md — drop popular_hashes from NodeAnnounce struct and validation rules; keep the local-demand-signal section
  • adr/017-privacy.md — drop P-01 row (or mark as resolved by removal)
  • adr/appendix-poc-production-seams.md — drop the popular_hashes cardinality row from the inventory

Pattern reference

Fourth instance of the #408 pattern: a field added to solve a discovery problem (pre-DHT) that survived past its purpose, with measurable cost (privacy, bandwidth) for marginal benefit (a duplicate demand signal).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions