Skip to content

Audit residuals + acknowledged postures (deferred from #777) #780

Closed

Description

@thiras

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 pausedTotal is 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. setDefaultOpenAllowlist does a clear+rebuild with a per-element isActive staticcall. 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/closeChannel stay callable so funds are never trapped (documented at the pause section). PAUSER_ROLE therefore 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 minBond can instantly de-activate operators between old and new value with no grace window/event.
  • ContentBlacklist removeOperator does not un-eject: clears isOperatorBlacklisted but leaves CapacityBond.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.

Activity

  1. added
    prio:low
    kind:security
    on Jun 1, 2026
  2. github-actions commented on Jun 1, 2026

    @github-actions

    🎯 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 pausedTotal global 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

    Dimension Value Reasoning
    Type Task Tracking deferred hardening decisions, not a bug report or feature request
    Labels security, technical, low Security-adjacent tracking issue; low priority since nothing here is exploitable
    Coding agent Needs more info Individual items may be suitable once scoped separately — the gas ceiling check and ContentBlacklist un-eject semantics are the most concrete; the others require design decisions first

    🔗 Similar issues

    💡 Notes and suggestions

    Per-item breakdown:

    1. CapacityBond.pausedTotal global 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.

    2. OriginAssignment 500-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 with forge 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.

    3. PaymentChannel settlement-pause posture — deliberate; withdraw/settle/close staying live during pause is the correct non-custodial design. Mark wontfix and close out.

    4. 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.

    5. 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 minBond changes) is a natural hardening path if the team decides it's needed.

    6. ContentBlacklist.removeOperator does 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:

    • Confirm OriginAssignment gas ceiling with forge test --gas-report on the L2 target
    • Cross-check ContentBlacklist un-eject intent against ADR-011 — if misaligned, file a dedicated bug
    • Decide on DecdnGovernor quorum floor (yes/no) and record decision in ADR-036 or a new ADR
    • Mark PaymentChannel and min-bond-raise items as wontfix if team agrees with current posture

    Generated by Agentic Triage for issue #780 · sonnet46 444.1K · ◷

    Add this agentic workflows to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/issue-triage.md@94ec5db57374c5b04a4b8eef8b4413f9af44d63f
    
  3. self-assigned this
    on Jun 19, 2026
  4. thiras commented on Jun 20, 2026

    @thiras
    ContributorAuthor

    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:

    # Item Disposition
    1 OriginAssignment 500-element rebuild gas Verified + guarded (#959). A single-tx full rebuild is ~23.4M gas under the mock isActive / ~26.6M with the real four-SLOAD CapacityBond.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/removeDefaultOpenOperator deltas exist and are preferred for large mutations). New tests test_defaultOpen_setAllowlist_atCeiling_gas + test_defaultOpen_replaceAtCeiling_gas pin the cost so it can't silently drift toward the block limit. A future ceiling reduction is an optional follow-up.
    2 ContentBlacklist.removeOperator does not un-eject Already resolved — not a bug. Current removeOperator (contracts/src/ContentBlacklist.sol:299-316) calls capacityBond.unEjectNode() unconditionally, clearing the blacklistEjected latch; 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 by test_unEjectNode_clearsBlacklistLatch_thenRebondReinstates (CapacityBond.t.sol:282). No change.
    3 PaymentChannel settlement-pause posture Wontfix. Correct non-custodial design — whenNotPaused gates only openChannel/topUp; withdraw/settleChannel/closeChannel/cooperativeClose/reclaimExpired stay callable so funds are never trapped. Documented at PaymentChannel.sol:798-804.
    4 CapacityBond pausedTotal global monotonic counter Keep as acknowledged. In-code comment (CapacityBond.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.
    5 CapacityBond no min-bond-raise grace Keep as acknowledged. setMinBond (CapacityBond.sol:1075-1080) is GOVERNANCE_ROLE + timelock-gated and emits MinBondUpdated; instant de-activation between old/new is governance-gated, not attacker-triggerable. A grace window / value-timelock is a future hardening — deferred.
    6 DecdnGovernor zero-quorum bootstrap Keep as acknowledged. 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.

  5. thiras commented on Jun 20, 2026

    @thiras
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:securityprio: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