Repository navigation
docs(runbook): add ContentBlacklist compliance section (#738) - #766
Conversation
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]>
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.mdfollowing 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.
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]>
Closes #738.
What
Adds a
## ContentBlacklist compliancesection todocs/runbook.mddocumenting 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 theContentBlacklistcontract 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/SlashJudgeactually do today, and labels the fuller ADR 011/031 design as deferred where the PoC contracts diverge (per code review on this PR). Verified againstcontracts/src+script/DeployProtocol.s.sol:SlashJudge._checkBlacklistedBeforeslashes any delivery whose response timestamp is at/after the entry'saddedAt(global-only at PoC);HashEntryhas noeffectiveAt. The earlier draft's ADR 24h/2h "compliance window" was a slash-risk error and is replaced with the actual predicate.getBlacklistVersion()on the deployed contract — the ADR sync loop needs a contract change too, not just node work; framed as design intent.decdn_blacklist_sync_lag_seconds/_version_behindare defined inmonitoring/but not emitted yet (cf.decdn_streams_active).addOperator→CapacityBond.ejectNode,EjectedByBlacklist) is enforced today, passively via thegetActiveNodesfilter.decdn node evict <hash>(admin_v1_evict, durableevicted.log,--dry-run).isHashBlacklisted/isHashBlacklistedInRegionwithregionasbytes32(bytes32("GLOBAL")sentinel).appealBonddefault 100 TOKEN;standingPathrecorded 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
contracts/src/ContentBlacklist.sol,contracts/src/SlashJudge.sol, andscript/DeployProtocol.s.sol.#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