Repository navigation
Closed
Labels
kind:securitySecurity impact; report a vulnerability to [email protected], not hereprio:lowWhen convenient
Description
Remaining items from the security audit pass (#777) that were intentionally not changed — tracked here for completeness. These are lower-priority residuals or deliberate design decisions (kept per scoping), not open vulnerabilities.
Residuals (could be hardened later)
- CapacityBond
pausedTotalis a single monotonic global counter. fix(contracts): security audit pass — High + Medium findings #777's H-1 fix unifies CapacityBond + SlashAppeal pause time into one counter (correct for the filing-window race), but it stays monotonic and global: a long pause still lengthens every still-open slash's window and delays unrelated challenger payouts. A per-slash pause snapshot (extend only by overlap) would be tighter. Comment-acknowledged as "only ever favors the operator." - OriginAssignment
DEFAULT_OPEN_MAX_CEILING(500) full-rebuild gas.setDefaultOpenAllowlistdoes a clear+rebuild with a per-elementisActivestaticcall. Confirm 500 elements stays under block gas on the target L2; lower the ceiling or prefer incremental add/remove if not. Governance-gated, so not attacker-triggerable.
Deliberate postures (kept by scoping decision — likely wontfix)
- PaymentChannel settlement-pause posture: pause blocks new channels only;
withdraw/settleChannel/closeChannelstay callable so funds are never trapped (documented at the pause section).PAUSER_ROLEtherefore can't freeze an in-flight settlement. - DecdnGovernor zero-quorum bootstrap: an empty served-bytes window yields a zero/trivial quorum during the tens-of-nodes launch phase. ADR-036-acknowledged; no absolute floor. Revisit if an absolute minimum quorum is wanted.
- CapacityBond no min-bond-raise grace: raising
minBondcan instantly de-activate operators between old and new value with no grace window/event. - ContentBlacklist
removeOperatordoes not un-eject: clearsisOperatorBlacklistedbut leavesCapacityBond.ejected == true; reinstatement is via re-bonding, not an explicit un-eject. Confirm against ADR-011 intended un-blacklist semantics.
See #777 for the fixes that shipped, and #778 / #779 for the other deferred work.
Reacted by github-actions
Metadata
Metadata
Assignees
Labels
kind:securitySecurity impact; report a vulnerability to [email protected], not hereprio:lowWhen convenient
Type
Fields
Priority
None yet
Activity
github-actions commentedon Jun 1, 2026
🎯 Triage report
This issue tracks audit residuals and deliberate security postures deferred from the #777 audit pass. It is split into two categories: items that could be hardened later (the
pausedTotalglobal counter and OriginAssignment gas ceiling) and items that are intentional design decisions likely to be wontfix (PaymentChannel pause scope, zero-quorum bootstrap, min-bond-raise grace, ContentBlacklist un-eject semantics). No open vulnerabilities are present; this is a completeness/tracking issue.📊 Assessment
security,technical,lowContentBlacklistun-eject semantics are the most concrete; the others require design decisions first🔗 Similar issues
CapacityBond.setUnbondingPeriodSafetyReserve.ratifyAppealedge case, same audit-residual pattern💡 Notes and suggestions
Per-item breakdown:
CapacityBond.pausedTotalglobal counter — design decision needed before coding. The acknowledged posture ("only ever favors the operator") is acceptable for launch but would need an ADR amendment to capture per-slash snapshot logic. Not suitable for a coding agent without that design decision.OriginAssignment500-element gas ceiling — most actionable of the residuals. Should be verified against the Arbitrum Sepolia block gas limit (~32M gas). A clear+rebuild of 500 staticcalls is estimated at ~10–15M gas; confirm withforge test --gas-report. If too close to the ceiling, an incremental add/remove approach (like a mapping delta) is the safe alternative. Governance-gated, so no urgency.PaymentChannel settlement-pause posture — deliberate;
withdraw/settle/closestaying live during pause is the correct non-custodial design. Mark wontfix and close out.DecdnGovernor zero-quorum bootstrap — ADR-036 acknowledged. Revisit only if the team wants an absolute quorum floor. Requires governance/economics discussion, not a coding task yet.
CapacityBond no min-bond-raise grace — could break active operators silently; worth a governance event or at minimum an emitted warning. An emit-then-delay pattern (timelock on
minBondchanges) is a natural hardening path if the team decides it's needed.ContentBlacklist.removeOperatordoes not un-eject — needs ADR-011 cross-check. If ADR-011 intends full reinstatement on un-blacklist, this is a functional bug that should be a separate issue. Recommend an explicit confirmation pass against ADR-011 semantics before closing.Suggested next steps:
forge test --gas-reporton the L2 targetAdd this agentic workflows to your repo
To install this agentic workflow, run
thiras commentedon Jun 20, 2026
Disposition pass — all six items resolved or recorded
Worked through #780. One concrete code change (gas guard) landed in #959; the other five need no code. Summary:
isActive/ ~26.6M with the real four-SLOADCapacityBond.isActive— ~83% of a 32M Arbitrum-class L2 block (~1.2× headroom), well above the audit's 10–15M estimate. Decision: keep the 500 ceiling — governance is never forced into a 500-element atomic tx (addDefaultOpenOperator/removeDefaultOpenOperatordeltas exist and are preferred for large mutations). New teststest_defaultOpen_setAllowlist_atCeiling_gas+test_defaultOpen_replaceAtCeiling_gaspin the cost so it can't silently drift toward the block limit. A future ceiling reduction is an optional follow-up.ContentBlacklist.removeOperatordoes not un-ejectremoveOperator(contracts/src/ContentBlacklist.sol:299-316) callscapacityBond.unEjectNode()unconditionally, clearing theblacklistEjectedlatch; the operator then re-enters via the normal re-bond path (CapacityBond.bond()reinstatement). ADR-011 (§ "Two ejection causes, one master gate") explicitly documents this two-step "un-eject latch → operator re-bonds" semantics as intended. The #780 text describes pre-fix code. Already covered bytest_unEjectNode_clearsBlacklistLatch_thenRebondReinstates(CapacityBond.t.sol:282). No change.whenNotPausedgates onlyopenChannel/topUp;withdraw/settleChannel/closeChannel/cooperativeClose/reclaimExpiredstay callable so funds are never trapped. Documented atPaymentChannel.sol:798-804.pausedTotalglobal monotonic counterCapacityBond.sol:343-350) already notes the conservative posture "only ever favors the operator." A per-slash pause snapshot is a future tightening requiring an ADR-028 amendment — deferred.setMinBond(CapacityBond.sol:1075-1080) is GOVERNANCE_ROLE + timelock-gated and emitsMinBondUpdated; instant de-activation between old/new is governance-gated, not attacker-triggerable. A grace window / value-timelock is a future hardening — deferred.quorum(DecdnGovernor.sol:155-161) is ADR-036-acknowledged for the tens-of-nodes launch phase; no absolute floor by design. Revisit only if an absolute minimum quorum is wanted — deferred.Leaving this issue open until #959 merges. The three explicitly-deferred design items (4–6) remain tracked by this comment for a future hardening pass.
test(origin-assignment): pin 500-element default-open rebuild gas (#780…
thiras commentedon Jun 20, 2026
Resolved by #959 (merged). Gas residual verified + guarded; the other five items dispositioned in the comment above (already-resolved / wontfix / keep-as-acknowledged). The three deferred design items (pausedTotal per-slash snapshot, minBond-raise grace, absolute quorum floor) remain tracked by that comment for a future hardening pass.