Repository navigation
Description
Summary
Remove the ContentBlacklist coupling from OriginAssignment and push the one filter it uniquely provides down to the routing consumer, where the blacklist deny-set already lives in memory. This is a spec-discipline / governance-hardening simplification (burden-of-proof-on-keeping): the on-chain seat guard is opportunistic, not enforcement, and fails the trustless axiom + the redundant-signal gate.
Why
Namespace origins are routing-only (ADR 002; the authorized-origin serve gate was removed in #1525). OriginAssignment uses ContentBlacklist in exactly two spots:
addOrigin— revertsOperatorBlacklistedif_isBlacklisted(operator), immediately after it already checkscapacityBond.isActive(operator).pruneBlacklistedOrigin— permissionless removal of a seated operator iff blacklisted.
Findings from the evaluation:
- Operator-level blacklist is redundant with
isActive.ContentBlacklist.addOperatorcallsCapacityBond.ejectNode, which latchesejected = true, soisActivealready returns false. TheisOperatorBlacklistedhalf of theaddOriginguard is dead weight next to theisActivecheck on the line above. - Origin-level blacklist (
setOriginBlacklist/emergencyAddOrigin) deliberately does NOT eject, so those operators stayisActive == true. This is the only case theaddOrigin/prune blacklist coupling uniquely catches on-chain. - The seat check is opportunistic, never enforcement. ADR 011 (§ Cross-contract integration / § Interaction with ContentBlacklist) already states it never re-runs after seating and that consumers must re-filter
getOriginsregardless of stale state. No on-chain contract readsgetOrigins/isAuthorizedOriginas an authorization gate. - Node routing already self-filters
getOrigins— but byisActiveonly, not blacklist. The blacklist deny-set (origin ∪ operator union) is already synced into node memory (content_deny) and enforced at the serve/payment gate against the funder; it is simply not applied to the origin the node routes to.
The one concrete failure the coupling uniquely prevents today: an origin-blacklisted-but-still-bonded operator remains in getOrigins, and the node's origin-pull fallback routes to it because node routing filters getOrigins by isActive only, not by blacklist. The trustless fix is to add the blacklist predicate to the consumer's existing re-filter (data already in memory), not to keep an on-chain guard the consumer is supposed to distrust.
The full cut
Contracts (OriginAssignment):
- Remove the
contentBlacklistpointer,setContentBlacklist,ContentBlacklistUpdated,_isBlacklisted, theaddOriginblacklist branch, and theIContentBlacklistOriginViewdependency (delete the interface — OriginAssignment is its only user). - Replace
pruneBlacklistedOriginwith a permissionlesspruneInactiveOriginkeyed on!capacityBond.isActive(covers unbonded / deregistered / ejected — including operator-blacklisted, which are ejected — and is the more useful cap-slot-hygiene predicate). RenameBlacklistedOriginPruned→InactiveOriginPruned; dropContentBlacklistNotSet/OperatorBlacklisted/OperatorNotBlacklisted. - Drop the
contentBlacklist_constructor param; this erases the entire deployment-window special case (theaddress(0)-at-deploy branch, thesetContentBlacklist(0)regression guard, the "prune reverts until wired" state). - Update the deploy script (
BaseProtocolDeploy),DeployProtocol.t.sol, andOriginAssignment.t.sol.
Node (Rust): apply the in-memory content_deny deny-set in the getOrigins re-filter next to the existing isActive check, so the routing consumer protects itself — landing in the same PR so the gap never opens.
ADRs: update ADR 011 (origin blacklisting / prune / cross-contract integration / interaction with ContentBlacklist) and ADR 016 (deployment order + post-deploy init) to the new shape.
This also moots the parked setContentBlacklist set-once decision — nothing left to set.
Full evaluation in the spec-discipline pass; verdict = simplify.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Projects
- StatusShow more project fieldsDone
Activity
refactor(contracts,node)!: drop ContentBlacklist coupling from Origin…