Skip to content

docs(adr): drop bootstrap probe fan-out; on-chain directory is fallback (#411) - #415

Merged
thiras merged 3 commits into
mainfrom
adr/drop-bootstrap-probe-fanout
May 6, 2026
Merged

thiras merged 3 commits into
mainfrom
adr/drop-bootstrap-probe-fanout

Conversation

@alpergundogdu

Copy link
Copy Markdown
Contributor

Closes #411.

Removes broadcast probe fan-out from the content-discovery flow. After ADR 022 made the DHT primary, fan-out was retained as a "bootstrap fallback before the routing table is populated" — but the DHT bootstraps from StakingRegistry.getActiveNodes(), so a node's first peers come from the on-chain registry and immediately participate in DHT lookups. The fan-out fallback was protecting against a window that doesn't exist.

When the DHT returns no providers, the on-chain origin directory (ADR 022 § Origin discovery) provides a deterministic last-resort fallback for both registered and default-open namespaces. Fan-out becomes a fallback for a fallback that the second layer already covers.

Wire/protocol changes

  • Step 2a ("Bootstrap fallback: send ProbeRequest in parallel to all known peers") removed from ADR 001 § Content Discovery (DHT + Probe).
  • Step 3 fallback rewired: "If DHT returned no providers, fall back to the on-chain origin directory" instead of fan-out.
  • Probe rate limits recalibrated:
    • Outbound: 10 probe fan-outs / second / node → 3 probe batches / second / node (each batch targets the DHT-returned candidate set, typically 3–5 NodeIds)
    • Inbound: 20 probe requests / peer / second → 5 probe requests / peer / second
  • ADR 022 §1.7 Bootstrap: routing-table-fallback step replaced; on-chain origin directory provides the fallback.

Files changed

  • adr/001-network.md — drop step 2a; rewrite step 3 fallback; update mermaid diagram (cache-miss → DHT → probe → on-chain directory); recalibrate probe rate limits; drop "Broadcast probe fan-out" Negative-consequences bullet; update Future Work resolution
  • adr/005-protocol.md — drop "and bootstrap fallback" from the gossip-introduction paragraph (probe is live-availability confirmation only)
  • adr/022-content-discovery.md — Decision section: "Broadcast probe fan-out is not part of the protocol" + DHT bootstraps from registry; §1.6 Fallback rewritten to use on-chain directory; §1.7 Bootstrap rewritten; cross-ADR consistency rows updated; Acceptance Criteria Clarify unified node selection algorithm combining price, latency, and reputation #6 updated
  • adr/architecture.md — drop "During bootstrap, broadcast probe fan-out is used as a fallback"; replace with on-chain directory mention

Wins

  • O(N) probe-message attack surface eliminated; observers can no longer enumerate a node's peer list via fan-out
  • Smaller probe-rate budgets across the network
  • Simpler bootstrap state machine (no "do I have enough peers to skip fan-out" branch)
  • One more PoC/production split implicitly resolved — fan-out was largely a PoC-scale comfort

Caveat

Need to be confident the DHT bootstraps quickly enough from registry-seeded peers. The on-chain origin directory fallback already specified in ADR 022 handles the no-DHT-providers case deterministically — no need for fan-out. At PoC scale (30 nodes) the routing table is fully populated after a single self-lookup round.

Same simplification pattern as #408 and #410: a mechanism that was primary and became a fallback as the design evolved, but whose complexity stayed.

Test plan

  • Verify no remaining fan-out mentions in canonical ADRs (history file _history/alternatives-pre-launch.md retains its discussion of why fan-out was rejected, which is correct)
  • Verify probe-rate-limit budgets are internally consistent across ADR 001 and ADR 005
  • Verify ADR 022 §1.6 Fallback and § Origin discovery refer to the same on-chain directory mechanism

🤖 Generated with Claude Code

…ck (#411)

Removes broadcast probe fan-out from the content-discovery flow.
ADR 022 made the DHT primary; fan-out was retained as a "bootstrap
fallback before the routing table is populated." But the DHT
bootstraps from StakingRegistry.getActiveNodes() — a node's first
peers come from the on-chain registry and immediately participate
in DHT lookups, so there is no separate window during which DHT
cannot resolve.

When DHT returns no providers, the on-chain origin directory (ADR
022 § Origin discovery) is the deterministic last-resort fallback
for both registered and default-open namespaces. Fan-out becomes a
fallback for a fallback that the second layer already covers.

Probe rate budgets shrink accordingly:
- Outbound: 10 fan-outs/s → 3 probe batches/s (DHT-targeted)
- Inbound: 20 probes/peer/s → 5 probes/peer/s

The Sybil/probe-flood attack surface goes away; an attacker can no
longer observe a node's full peer list via fan-out traffic.

Same simplification pattern as #408. Closes #411.

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 replaces the broadcast probe fan-out mechanism with an on-chain origin directory as the deterministic fallback for content discovery across several ADRs. It also refines the DHT bootstrapping process and adjusts probe rate limits. Feedback includes addressing logical gaps in the updated Mermaid diagram, restoring the accidentally removed signature field in the ProbeResponse documentation, and ensuring consistent rate limit values across all related files.

Comment thread adr/001-network.md Resolved
Comment thread adr/001-network.md Resolved
Comment thread adr/005-protocol.md Resolved
alpergundogdu and others added 2 commits May 5, 2026 18:23
- adr/001-network.md mermaid: fix fallback semantics (DHT no-providers
  triggers directory fallback; directory-returned providers must be
  probed before selection)
- adr/001-network.md step 3: restore signature field in ProbeResponse
  field list (signature removal is scoped to PR #409, not this PR)
- adr/005-protocol.md: update inbound probe rate limit reference from
  20 to 5 to match the recalibrated value in adr/001-network.md

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…7, 019, 022

Follow-up to PR #415: the original PR updated ADR 001/005/022/architecture.md
but left stale fan-out references in:

- architecture.md (overview text + cache-miss mermaid)
- ADR 015 (0-RTT motivation framed around 30-peer fan-out)
- adr/appendix-observability.md (probe_fanout_latency_seconds metric)
- ADR 017 (P-09/P-10 privacy threat surfaces)
- ADR 019 (bootstrap failure mode prose)
- ADR 022 (Context section presented fan-out as 'current design')

Recasts all to reflect: DHT FIND_VALUE returns 3-5 candidates;
probes are targeted; on-chain origin directory is the deterministic
last-resort fallback. Renames probe_fanout_latency_seconds metric to
probe_collection_latency_seconds.

Addresses leftover-references sweep findings on PR #415.

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

Copy link
Copy Markdown
Contributor Author

Follow-up commit applied addressing leftover fan-out references identified in a post-merge sweep across canonical ADRs.

13ef4ee: recasts stale fan-out / broadcast-probe / old-rate-limit framing as targeted DHT-candidate probing with the on-chain origin directory as the deterministic last-resort fallback. Specifically:

  • adr/architecture.md — overview ADR 001 summary, cache-miss mermaid (now DHT FIND_VALUE → targeted probe of candidates → select), Future Work fallback line, and 'What Is Not Decided Yet' resolution.
  • adr/015-zero-rtt.md — Context paragraph reframed around DHT 3-5 candidate probing, 'Probe Fan-Out Latency' section heading retitled to 'Probe Latency', warm-connection narrative reworded for incremental peer-table warmup, and metric renamed probe_fanout_latency_seconds → probe_collection_latency_seconds (description updated). References link relabeled.
  • adr/appendix-observability.md — metric renamed in the naming-rules example, the M-tier metrics table, and the legacy-name mapping table; description updated to 'probe collection window'.
  • adr/017-privacy.md — P-09/P-10 threat-surface rows reworded ('Probe content leakage' / 'Probes triggered by cache misses … visible to the targeted DHT candidate set, plus DHT FIND_VALUE traffic … to keyspace-close nodes'), prose paragraph and P-10 disposition rationale aligned, references-line replaces 'probe fan-out' with 'DHT-candidate probing'.
  • adr/019-node-onboarding.md — bootstrap failure mode prose updated to 'cannot participate in gossip, DHT lookups, or probing'.
  • adr/022-content-discovery.md — Context section recast as historical motivation ('An earlier design … used …', 'would have been', 'would have grown', 'would have existed'), final sentence ends '… even from day one — the DHT is.'

Verification grep across canonical ADRs (excluding _history/) confirms only the listed legitimate references remain: the historical Context in ADR 022, the 'Selective fan-out — subsumed by DHT and removed entirely' line in ADR 001, the operative 'Broadcast probe fan-out is not part of the protocol' statement in ADR 022, the Cross-ADR Consistency note pointing to the on-chain origin directory fallback, the ADR 022 Alternatives reference to _history/alternatives-pre-launch.md, and the architecture.md 'What Is Not Decided' resolution that itself states fan-out is not part of the protocol.

@thiras
thiras merged commit 1a1268c into main May 6, 2026
9 checks passed
@thiras
thiras deleted the adr/drop-bootstrap-probe-fanout branch May 6, 2026 08:25
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 broadcast probe fan-out as bootstrap fallback; DHT + registry seed list is sufficient

2 participants