Skip to content

Drop broadcast probe fan-out as bootstrap fallback; DHT + registry seed list is sufficient #411

Closed

Description

@alpergundogdu

Context

ADR 001 specifies broadcast probe fan-out as the bootstrap fallback in content discovery: a node that has not yet populated its DHT routing table sends ProbeRequest in parallel to all known peers (O(N) messages per cache miss). Once the routing table is populated, the DHT (cdn/dht/v1 FIND_VALUE per ADR 022) is the primary mechanism and probes are targeted at the small candidate set the DHT returns.

2. DHT FIND_VALUE → returns Vec<NodeId>
   - 2a. Bootstrap fallback: if routing table has fewer than k entries,
         send ProbeRequest to ALL known peers
3. Probe the DHT candidate set (targeted, ~3-5 nodes)

The fan-out path is what justifies a sizeable chunk of probe-related complexity:

  • Per-node outbound rate limit: 10 probe fan-outs / second / node
  • Per-peer inbound rate limit: 20 probe requests / peer / second
  • Probe cache: 1024 hash entries × 10 responses each (~2 MB)
  • The early-exit logic (min_probe_responses, early_exit_score_threshold) is calibrated for batches of N responses

Why drop now

Same pattern as #408: a mechanism kept around "in case the primary path fails" whose justification has eroded.

  • The DHT itself bootstraps from StakingRegistry.getActiveNodes() — a node's first peers come from the on-chain registry and immediately participate in DHT lookups. There is no real bootstrap window during which a node has peers but cannot do a DHT FIND_VALUE.
  • ADR 022 already specifies an "on-chain origin set as directory of last resort" fallback for the case where DHT returns no providers — PublisherRegistry.namespaceOf(hash) → OriginAssignment.getOrigins(namespaceId) → StakingRegistry.nodeIdOf(operator). This is the deterministic recovery path; broadcast fan-out is a third recovery layer for a problem the second layer already solves.
  • Targeted probes (DHT candidates → probe → confirm live) still need rate limits, but at single-digit cardinality rather than O(N). Budgets shrink ~10×.

Proposed change

Drop bootstrap probe fan-out (step 2a in ADR 001 § Content Discovery). Discovery becomes:

  1. Probe cache check (unchanged)
  2. DHT FIND_VALUE
  3. Targeted probe of DHT candidates
  4. On-chain directory fallback if DHT returns nothing (ADR 022)

Probe complexity that scales down accordingly:

  • Outbound probe rate: 10/s → ~3/s (sized for cache misses, not fan-out)
  • Inbound probe rate: 20/peer/s → ~5/peer/s
  • Probe cache size: can shrink (no need to absorb fan-out bursts)
  • Early-exit thresholds: recalibrate for typical N=3-5 candidates, not N=hundreds

Wins

  • Smaller probe-rate budgets across the network
  • Simpler bootstrap state machine (no "do I have enough peers to skip fan-out" branch)
  • No O(N) probe-message code path; eliminates the Sybil/probe-flood attack surface noted in ADR 005 § Probe responses are public information
  • Privacy improvement: an attacker cannot observe a node's full peer list via watching its fan-out

Caveat

Need to be confident the DHT bootstraps quickly enough from registry-seeded peers. The seed list is getActiveNodes() paginated; PoC has tens of nodes (single-page), production has thousands (multi-page). If a freshly-bootstrapped node's DHT lookups have high failure rates during the warm-up window, the on-chain directory fallback (ADR 022) handles it deterministically — no need for fan-out.

ADRs to update

  • adr/001-network.md — drop step 2a, recalibrate probe rate limits
  • adr/005-protocol.md — drop "broadcast probe fan-out" mentions from public-information / Sybil discussions
  • adr/022-content-discovery.md — confirm on-chain directory fallback is the canonical recovery path

Pattern reference

Third instance of the #408 pattern: a mechanism that was primary and became a fallback as the design evolved, but whose complexity stayed.

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