You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
contracts: CapacityBond.bond() self-reinstatement clears governance blacklist ejection — the ejected flag conflates two ban mechanisms #850
CapacityBond never consults ContentBlacklist.isOperatorBlacklisted, and the node binding survives ejection (_ejectNodeEffects only flips active / bumps registrationNonce).
Scenario
Governance blacklists operator X for repeatedly serving illegal blobs. X calls bond(minBond) then registerNode(...) and isActive() is true again within one block — fully back online as an authorized origin / channel provider. Governance must re-addOperator each cycle; the "permanent" ban is non-durable. Corollary: ContentBlacklist.removeOperator does not un-eject on CapacityBond, so re-bonding is the only un-eject path — which is exactly why the two causes got conflated.
Not a duplicate
#688 covers ADR-031 appeal-integrity mechanisms (cooldown, perjury denylist, clawback, concurrent-appeal cap), not the ejected-flag reinstatement conflation. No test locks in the current behavior.
Fix direction
Track ejection cause separately — e.g. a blacklistEjected[op] flag set only by the BLACKLIST_ROLE ejectNode path that bond() does not clear; clear it only via a governance / removeOperator-driven call. bond() reinstatement should clear only the slash-shortfall ejection. Note: CapacityBond is near the EIP-170 size limit — watch the --sizes CI gate.
CapacityBond.bond() unconditionally clears ejected[operator] on re-bond, which means a governance-blacklisted operator (banned for serving illegal content via ContentBlacklist.addOperator()) can fully self-reinstate in a single block by depositing minBond USDC. The ejected flag conflates two semantically different bans — a recoverable slash-shortfall ejection and a permanent governance blacklist ejection — with no distinction. The fix direction is explicit in the issue (split into ejected vs blacklistEjected), but CapacityBond is near the EIP-170 bytecode size limit, requiring careful implementation.
📊 Assessment
Dimension
Value
Reasoning
Type
Bug
Security defect in existing governance enforcement logic
Labels
bug, security, high, technical, poc-blocking
High-severity bypass of the protocol's primary content-enforcement mechanism; must be resolved before any network launch
Coding agent
Suitable
Fix direction is fully specified (split flags, update bond(), ejectNode(), isActive(), removeOperator cross-contract callback); constraints are stated (EIP-170 size gate)
Add mapping(address => bool) public blacklistEjected to CapacityBond
In ejectNode(): when called via BLACKLIST_ROLE path (i.e., from ContentBlacklist), set blacklistEjected[operator] = true in addition to (or instead of) ejected[operator]
In bond(): change the reinstatement guard to ejected[msg.sender] && !blacklistEjected[msg.sender] && newBalance >= minBond — only clear the slash-shortfall ejection
In isActive() / any active-check path: require !blacklistEjected[operator] as an additional gate
Add a governance-callable clearBlacklistEjection(address operator) restricted to BLACKLIST_ROLE (or a dedicated GOVERNANCE_ROLE)
Add new events: BlacklistEjected(operator), BlacklistReinstatement(operator) — distinct from Ejected/Reinstated
Write tests: happy-path (re-bond after slash ejection succeeds), revert-path (re-bond after blacklist ejection fails), governance un-eject path
Size gate
Run FOUNDRY_PROFILE=ci forge build --sizes --deny warnings before and after. CapacityBond is near EIP-170 (24 576 bytes). A new storage mapping + 2 functions will add ~200–400 bytes of deployed bytecode. If headroom is tight, consider sharing the same ejectNode function signature but encoding cause in a uint8 rather than two separate bool mappings (saves one SLOAD slot and reduces function dispatch overhead slightly).
Solidity CI reminders
Any new branch that can emit before reverting must do so (W5740 / mutability warnings are fatal under --deny warnings)
// slither-disable-next-line for unused-return goes above the function declaration, not the call site
forge fmt + solhint 120-char disagreements: use positional revert args
ADR note
The issue implies an ADR-011 semantics question: is governance blacklisting intended to be permanent-until-governance-removes, or permanent-permanent? The fix as described assumes the former (governance can un-blacklist). If the latter is ever desired, clearBlacklistEjection can simply be omitted, but the cross-contract wiring of removeOperator should still be clarified.
Activity
github-actions commentedon Jun 10, 2026
🎯 Triage report
CapacityBond.bond()unconditionally clearsejected[operator]on re-bond, which means a governance-blacklisted operator (banned for serving illegal content viaContentBlacklist.addOperator()) can fully self-reinstate in a single block by depositingminBondUSDC. Theejectedflag conflates two semantically different bans — a recoverable slash-shortfall ejection and a permanent governance blacklist ejection — with no distinction. The fix direction is explicit in the issue (split intoejectedvsblacklistEjected), but CapacityBond is near the EIP-170 bytecode size limit, requiring careful implementation.📊 Assessment
bug,security,high,technical,poc-blockingbond(),ejectNode(),isActive(),removeOperatorcross-contract callback); constraints are stated (EIP-170 size gate)🔗 Similar issues
ContentBlacklist removeOperatordoes not un-eject... reinstatement is via re-bonding" as a deliberate posture and flagged it for ADR-011 confirmation. contracts: CapacityBond.bond() self-reinstatement clears governance blacklist ejection — the ejected flag conflates two ban mechanisms #850 now reframes the forward direction of that asymmetry as an active exploit path, not just an un-blacklist UX gap.ContentBlacklist; same governance enforcement domain but different mechanisms (cooldown, perjury denylist, standing clawback). The issue correctly confirms it is not a duplicate.💡 Notes and suggestions
Implementation checklist
mapping(address => bool) public blacklistEjectedtoCapacityBondejectNode(): when called viaBLACKLIST_ROLEpath (i.e., fromContentBlacklist), setblacklistEjected[operator] = truein addition to (or instead of)ejected[operator]bond(): change the reinstatement guard toejected[msg.sender] && !blacklistEjected[msg.sender] && newBalance >= minBond— only clear the slash-shortfall ejectionisActive()/ any active-check path: require!blacklistEjected[operator]as an additional gateclearBlacklistEjection(address operator)restricted toBLACKLIST_ROLE(or a dedicatedGOVERNANCE_ROLE)ContentBlacklist.removeOperator()to callCapacityBond.clearBlacklistEjection(operator)so un-blacklisting does un-eject (closing the inverse gap noted in Audit residuals + acknowledged postures (deferred from #777) #780)BlacklistEjected(operator),BlacklistReinstatement(operator)— distinct fromEjected/ReinstatedSize gate
Run
FOUNDRY_PROFILE=ci forge build --sizes --deny warningsbefore and after. CapacityBond is near EIP-170 (24 576 bytes). A new storage mapping + 2 functions will add ~200–400 bytes of deployed bytecode. If headroom is tight, consider sharing the sameejectNodefunction signature but encoding cause in auint8rather than two separate bool mappings (saves one SLOAD slot and reduces function dispatch overhead slightly).Solidity CI reminders
emitbefore reverting must do so (W5740 / mutability warnings are fatal under--deny warnings)// slither-disable-next-lineforunused-returngoes above thefunctiondeclaration, not the call siteforge fmt+solhint120-char disagreements: use positional revert argsADR note
The issue implies an ADR-011 semantics question: is governance blacklisting intended to be permanent-until-governance-removes, or permanent-permanent? The fix as described assumes the former (governance can un-blacklist). If the latter is ever desired,
clearBlacklistEjectioncan simply be omitted, but the cross-contract wiring ofremoveOperatorshould still be clarified.Add this agentic workflows to your repo
To install this agentic workflow, run
fix(contracts): separate governance blacklist ejection from slash aut…