Skip to content

docs(adr): drop SlashJudge.maxActiveChallengesPerNode — synchronous resolution removed the threat - #501

Merged
thiras merged 1 commit into
mainfrom
drop-max-active-challenges
May 10, 2026
Merged

thiras merged 1 commit into
mainfrom
drop-max-active-challenges

Conversation

@thiras

@thiras thiras commented May 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Removes the ##### Challenge rate limit subsection from adr/014-on-chain-verification.md and the Max active challenges per node row from adr/009-governance.md's governable-parameters table.
  • Justification: with docs(adr): resolve corruption at the wire — drop ADR 014 §2 + OffenseType.Corruption #480 having dropped OffenseType.Corruption and §2's optimistic challenge-response, all three remaining offense types (Phantom, RateManipulation, Blacklist) resolve synchronously at submit time. ADR 014 already concedes this twice — the inline interface comment (lines 147–150) and §Bond Handling (line 199). Spurious challenges revert and the bond is not transferred (§Bond Handling line 200), so there is nothing for a defender to "monitor and dispute outcomes off-chain." Valid challenges deserve to slash. Operator-initiated appeals live in ADR 028 against SafetyReserve with their own bond / frequency-cap deterrents and don't motivate a SlashJudge-side cap.
  • No contract code touched — crates/contracts/ is empty per decdn/CLAUDE.md.

Closes #494.

Test plan

  • grep -rn 'maxActiveChallenges\|Challenge rate limit\|Max active challenges' decdn/ returns no matches.
  • ADR 014 markdown structure intact: ISlashJudge interface fence at line 152 is followed by a blank line and #### Evidence Verification Per Offense Type (no orphaned #####).
  • ADR 009 governable-parameters table renders cleanly (the Max evidence age row still sits between Namespace transfer timelock and MMR retention buffer).
  • pre-commit run --all-files (markdownlint + trailing-whitespace etc.) passed on commit.

🤖 Generated with Claude Code

…esolution removed the threat

Closes #494.

The `##### Challenge rate limit` subsection in ADR 014 and its row in ADR 009's
governable-parameters table are stale artifacts of the previous async dispute
design. After PR #480 dropped `OffenseType.Corruption` and §2's optimistic
challenge-response, all remaining offense types (Phantom, RateManipulation,
Blacklist) resolve synchronously at submit time — ADR 014 lines 147–150 and
§Bond Handling line 199 already concede this. Spurious challenges revert
without bond transfer (line 200) so there is nothing for a defender to monitor
or dispute off-chain; valid challenges deserve to slash. Operator-side appeals
live in ADR 028 against `SafetyReserve` with their own deterrents and don't
motivate a `SlashJudge`-side cap.

No contract code is affected — `crates/contracts/` is empty.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings May 10, 2026 06:35

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

Removes documentation references to SlashJudge.maxActiveChallengesPerNode from the ADRs, aligning ADR 014/009 with the post-#480 model where remaining offense types resolve synchronously at submit time and do not accumulate “active challenge” state.

Changes:

  • Deleted the “Challenge rate limit” subsection from adr/014-on-chain-verification.md.
  • Removed the “Max active challenges per node” governable-parameter table row from adr/009-governance.md.
  • Verified no remaining repository references to maxActiveChallengesPerNode / “Challenge rate limit” / “Max active challenges per node”.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
adr/014-on-chain-verification.md Drops the challenge rate-limit subsection under ISlashJudge now that synchronous resolution makes “active challenges” non-applicable.
adr/009-governance.md Removes the corresponding governable parameter row to keep the governance parameter list consistent with ADR 014.

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

@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 removes the maxActiveChallengesPerNode parameter and its associated rate-limiting logic from the governance and on-chain verification documentation (ADR 009 and ADR 014). I have no feedback to provide as there were no review comments to evaluate.

@thiras

thiras commented May 10, 2026

Copy link
Copy Markdown
Contributor Author

Pushed harder on whether the cap is genuinely dead weight — yes, it is

After the initial review I went back and read ADR 014 in full + the diff history. The investigation tightened the case for removal rather than loosening it.

Smoking gun: PR #480's own diff retrofitted the justification

Diff of the §Challenge rate limit subsection at PR #480:

Before #480: "concurrent active (unresolved) challenges per target node… bounds the defender's concurrent counter-evidence response burden and prevents griefing… many simultaneous spurious challenges to force operational disruption."

After #480: "concurrent active challenges… Although all four offenses resolve synchronously and do not accumulate 'active' state in the dispute sense, the cap still bounds per-block transaction-level griefing… force the defender to monitor and dispute outcomes off-chain."

The original rationale (counter-evidence response burden) was load-bearing — async dispute meant defenders had operational state to monitor. PR #480 deleted that flow but kept the cap and replaced the rationale with an awkward "although there's no active state, …" hedge. Issue #494 correctly identifies this hedge as exactly the part that fails: with no off-chain dispute path, the defender has nothing to monitor.

Threat-modeling sweep — no surviving role

Candidate threat Defended by cap?
Async dispute monitoring burden No flow exists post-#480
Spurious-challenge spam Reverts pre-state-write (§Bond Handling line 200); cap can't even count them
Replay of valid evidence Cap of 10 still allows ejection (3 slashes per ADR 026 §8); needs evidenceHash dedup, not a per-block cap
Coordinated griefing of one operator Real defense is ADR 028 §5 CORRELATED_ATTACK_WAIVER — adapts the operator's appeal capacity, not the attacker's submit rate
Storage-growth DoS Per-slash cost is bounded; ejection terminates the curve at ~70% stake loss
Block-gas DoS Cap targets one operator; doesn't bound block fill

Maximum economic harm is bounded at ~70% by the 5/15/50 escalation + auto-ejection (ADR 026 §8). After the 3rd slash, additional slashes are inert — so the cap can't even reduce attacker damage, only spread it across more blocks, which gives an operator no defense window in the synchronous design.

Two adjacent artifacts not in this PR (recommend follow-ups, not blockers)

  1. Line 218 has parallel stale text. The gas-table row for submitRateChallenge still reads "calldata + storage for pending challenge + bond transfer". Rate manipulation became an immediate slash in d522ccd ("drop RateChange gossip; rate manipulation becomes immediate slash"); the current §Rate manipulation flow (lines 175–179) has zero pending state. Same artifact class as the cap subsection — happy to fold a one-word fix into this PR if reviewers want it, otherwise follow-up.

  2. No on-chain evidence-replay protection. Grepped for replay|deduplic|already.*slash|seenEvidence|consumedEvidence: only hit is "cross-contract replay" (different concept — prevented by EIP-712 domains). The same (probeStructHash, streamStructHash) pair, legitimately captured from the wire, appears submittable multiple times within MAX_EVIDENCE_AGE_US (5 days), each producing a fresh slashId and walking the operator through ejection on a single offense. Removing the cap doesn't make this worse — but it's a real open question that probably wants its own issue.

Recommendation

Stands as-is. Cap removal is correct; the "per-block transaction-level griefing" defense it claimed is empty in the synchronous-resolution design.

@thiras
thiras merged commit 6101354 into main May 10, 2026
15 checks passed
@thiras
thiras deleted the drop-max-active-challenges branch May 10, 2026 06:46
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.

ADR 014: drop SlashJudge.maxActiveChallengesPerNode — synchronous resolution removed the threat

2 participants