Skip to content

docs: batch fix 30+ ADR issues, integrate separated discovery design - #85

Merged
thiras merged 29 commits into
mainfrom
fix/adr-wave-1-critical-foundations
Mar 31, 2026
Merged

thiras merged 29 commits into
mainfrom
fix/adr-wave-1-critical-foundations

Conversation

@thiras

@thiras thiras commented Mar 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Batch fix for 30+ open ADR issues across all ADRs + architecture.md + CLAUDE.md. Also integrates the separated discovery design from PR #44 (now closed), replacing CacheAnnounce with NodeAnnounce + probe fan-out.

Excluded from this PR

Separated Discovery Design (from PR #44)

  • ADR 001: Replace CacheAnnounce with lightweight NodeAnnounce (~700 bytes) — no Bloom filters, no hash lists
  • ADR 001: On-demand probe fan-out for content discovery (no routing tables)
  • ADR 001: 15s probe cache TTL (half the 30s slashing evidence window)
  • ADR 001: 500ms probe timeout for inter-continental coverage (London↔Sydney)
  • ADR 001: Gossip validation — signature, registry, timestamp freshness (±60s), monotonic check
  • ADR 001: Registry cache with event subscription for freshness
  • ADR 001: Registry check before paid pulls (content discovery step 5)
  • ADR 001: Probe rate limits — 10 outbound fan-outs/s, 20 inbound/peer/s
  • ADR 001: Cascading cached provider fallback before full fan-out
  • ADR 001: Prefetching via local demand + network popularity signals
  • ADR 006: App server as external component (WebSocket/SSE, not cdn/keys/v1)
  • ADR 010/011: Updated stale CacheAnnounce references

Wave 1 — Critical Foundations (#57, #58)

  • ADR 003: Full NodeId-to-Ethereum binding spec (EIP-712, on-chain bindNodeId(), 1:1 enforcement, ephemeral client binding)
  • ADR 004/005: Add 100 TOKEN challenge bond for PoC (was N/A), preventing zero-cost slash griefing

Wave 2 — ADR 003 Payments (#73, #72, #67, #66, #61)

  • Reject probe-requires-channel option (bootstrap catch-22)
  • Clarify clock skew immunity in rate manipulation detection
  • Define channel expiry (maxChannelDuration: 90 days, governable 7d–365d) with reclaimExpired + ChannelExpiredReclaimed event
  • Specify nonce as on-chain per-client monotonic counter with read-then-increment ordering
  • Add Concurrent Streams subsection with numbered rules, worked example, and isolation advice

Wave 3a — Network + Reputation (#71, #70, #6, #77, #63, #62)

  • Registry unavailability fallback (retry + cached peer list)
  • Region hint limitations with latency-based PoC detection
  • Unified node selection algorithm: rate × rtt × 1/max(rep, 0.1)² with multiplier table
  • Reputation recency validation (1h max age + 5min future-timestamp rejection, clock sync dependency documented)
  • Fix bootstrap division-by-zero with max(1, ...) guard
  • Switch reporter weight from channel count to settled USDC value (Sybil resistance)

Wave 3b — Protocol (#75, #69, #29)

  • Document dual-connection overhead and production optimization path
  • Redirect loop prevention (max 3 hops, cycle detection)
  • Error Handling section with StreamError enum, error? field in wire format, retry semantics, 10s timeouts

Wave 3c — Encryption + Governance (#76, #68, #26, #16, #78, #65)

  • Reduce offline lease TTL from 30 to 7 days with mandatory daily check-in
  • Key rotation notification via iroh-gossip (cdn/keys/rotation/v1 topic)
  • Key hierarchy: per-content epoch keys limit client-side compromise blast radius
  • Pause sunset as immutable constructor deadline with upgrade-only extension
  • Tighten safety bounds: slash 5–50% per offense, dispute window 12h–72h, rate floor ≥ 1 base unit

Wave 4 — Multi-token + Takedown + Tokenomics (#59, #84, #80, #81, #64, #60, #74)

  • Resolve slashing denomination: always TOKEN stake, no cross-token conversion
  • Clarify SafeERC20 rationale (USDT non-returning transfer pattern)
  • Blacklist version sync recovery (delta → full re-sync → per-hash fallback)
  • Self-reported region limitation with production geolocation mitigation
  • Restrict PoC mint() to onlyOwner, document production removal
  • Define PoC slash counter reset (30 days), production third offense capped at 50% (auto-ejection via cumulative loss)
  • Channel expiry references updated from 30 to 90 days across ADR 010
  • Simplify migration: direct contract replacement instead of 3-phase coexistence

Wave 5 — Cross-ADR Fixes + Architecture Sync (#17, #15)

  • Production bootstrap modeling table (100/500/1000 nodes with reflexive TOKEN price risk)
  • Watchtower fee accountability (PoC trust-based, production escrow with heartbeats)
  • Sync architecture.md and CLAUDE.md with all changes above

Supersedes

Issues Closed

Closes #57, closes #58, closes #73, closes #72, closes #67, closes #66, closes #61, closes #71, closes #70, closes #6, closes #77, closes #63, closes #62, closes #75, closes #69, closes #29, closes #76, closes #68, closes #26, closes #16, closes #78, closes #65, closes #59, closes #84, closes #80, closes #81, closes #64, closes #60, closes #74, closes #17, closes #15

Test plan

  • Read each modified ADR file end-to-end for internal consistency
  • Verify no stale CacheAnnounce, routing table, or cdn/keys/v1 references remain
  • Verify cross-references: [ADR XXX] links, #section-anchor links
  • Check parameter consistency across ADRs (dispute window, slash %, rate floor, probe timeout)
  • Verify architecture.md and CLAUDE.md overviews match ADR content

🤖 Generated with Claude Code

thiras and others added 19 commits March 30, 2026 20:31
Replaces CacheAnnounce gossip with probe-based content discovery,
resolving issue #25 (Bloom filter parameter problems) by eliminating
Bloom filters and hash list broadcasts entirely.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Fix local demand tracking: use VecDeque<u64> timestamps instead of
  (count, last_seen) to support sliding window threshold
- Fix network popularity tracking: store per-peer announcement timestamps
- Clarify routing table removal vs probe cache distinction
- Fix architecture.md path reference to adr/architecture.md
- Reword privacy trade-off: popularity is a new gossiped signal,
  content availability is now probe-discoverable only
- Note probe cache TTL overlap with slashing evidence window

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Plan covers updates to ADR 001, 005, 008, and architecture.md to
replace CacheAnnounce with NodeAnnounce and probe fan-out content
discovery.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Remove Bloom filters, hash lists, and gossip-derived routing tables.
Add NodeAnnounce gossip, probe fan-out content discovery, probe cache,
and dual-signal prefetching. Reframe DHT future work for scaling
probe fan-out. Resolves #25.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Gossip now carries node metadata (NodeAnnounce) instead of content
inventories. Content discovery handled via cdn/probe/v1 fan-out.
Replace CacheAnnounce with NodeAnnounce in system diagram and ADR
summaries. Update cache miss flow to probe fan-out model. Update
prefetching to dual-signal model. Update future work section.
Update routing table → peer table in ADR 003, 004, 005.
Update CacheAnnounce → NodeAnnounce in ADR 003 gossip flooding.
Update cache miss flowchart in architecture.md to probe fan-out.
Update ADR 005 probe section to reference peer probing not routing table.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Design specs and implementation plans are working artifacts,
not permanent repo content.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Fix stale "content availability broadcast via gossip" in ADR 003
- Fix "announced content" and "deprioritized in routing" in ADR 003
- Fix "content routing announces" in ADR 004 auto-ejection
- Clarify "routing table" references in ADR 001 consequences
- Clarify probe cache TTL = slashing window overlap in ADR 001
- Fix "observe probe traffic" in architecture.md future work
- Update ADR 000 gossip description to NodeAnnounce
- Add NodeAnnounce struct cross-reference in ADR 005

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Rename NodeAnnounce timestamp → timestamp_us for protocol consistency
- Specify signature covers all fields via postcard serialization
- Add gossip validation rules (signature + registry check) to ADR 001
- Store full signed ProbeResponse in probe cache for slashing evidence
- Cross-reference ADR 001 validation from ADR 004 auto-ejection

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

Clarify that the app server (key delivery, subscription auth) is a
traditional web service operated by content providers, not part of the
CDN protocol or crate structure. Add External Components section to
architecture.md, update network diagram to show provider infrastructure,
and detail the app server's API surface and scaling model in ADR 006.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…#58)

- ADR 003: Add full NodeId-to-Ethereum binding section with EIP-712
  typed data, on-chain registration via StakingRegistry.bindNodeId(),
  and ephemeral off-chain binding for clients
- ADR 004: Add 100 TOKEN challenge bond for PoC (was N/A), preventing
  zero-cost griefing via fabricated slash claims
- ADR 005: Reference challenge bond requirement in probe slashing section

Closes #57, closes #58

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Reject probe-requires-channel option (bootstrap catch-22)
- Clarify clock skew immunity in rate manipulation detection
- Define channel expiry (maxChannelDuration: 90 days) and reclaimExpired
- Specify nonce as on-chain per-client monotonic counter with pre-computation
- Add Concurrent Streams subsection with rules, example, and isolation advice

Closes #73, closes #72, closes #67, closes #66, closes #61

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

ADR 001:
- Add registry unavailability fallback with retry and cached peer list
- Document region hint limitations and PoC latency-based detection
- Specify Bloom filter parameters (1% FPR, k=10, 14.4 bits/item)
- Define unified node selection algorithm: rate × rtt × (1/reputation²)

ADR 008:
- Add 1-hour recency validation for gossip reputation reports
- Fix bootstrap division-by-zero with max(1, ...) guard
- Switch reporter weight from channel count to settled USDC value

Closes #71, closes #70, closes #25, closes #6, closes #77, closes #63, closes #62

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Document dual-connection overhead and production optimization path
- Add redirect loop prevention (max 3 hops, cycle detection)
- Add Error Handling section with StreamError enum, retry semantics, timeouts
- Define postcard schema evolution strategy (trailing Option<T> for non-breaking, new ALPN for breaking)
- Update challenge bond references to reflect PoC implementation

Closes #75, closes #69, closes #29, closes #24

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

ADR 006:
- Reduce offline lease TTL from 30 to 7 days with mandatory daily check-in
- Add key rotation notification via iroh-gossip EpochRotated message
- Use iroh QUIC stream for PoC epoch key delivery (not WebSocket/SSE)
- Add key hierarchy: per-content epoch keys derived from server_secret

ADR 009:
- Define pause sunset as immutable constructor deadline with upgrade-only extension
- Tighten safety bounds: slash 5-50%, dispute window 12h-72h, rate floor >= 1

ADR 003 (consistency):
- Update dispute window safety bounds to match ADR 009 (12h-72h)

Closes #76, closes #68, closes #26, closes #16, closes #78, closes #65

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…#81, #64, #60, #74)

ADR 010:
- Resolve slashing denomination: always in TOKEN stake, no cross-token conversion
- Fix backward-compat contradiction: payment_token requires cdn/client/v2
- Clarify SafeERC20 rationale (USDT non-returning transfer pattern)

ADR 011:
- Add blacklist version sync recovery (delta, full re-sync, cache scan fallback)
- Document self-reported region limitation with production mitigation path

ADR 004:
- Restrict PoC mint() to onlyOwner, document production removal
- Define PoC slash counter reset: 30 days without incidents

Closes #59, closes #84, closes #80, closes #81, closes #64, closes #60, closes #74

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
ADR 007:
- Add Fee Accountability section: PoC trust-based, production escrow with heartbeats

ADR 004:
- Add production bootstrap modeling table (100/500/1000 nodes)
- Document reflexive TOKEN price dependency risk

architecture.md:
- Add Gossip Bandwidth Budget section (~6 KB/s per node at PoC scale)
- Add Privacy Surface section consolidating all privacy tradeoffs
- Sync overview sections: unified selection score, 4 ALPNs, value-weighted
  reputation, tightened safety bounds, NodeId binding, challenge bonds

Closes #17, closes #11, closes #45, closes #15

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings March 31, 2026 02:01
Revert changes for blocked issues:
- #24: Remove Schema Evolution Strategy section from ADR 005
- #11: Remove Gossip Bandwidth Budget section from architecture.md
- #45: Remove Privacy Surface section from architecture.md

Update #84 cross-reference to not depend on removed #24 section.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@thiras thiras changed the title docs: batch fix 34 ADR issues docs: batch fix 31 ADR issues Mar 31, 2026

Copilot AI 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.

Pull request overview

This PR updates the ADR set and adr/architecture.md to resolve a large batch of open documentation issues, mainly by tightening protocol/governance/payment specifications and synchronizing cross-ADR assumptions (selection scoring, slashing/challenge bonds, schema evolution, watchtowers, and privacy/bandwidth considerations).

Changes:

  • Specify/align core protocol mechanics (unified node selection score, redirect loop prevention, retry/error semantics, and postcard schema evolution rules).
  • Clarify economic/security mechanisms (challenge bonds, governance safety bounds, multi-token ALPN break, and slashing denomination).
  • Expand operational/spec detail (watchtower fee accountability model, blacklist version resync recovery, gossip bandwidth budget, and privacy surface summary).

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
adr/architecture.md Sync high-level architecture narrative with updated ADR decisions (selection score, watchtower ALPN, challenge bonds, gossip/privacy analysis).
adr/001-network.md Define unified node selection score and add registry-unavailability + Bloom filter parameter details.
adr/003-payments.md Add concurrent-stream rules, on-chain nonce + channel expiry/reclaim semantics, and NodeId↔Ethereum binding spec.
adr/004-tokenomics.md Update PoC mint restrictions, add PoC challenge bond, and extend bootstrap modeling notes.
adr/005-protocol.md Add redirect loop prevention, error/retry semantics, and explicit schema evolution strategy for postcard/ALPN.
adr/006-e2e-encryption.md Define key hierarchy + rotation notification, switch PoC key delivery transport, and tighten offline lease TTL/check-in policy.
adr/007-watchtower.md Add fee accountability model (PoC trust-based vs production escrow + heartbeats).
adr/008-reputation.md Switch reporter credibility to value-weighted settled USDC, add division-by-zero guard, and add report recency validation requirement.
adr/009-governance.md Tighten safety bounds (slash %, dispute window, rate floor) and specify immutable multisig sunset/extension mechanism.
adr/010-multi-token.md Clarify SafeERC20 rationale, resolve slashing denomination, and mark payment_token as requiring cdn/client/v2.
adr/011-content-takedown.md Add blacklist version-sync recovery procedure and document PoC vs production region-verification posture.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread adr/003-payments.md Resolved
Comment thread adr/003-payments.md Resolved
Comment thread adr/003-payments.md Resolved
Comment thread adr/003-payments.md Resolved
Comment thread adr/004-tokenomics.md Resolved
Comment thread adr/008-reputation.md Resolved
Comment thread adr/001-network.md Resolved
Comment thread adr/009-governance.md Resolved
Comment thread adr/005-protocol.md Resolved

@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 updates several Architecture Decision Records to refine the network's economic, security, and protocol designs. Key additions include a unified node selection score, a value-weighted reputation system to prevent Sybil attacks, and detailed retry semantics. The payment model is updated with channel expiry and challenge bonds for slashing, while the encryption scheme now utilizes a key hierarchy and mandatory check-ins for offline leases. Feedback indicates a need to correct the stated false positive rate for Bloom filters to align with the specified parameters and suggests reconsidering the dependency on clock synchronization for reputation report validation.

Comment thread adr/001-network.md Resolved
Comment thread adr/008-reputation.md Resolved
thiras and others added 3 commits March 31, 2026 05:20
- Fix slash 100% exceeding governance max 50%: production third offense
  now 50% (cumulative slashing triggers auto-ejection)
- Fix rate floor: ADR 003 safety bounds now >= 1 base unit (was 0),
  matching ADR 009
- Fix channel expiry: ADR 010 references updated from 30 to 90 days
- Fix dispute window: "24-hour" hardcoded references now say
  "default 24h, governable 12h-72h"
- Update ADR 005 and architecture.md to reference unified selection score
- Fix "Three ALPN" heading to "Four ALPN" (watchtower was added)
- Disambiguate cdn/keys/v1 ALPN from cdn/keys/rotation/v1 gossip topic

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- ADR 005: Update mermaid diagram to reference unified selection score
- ADR 003: Add ChannelExpiredReclaimed event for reclaimExpired
- ADR 003: Add reclaimExpired to channel close lifecycle documentation

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- ADR 003: Reject bindNodeId if nodeId already bound to different address
- ADR 003: Clarify nonce read-then-increment ordering for channelId
- ADR 004: Fix challenge bond rationale (testnet token has no economic cost)
- ADR 008: Add future-timestamp rejection + clock sync dependency note
- ADR 001: Clamp reputation to min 0.1 in selection score (avoid div-by-zero)
- ADR 001: Correct Bloom filter FPR from 1% to 0.1% (matches k=10, m=14.4)
- ADR 009: Add Min deposit row to governance parameters table

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@thiras
thiras requested a review from Copilot March 31, 2026 02:36
@thiras

thiras commented Mar 31, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@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 updates several Architecture Decision Records (ADRs) to refine the network's economic and protocol specifications. Key changes include the introduction of a unified node selection score incorporating reputation, the addition of challenge bonds for slashing to prevent griefing, and the implementation of a key hierarchy for enhanced encryption security. It also refines payment channel lifecycles with expiry mechanisms, updates governance safety bounds, and establishes retry and redirect loop prevention logic. Feedback was provided regarding a duplicated lifecycle description in the payment ADR, which should be consolidated.

Comment thread adr/003-payments.md Resolved

Copilot AI 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.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread adr/architecture.md Resolved
Comment thread adr/001-network.md Resolved
Comment thread adr/006-e2e-encryption.md Resolved
Comment thread adr/005-protocol.md Resolved
thiras and others added 2 commits March 31, 2026 05:43
- ADR 003: Remove duplicate reclaimExpired lifecycle entry
- ADR 005: Add error? field to StreamResponse wire format diagram
- ADR 006: Fix key hierarchy opening sentence (limits client-key
  compromise blast radius, not server_secret compromise)
- architecture.md: Link to ADR 001 for selection score instead of
  inlining formula without clamp

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Moves the detailed cdn/keys/v1 spec from PR #47 into this batch fix:
- ADR 006: Full protocol messages (KeySessionOpen, EpochKeyUpdate,
  EnvelopeRequest/Response), app server as iroh Endpoint, dual-stream
  pattern, authentication model, concurrent session limiting
- ADR 005: cdn/keys/v1 in ALPN table (five protocols), stream limits
  (10: 1 epoch + 9 envelopes), connection lifetime exception
- architecture.md: cdn/keys/v1 in ALPN table, updated ADR 006 summary
- CLAUDE.md: cdn/keys/v1 and cdn/watchtower/v1 in ALPN table

Supersedes #47

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Remove Bloom filter spec from ADR 001 — PR #44 proposes a broader
discovery redesign that may eliminate Bloom filters entirely.
Leaving #25 for that PR to resolve.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@thiras thiras changed the title docs: batch fix 31 ADR issues docs: batch fix 30 ADR issues Mar 31, 2026
@thiras thiras changed the title docs: batch fix 30 ADR issues docs: batch fix 30 ADR issues, integrate cdn/keys/v1 protocol Mar 31, 2026
ADR 010 is a draft for a post-PoC feature with no deployed v1 to be
backward-compatible with. Simplify:
- Revert cdn/client/v1→v2 versioning back to just cdn/client/v1
- Replace 3-phase migration plan with simple contract replacement
- Remove "old nodes"/"legacy"/"backward-compatible" framing

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@thiras
thiras requested a review from alpergundogdu March 31, 2026 03:11
@altanoruc

Copy link
Copy Markdown
Contributor

ADR 001: Network Topology and Peer Mesh

  • NodeId Ownership Griefing: The current registerNode implementation lacks on-chain ed25519 signature verification, creating a DoS vector where a malicious actor can register another’s identity.
  • Heated Cache Optimization: Operators lack a "Bandwidth Forecasting" mechanism to efficiently manage data between high-cost RAM and cheaper NVMe based on regional demand.

ADR 002: Content Addressing

  • BLAKE3/SNARK Bottleneck: BLAKE3's high multiplicative complexity makes it "SNARK-unfriendly," leading to prohibitive proof generation times for high-frequency CDN traffic.

ADR 003: Payment Model

  • Probe Fishing: The mitigation for bulk probing is weak since clients are unstaked and can rotate NodeIds to spam requests without cost.
  • Voucher Cadence Coupling: A single 1 MB stream on a channel forces all other concurrent streams to fall back to that 1 MB cadence, increasing overhead for high-bandwidth users.
  • Truncation Resistance: The system lacks forward-secure schemes to detect if delivery logs or records have been deleted or truncated to hide service withholding.

ADR 004: Tokenomics & Staking

  • Slashing Price Reference: ADR 004's slashing is denominated in TOKEN, but ADR 010 introduces payments in other tokens; without an on-chain price feed, penalties cannot be accurately converted.
  • Fixed Minimum Stake Volatility: The 1,000 TOKEN minimum does not adjust for market fluctuations, making Sybil attacks cheaper if the TOKEN price drops.
  • Utilization Risk: Unit economics assume 70% utilization, but nodes in low-demand regions may suffer losses if demand is unevenly distributed.
  • Reactive Slashing Latency: The "Challenger-Response" model is reactive, allowing malicious nodes a window of exploitation before being identified and slashed.
  • Entry Barrier for Small Nodes: The high fixed stake may deter legitimate small-scale regional providers from joining.

ADR 005: Wire Protocol

  • Postcard Evolution: The serialization format lacks a schema evolution strategy, necessitating breaking ALPN version changes for any update.
  • Head-of-Line Blocking: The "Self-Enforcing Threshold" applies collectively across a channel; one "stuck" stream can pause up to 99 other streams on that connection.

ADR 006: E2E Encryption

  • Centralized Key Delivery: The reliance on a centralized "App Server" for epoch keys creates a single point of failure and a high-value target for compromise.

ADR 007: Watchtowers

  • Lack of Automated "Proof of Fault": The current model requires manual intervention/response; it lacks automated "poison transactions" to immediately trigger penalties upon failure to serve.

ADR 008: Reputation System

  • Exit Scam Lag: The 0.05 movement clamp on reports means it could take 10–20 interactions to de-prioritize a node that has begun serving 100% malicious data.
  • Gossip Signature Storm: High-volume reputation gossip (modeled at $2.7$ reports per second) could overwhelm CPUs with Ed25519 signature verifications.

ADR 010: Multi-Token Payment Support

  • Token Normalization: The protocol lacks an automated way for clients to normalize rates across different tokens, making it hard to compare "garbage tokens" to stablecoins.

ADR 011: Content Takedown

  • Challenger Legal Exposure: The requirement to submit delivery receipts and hashes on-chain exposes challengers to legal risk and high gas costs in takedown disputes.

thiras and others added 2 commits March 31, 2026 23:41
- Commit to 15s probe cache TTL (half the 30s slashing window)
- Add NodeAnnounce replay prevention (timestamp freshness ±60s + monotonic check)
- Increase probe timeout from 200ms to 500ms for inter-continental coverage
- Add registry freshness check before paid pulls (new step 5)
- Add probe rate limits (10 outbound fan-outs/s, 20 inbound/peer/s)
- Try next cached provider before falling back to full fan-out

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Integrates the NodeAnnounce/probe fan-out redesign from PR #44 into the
batch ADR fix branch, consolidating both PRs into one.

Key changes from PR #44:
- Replace CacheAnnounce with lightweight NodeAnnounce (~700 bytes)
- On-demand probe fan-out for content discovery (no routing tables)
- 15s probe cache TTL (half the 30s slashing evidence window)
- 500ms probe timeout for inter-continental coverage
- Gossip validation: signature, registry, timestamp freshness, monotonic
- Registry check before paid pulls (content discovery step 5)
- Probe rate limits: 10 outbound fan-outs/s, 20 inbound/peer/s
- Cascading cached provider fallback before full fan-out
- Prefetching via local demand + network popularity signals
- App server as external component (WebSocket/SSE, not cdn/keys/v1)

Conflict resolution preserved PR #85's additions:
- Node Selection Algorithm with reputation weighting
- Registry Unavailability with retry/fallback
- Redirect loop prevention, StreamError enum, retry semantics
- Challenge bond, channel expiry, NodeId-to-Ethereum binding
- ADRs 007, 009, 010, 011

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@thiras thiras changed the title docs: batch fix 30 ADR issues, integrate cdn/keys/v1 protocol docs: batch fix 30+ ADR issues, integrate separated discovery design Mar 31, 2026
@thiras
thiras merged commit c0b7db6 into main Mar 31, 2026
@thiras
thiras deleted the fix/adr-wave-1-critical-foundations branch March 31, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants