Skip to content

ContentBlacklist: comment and ADR-citation rot around getBlacklistVersion() #1297

Closed

Description

@yigitdot

Follow-up from the review of #1291 (merged). Refs #1181.

#1291 landed in two commits: the first bumped _blacklistVersion only on hash add/remove and documented it that way; the second (responding to review) made the appeal-driven suspended toggle bump it too, via a new _setEntrySuspended choke point. The second commit updated only some of the prose the first wrote.

No behavior is wrong — this is purely doc accuracy.

Contract

  • contracts/src/ContentBlacklist.sol:207-220 — the _blacklistVersion storage NatSpec still says "Bumped once per hash add and once per hash removal, across every path" and names "the two internal choke points \_addHash and \_removeHashRegional". There are now three choke points, and suspend/resume also bumps. It directly contradicts the getBlacklistVersion() NatSpec at :493, which is correct. This is the highest-value fix: the stated rationale — "so no call site has to remember to increment it" — is exactly what a maintainer adding a new appeal path will rely on, and following it as written would produce a missed bump.

  • :501 and :909-910, plus contracts/test/ContentBlacklist.t.sol:236 — these cite ADR 011 § 248 and § 325, which are line numbers, not section names. The substance checks out (both lines do say operators detect resumption via the getBlacklistVersion() poll cycle), but the pointers rot on the next ADR edit. Verified replacements: § Authority and flow (heading at line 210) and § Compliance Window (heading at line 313).

  • :498 and :908, plus ContentBlacklist.t.sol:178 — say isBlacklisted, which is the ADR's name for the view. The contract's actual externals are isHashBlacklisted / isHashBlacklistedInRegion / isHashBlacklistedForOperator (:449/:453/:467). A maintainer grepping the contract for isBlacklisted finds nothing. Reserve that spelling for explicit ADR quotations.

Tests

  • contracts/test/ContentBlacklist.t.sol:146 — the docblock claims test_getBlacklistVersion_bumpsOnEveryAddAndRemove covers "the appeal-ratification path (which removes via the same choke point)". It does not: the test only calls addHashGlobal/addHashRegional/removeHashGlobal/removeHashRegional and never touches an appeal. Ratification is covered by the test at :210. Risk: someone trusting this docblock deletes the real ratification assertion as redundant.

  • contracts/test/ContentBlacklist.t.sol:206 — // Ratification removes the entry, so that one bumps. sits immediately above the fastTrackBlacklistAppeal call, which is a different bump; the ratify call is two lines below. The fast-track's own bump — the reason versionAfterSuspend must be captured rather than compared against versionAfterAdd — is left unexplained, and that is the one thing a reader needs there.

ADR

  • adr/011-content-takedown.md:143 (§ Blacklist version) still reads "incremented on every add/remove operation across all paths". The contract now exceeds this — it also bumps on appeal-driven suspend/resume, justified by § Authority and flow and § Compliance Window, which both have operators detect appeal resumption off this poll cycle. Three contract comments cite § Blacklist version as authority for behavior it does not describe. Amend it to include suspend/resume so the citations are fully supported.

Activity

  1. added
    kind:docs
    prio:low
    area:contracts
    on Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:contractskind:docsprio:low

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions