Skip to content

docs(runbook): add ContentBlacklist compliance section (#738) - #766

Merged
thiras merged 3 commits into
mainfrom
docs/738-contentblacklist-runbook
Jun 1, 2026
Merged

thiras merged 3 commits into
mainfrom
docs/738-contentblacklist-runbook

Conversation

@thiras

@thiras thiras commented Jun 1, 2026 •

Copy link
Copy Markdown
Contributor

Closes #738.

What

Adds a ## ContentBlacklist compliance section to docs/runbook.md documenting the end-to-end content-takedown flow for operators: how a node learns about a newly blocked hash, how to purge it, the slashing predicate that applies, and the appeal path. PR #675 shipped the ContentBlacklist contract and ADR 011/031 are finalized, but the runbook had no section — only stray references to blacklist-sync alerts in RPC unreachable and Slashing risk — leaving operators with no first-response procedure at launch (poc-blocking).

The section follows the file's established Symptoms → Detect → Remediate shape and is placed after Slashing risk (adjacent subject matter).

Documented to the shipped PoC contracts, not just the ADR

The runbook is operator-facing and slash-bearing, so it describes what the deployed ContentBlacklist / SlashJudge actually do today, and labels the fuller ADR 011/031 design as deferred where the PoC contracts diverge (per code review on this PR). Verified against contracts/src + script/DeployProtocol.s.sol:

  • No grace window. SlashJudge._checkBlacklistedBefore slashes any delivery whose response timestamp is at/after the entry's addedAt (global-only at PoC); HashEntry has no effectiveAt. The earlier draft's ADR 24h/2h "compliance window" was a slash-risk error and is replaced with the actual predicate.
  • No getBlacklistVersion() on the deployed contract — the ADR sync loop needs a contract change too, not just node work; framed as design intent.
  • The automated node-side poller/watcher is not implemented, and decdn_blacklist_sync_lag_seconds / _version_behind are defined in monitoring/ but not emitted yet (cf. decdn_streams_active).
  • Operator-level ejection (addOperator → CapacityBond.ejectNode, EjectedByBlacklist) is enforced today, passively via the getActiveNodes filter.
  • Manual purge lever that exists today: decdn node evict <hash> (admin_v1_evict, durable evicted.log, --dry-run).
  • Manual on-chain check: isHashBlacklisted / isHashBlacklistedInRegion with region as bytes32 (bytes32("GLOBAL") sentinel).
  • Appeal surface as deployed: appealBond default 100 TOKEN; standingPath recorded but not enforced; any non-zero region appealable; bond refunded only on ratification, burned on rejection/reversal/lapse.

Scope

Docs-only — no ADR, contract, or code changes. ADRs remain the design source of truth; the runbook reports PoC implementation state and cites the ADRs as intent.

Verification

  • Function names, view signatures, the slash predicate, appeal bond/outcomes, and the bytes32 region encoding all checked against contracts/src/ContentBlacklist.sol, contracts/src/SlashJudge.sol, and script/DeployProtocol.s.sol.
  • ADR section anchors (#node-behavior, #compliance-window, #blacklist-entry-appeals) and alert names verified against source.
  • pre-commit run --files docs/runbook.md → all hooks pass (markdownlint included).

🤖 Generated with Claude Code

Adds an operator runbook section covering the end-to-end ContentBlacklist
compliance flow: how a node is meant to learn about a newly blocked hash,
how to purge it, the compliance window, and the appeal path — closing the
poc-blocking gap from #738.

Accurate to current implementation state, matching the runbook's existing
honest tone:

- The designed poll-and-evict flow (ADR 011 § Node Behavior) is documented
  but flagged as not yet implemented — there is no blacklist poller/watcher
  in crates/, and decdn_blacklist_sync_lag_seconds / _version_behind are
  defined in monitoring/ but not emitted by the node (cf. decdn_streams_active).
- Operator-level ejection (addOperator → CapacityBond.ejectNode,
  EjectedByBlacklist) is correctly described as enforced passively via
  getActiveNodes filtering.
- The manual purge lever that exists today — `decdn node evict <hash>`
  (admin_v1_evict, durable evicted.log, --dry-run pre-flight) — is the
  documented remediation.
- Appeal path summarized with deferral to ADR 011 § Blacklist Entry Appeals
  and ADR 031; the distinct ADR 028 SlashAppeal restitution path is called
  out to pre-empt the common operator confusion.

Docs-only; no ADR or contract changes. All anchors, alert names, and
contract function names verified against source. pre-commit passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings June 1, 2026 16:16

@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 adds a new section to the runbook documentation detailing ContentBlacklist compliance, including symptoms, detection, manual remediation, and appeal processes. The review feedback suggests minor corrections to align the documentation with the actual smart contract implementation, specifically clarifying that the region parameter is of type bytes32 and correcting the function name from isBlacklisted to isHashBlacklisted.

Comment thread docs/runbook.md Resolved
Comment thread docs/runbook.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

Adds an operator runbook section documenting how to respond to on-chain content takedown (ContentBlacklist) updates, including detection signals, manual purge commands, compliance timing, and the appeal path—intended to provide a first-response procedure at launch.

Changes:

  • Add a new “ContentBlacklist compliance” section in docs/runbook.md following the runbook’s Symptoms → Detect → Remediate structure.
  • Document detection via Prometheus alerts and manual contract queries, plus remediation via decdn node evict <hash>.
  • Summarize the intended automated sync flow and the blacklist-entry appeal flow with links to ADR 011/031/028.

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

Comment thread docs/runbook.md Resolved
Comment thread docs/runbook.md Resolved
Comment thread docs/runbook.md Resolved
Comment thread docs/runbook.md Resolved
Comment thread docs/runbook.md Resolved
Comment thread docs/runbook.md Resolved
Comment thread docs/runbook.md Resolved
Comment thread docs/runbook.md Resolved
Comment thread docs/runbook.md Resolved
Comment thread docs/runbook.md Resolved
thiras and others added 2 commits June 1, 2026 19:38
Addresses code review (#766): the section described ADR 011 design where the
deployed contracts diverge. For an operator/slash-risk runbook, shipped
behavior is what matters. Verified against contracts/src and the deploy script:

- No grace window. SlashJudge._checkBlacklistedBefore slashes any delivery at
  or after the entry's addedAt; ContentBlacklist.HashEntry has no effectiveAt.
  Replaced the (unenforced) ADR 24h/2h compliance window with this — it was a
  slash-risk doc bug telling operators they had a buffer they don't.
- Blacklist slashing is global-only at PoC (SlashJudge line ~70); regional
  entries are a compliance obligation but not slashable yet.
- getBlacklistVersion() does not exist on the deployed contract — the ADR sync
  loop needs a contract change too, not just node work. Reframed as design.
- Manual check: region is bytes32 with bytes32("GLOBAL") sentinel; documented
  the cast encoding and getHashEntry(region, hash) accessor.
- Function name isBlacklisted -> isHashBlacklisted.
- Appeal: bond default 100 TOKEN (not 1,000); standing recorded but not
  enforced; any non-zero region appealable (global included); bond refunded
  only on ratification, burned on rejection/reversal/lapse.

ADRs remain design source of truth; the runbook now reports PoC implementation
state and cites the ADRs as intent. pre-commit passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Independent /review pass on the ContentBlacklist section:

- Slash boundary: SlashJudge._checkBlacklistedBefore reverts when
  addedAtUs >= responseTsUs, so a delivery is slashable only strictly
  after addedAt — corrected "at or after" to "strictly after" (a delivery
  at addedAt itself is not slashable). The prior wording overstated exposure.
- Operator-level ejection: ejectNode also emits the nodeId-indexed
  NodeAutoEjected, which the staker-set watcher DOES follow and applies live
  (chain_staker_set.rs:292-333) — reworded the "passive via getActiveNodes"
  claim to describe the live event path; only EjectedByBlacklist is unsubscribed.
- Grafana: only the sync-lag panel references a blacklist metric
  (version_behind is alerts-only) — tightened the wording.
- Regional-slashing deferral: cite SlashJudge.sol / ADR 014 (the actual
  source), not ADR 011 § Node Behavior.
- Internal consistency: the pre-existing "RPC unreachable" and "Slashing risk"
  sections presented the blacklist-sync alerts/metric as live; added caveats
  pointing to the new section so the runbook no longer contradicts itself.

Kept the ADR-designed `HashBlacklisted` StreamError reference — it is defined
in ADR 011 §StreamRequest Response and the sentence is explicitly design-framed.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@thiras
thiras merged commit 5d0fa9c into main Jun 1, 2026
19 checks passed
@thiras
thiras deleted the docs/738-contentblacklist-runbook branch June 1, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants