Repository navigation
docs(adr): demote watchtower to permissionless fraud-detection appendix - #422
Merged
Merged
Conversation
…ix (#420) Resolves the ADR 007 ↔ ADR 027 contradiction surfaced in #420 and the unfunded receipt-validator economics referenced by ADR 027 §Negative. Watchtowers were specified as a protocol participant (own ALPN, escrow contract, subscription fee model). With ADR 027's permissionless- challenger model and the existing SlashJudge bond machinery from ADR 014, no dedicated subscription role is needed. Reframed as: any third party may monitor the L2 chain and submit bonded challenges against fraudulent settlements (closeChannel with stale vouchers) and fraudulent epoch summaries (commitEpochSummary with inflated claimedDistinctClients). Economics are bond + reward on success, MEV-style — no per-channel registration, no heartbeat, no ALPN, no node collaboration. Changes: - Delete ADR 007 and appendix-watchtower-economics.md - New appendix-fraud-detection.md documenting the optional layer - ADR 003 absorbs the L2 sequencer-censorship analysis (own §) and documents the three-layer stale-close defense (local monitor + operator redundancy + permissionless dispute submission) - ADR 027 §5 rewritten as "Challenger role" pointing to the appendix; fee-structure orphan reference fixed - ADR 005 drops cdn/watchtower/v1 ALPN, sequence diagram, stream limit, idle-timeout exception - ADR 013 drops WatchtowerMessage enum - ADR 009 drops WatchtowerEscrow governance parameters - ADR 016 drops WatchtowerEscrow contract from inventory, call graph, fund-custody table, EIP712 domain list, deployment topology - appendix-poc-production-seams drops WatchtowerClient seam - appendix-operator-upgrade-path drops §4.1 Watchtowers; voucher-format upgrade now references the local dispute monitor - Sweep all cross-references in ADRs 008, 010, 011, 014, 015, 017, 026, appendix-l2-deployment, appendix-operator-key-rotation, architecture.md, README, CONTRIBUTING, CLAUDE - Drop ALPN_WATCHTOWER constant from crates/protocol/src/lib.rs and the WatchtowerAnnounce reservation in gossip.rs PoC contract shims for permissionless challenger (no msg.sender restriction on disputeChannel, ChannelClose/Disputed/Settled events) were already documented in ADR 003 — no new contract surface needed. Closes #420 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request refactors the protocol's security architecture by decommissioning the formal 'Watchtower' role, the WatchtowerEscrow contract, and the cdn/watchtower/v1 ALPN protocol. These components are replaced by a permissionless fraud-detection layer that leverages the existing SlashJudge bond mechanism for on-chain challenges. The review feedback identifies a missing state flag in the Channel struct necessary to enforce the 'one extension per close' constraint for the newly introduced forced-inclusion deadline extension. Additionally, a correction is required for an internal documentation reference concerning the definition of receipt-fraud rewards.
This was referenced May 6, 2026
…pt-fraud reward reference Addresses gemini-code-assist review on PR #422. ADR 003 / ADR 010 — Channel struct - Add `bool extended` flag so the contract can enforce "one extension per close" on the forced-inclusion deadline-extension path. Without this state, repeated forced-inclusion `disputeChannel` calls could each re-trigger an extension whenever the remaining time drops below 24h, opening an indefinite-delay vector. The constraint was lifted into ADR 003 from the (now removed) ADR 007 in this PR series, so the storage layout that backs it now belongs here. - Update the L2 sequencer censorship section to reference the flag and spell out the `closeChannel` reset. ADR 027 / appendix-fraud-detection - The receipt-fraud reward size was forwarded to "§7", but §7 is failure semantics (gauge-zeroing on successful challenge), not reward sizing. Reframe as a parameter on the SlashJudge receipt-fraud challenge handler, governable per ADR 009; concrete default/bounds are pending with the handler. Validation: pre-commit run --files passes (markdownlint, deny).
3 of 4 tasks
4 of 5 tasks
alpergundogdu
added a commit
that referenced
this pull request
May 15, 2026
The Permissionless Fraud-Detection Layer was demoted from an ADR to an appendix (#422), but architecture.md's Chapter 5 reading order still listed it as item 8 — a stale leftover. It already appears in the Appendices section, and the adrs-book build groups appendices at the end (not interspersed in chapters), so the Chapter 5 entry contradicted both the Appendices section and the README command. Remove the line. Resolves the inconsistency flagged in PR review; the suggested alternative (also listing it in the README Chapter 5 block) would have compiled appendix-fraud-detection.md twice into the PDF. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
alpergundogdu
added a commit
that referenced
this pull request
May 15, 2026
* docs(adr): fix and enrich the ADR book PDF build - Fix mermaid-filter build failure: the ADR 011 and ADR 028 appeal sequence diagrams used `;` in message text, which Mermaid parses as a statement separator. Replace with `—` / `,`. This broke both the adrs.pdf and adrs-book.pdf builds. - Make the reading-order book exhaustive: add appendix-binaries.md and appendix-bundles.md to architecture.md's Appendices index and the README adrs-book command (they were never wired in — hand-maintained list drift, same class as the ADR 031 omission #566 fixed). - Reading-order book only: add full-page chapter/appendix divider pages (_build/part-*.md) with a title and 2–3 sentence intro derived from architecture.md's Reading Order. The numeric adrs.pdf is unchanged. - Drop the redundant `cd adr` from both README build commands — README.md lives in adr/, so the reader is already there. - Exclude adr/_build/ from markdownlint (pandoc concatenation fragments, not standalone documents). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * ci: exclude adr/_build/ from markdownlint-cli2 The CI markdownlint job uses DavidAnson/markdownlint-cli2-action, which does not read .markdownlintignore (that is a markdownlint-cli v1 feature, used by the local pre-commit hook). Add !adr/_build/** to the workflow glob negation list so the pandoc build fragments are excluded in CI too, matching the existing !.github/agents/** pattern. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * docs(adr): drop stale fraud-detection line from architecture.md Ch5 The Permissionless Fraud-Detection Layer was demoted from an ADR to an appendix (#422), but architecture.md's Chapter 5 reading order still listed it as item 8 — a stale leftover. It already appears in the Appendices section, and the adrs-book build groups appendices at the end (not interspersed in chapters), so the Chapter 5 entry contradicted both the Appendices section and the README command. Remove the line. Resolves the inconsistency flagged in PR review; the suggested alternative (also listing it in the README Chapter 5 block) would have compiled appendix-fraud-detection.md twice into the PDF. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
thiras
added a commit
that referenced
this pull request
Sep 10, 2026
…1983) * docs: sync README with the tree and retarget dangling ADR citations README.md had drifted far enough that several of its claims were false against the code. It documented a `gossip` crate and an `iroh-gossip` wire protocol that exist nowhere, listed 9 of the 11 workspace crates, and described a CLI surface of 5 top-level commands when there are 12 -- naming `node peers`, `node announce`, and `bundle create`, none of which exist. It also pointed at a status note that was never written. Rewrite it against the tree: three ALPNs, all 11 crates, a grouped table of the real command surface, and new Status, Quickstart and License sections. Add CI, Security, license and MSRV badges. Correct the selection score to the unified formula in ADR 001, the discovery fallback to the on-chain origin directory per ADR 022, and the bao mechanism per ADR 038. Drop the multi-token payments bullet: no live ADR supports an ERC-20 allowlist, and ADR 016 fixes USDC at deployment. Separately, ADR 007, 020, 021, 023 and 025 were demoted to appendices in #349 and #422, but 23 citations across 18 files still named the numbered files. Retarget them to `adr/appendix-local-admin-http.md` and `adr/appendix-observability.md`. Add all five numbers to the do-not-reuse list in CLAUDE.md and advance the counter to 042. Remove `node region-stats` from CLAUDE.md, the binaries appendix, and the admin appendix's DTO list -- that subcommand exists nowhere. Update the crates.io description and the clap help, which claimed a `publish` vetting step the module doc calls impossible and had `bundle` inverted. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Kt6vxCuFjhTgkMfU4Q3WGc * docs: make the cli crate blurb non-exhaustive The crate-structure line enumerated 6 of 12 commands, omitting fetch, setup, pool, publish, appeal and whoami -- the same enumeration drift this branch removes elsewhere. Point at the CLI Surface table instead, so the command list lives in exactly one place. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Kt6vxCuFjhTgkMfU4Q3WGc --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #420.
Resolves the ADR 007 ↔ ADR 027 contradiction and the unfunded receipt-validator economics surfaced in #420. Watchtowers were specified as a protocol participant (own ALPN, escrow contract, subscription fee model); with ADR 027's permissionless-challenger model and the existing
SlashJudgebond machinery from ADR 014, no dedicated subscription role is needed.What changes
Reframed as: any third party may monitor the L2 chain and submit bonded challenges against fraudulent settlements (
closeChannelwith stale vouchers) and fraudulent epoch summaries (commitEpochSummarywith inflatedclaimedDistinctClients). Economics are bond + reward on success, MEV-style — no per-channel registration, no heartbeat, no ALPN, no node collaboration.Removed
adr/007-watchtower.mdadr/appendix-watchtower-economics.md(subscription cost model no longer relevant)cdn/watchtower/v1ALPN (ADR 005, ADR 013, ADR 015,crates/protocol/src/lib.rs)WatchtowerEscrowcontract surface (ADR 009 governance params, ADR 016 inventory/call-graph/fund-custody, EIP712 domain list)WatchtowerClientseam fromappendix-poc-production-seamsappendix-operator-upgrade-pathAdded
adr/appendix-fraud-detection.md— optional, anyone-can-run on-chain monitoring layer§ L2 sequencer censorship) and documents the three-layer stale-close defense (local in-process monitor + operator-arranged redundancy + permissionlessdisputeChannelsubmission)Edited
§Negativeorphan fee-structure reference replaced withSlashJudgebond mechanismappendix-l2-deployment,appendix-operator-key-rotation,architecture.md, ADRREADME.md, top-levelREADME.md,CONTRIBUTING.md,CLAUDE.mdWhy this is doc-only
The PoC contract shims that the permissionless challenger model needs — no
msg.senderrestriction ondisputeChannel, theChannelCloseInitiated/Disputed/Settledevents, theChallengeReceiptSummaryhandler — were already specified in ADR 003 and ADR 014 / ADR 027. ADR 007 §8 had said the PoC didn't implement watchtowers anyway. So this PR is purely documentation; no contract or runtime code changes.Validation
cargo build— cleancargo clippy --workspace --all-targets— cleancargo fmt --check— cleanpre-commit run --all-files— all hooks pass (markdownlint, cargo fmt/clippy/doc/deny)grep -rn 'watchtower\|WatchtowerEscrow\|cdn/watchtower\|ALPN_WATCHTOWER'returns no matches outside_history/and the new appendixTest plan
007-watchtower.mdlinks)disputeChannel, events) remain documented in ADR 003🤖 Generated with Claude Code