Skip to content

ADR review: 22 medium-severity consistency and completeness gaps #94

Closed

Description

@thiras

Severity: MEDIUM (aggregated)

22 medium-severity issues found during ADR architecture review. Grouped by theme below.


Cross-ADR Consistency (7 issues) — ✅ Fixed in #96

  • bindNodeId() vs registerNode() naming conflict — architecture.md references StakingRegistry.bindNodeId(), ADR 001 defines registerNode(), ADR 003 defines a separate bindNodeId(). Responsibilities overlap. (architecture.md, 001, 003)
  • StreamRequest missing ephemeral binding fields — ADR 005's wire format lacks the ethereum_address and binding_signature fields defined in ADR 003 for client identity verification. (003, 005)
  • Overloaded "nonce" term — nonce means both "channel creation counter" and "voucher sequence number" in ADR 003. Rename channel creation counter to channelNonce. (003, 005)
  • Gossip topic reputation/v1 breaks cdn/ prefix convention — All other topics use cdn/ prefix. ADR 005 doesn't list the reputation topic at all. Rename to cdn/reputation/v1. (005, 008)
  • ADR 005 omits reputation and watchtower gossip topics — The authoritative wire protocol spec lists only NodeAnnounce topics, not reputation/v1 or planned WatchtowerAnnounce. (005, 007, 008)
  • ADR 010 channel ID formula change undocumented — Adds token field to keccak256(client, provider, token, nonce) without noting the breaking change from ADR 003's formula. (003, 010)
  • Dispute window default value not in contract spec — ADR 003 says "default 24 hours, governable 12h–72h" but the initial deployment value is not specified in the contract interface. (003, 009)

Security / Architecture Gaps (9 issues)

  • Counter-evidence for timestamp manipulation underspecified — Gossip is off-chain; the ADR doesn't explain how a node proves on-chain that it published a rate change between two disputed timestamps. (003, 005)
  • Legitimate cache eviction falsely slashable — A blob evicted by LRU between probe (has_blob: true) and stream request (within 30s) triggers phantom blob slashing. No defense for the eviction case. (003, 005)
  • 500ms unconditional probe wait with no early exit — Every cache miss adds 500ms latency even if a nearby node responds in 5ms. Consider early exit for sufficiently good scores. (001)
  • No maximum blob size — Creates unbounded resource risks (cache exhaustion, 100K vouchers per stream for large blobs). Set a PoC configurable max or document the trade-off. (002, architecture.md) — ✅ Fixed in docs: add per-node max_blob_size with BlobTooLarge error in ADR 005 #114
  • XChaCha20-Poly1305 nonce storage unspecified — ADR 006 omits how the 24-byte nonce is stored/transmitted. Client needs it to decrypt. (006) — ✅ Fixed in docs: specify XChaCha20-Poly1305 nonce storage in ADR 006 #112
  • server_secret compromise exposes all epoch keys — No forward secrecy; compromise retroactively exposes all content wrapped under that secret. Should recommend HSM-backed derivation for production. (006)
  • Watchtower heartbeat proves chain liveness, not voucher state — A watchtower that lost its voucher database still submits valid heartbeats. Limitation should be explicitly acknowledged. (007) — ✅ Fixed in docs: acknowledge heartbeat proves chain liveness not voucher state in ADR 007 #111
  • Watchtower gas bonus payment has no enforcement — Post-facto off-chain payment; watched party can refuse after dispute settles. (007)
  • ADR 010 zero RateBounds default bypasses rate floor — New tokens added without explicit bounds have no floor enforcement, undermining ADR 009's free-riding protection. (009, 010) — ✅ Fixed in docs: enforce mandatory rate bounds on addToken in ADR 010 #113

Completeness Gaps (6 issues)


Found during ADR architecture review (2026-04-01)

Activity

  1. added
    kind:docs
    design:adr
    on Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    design:adrkind:docs

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions