Skip to content

requestUnbond has no slash/appeal-pending gate, contradicting G-NODE-06's stated negative case #1352

Closed

Description

@yigitdot

What

#1033 (G-NODE-06) lists as a negative case: 'unbond blocked while a slash/appeal is pending'. No such gate exists.

CapacityBond.requestUnbond (contracts/src/CapacityBond.sol:615-637) checks exactly four things: non-zero amount, amount <= activeBond, no request already in flight (UnbondingInProgress), and the remaining bond still covers bondRequired(declaredMbps) (BondBelowCurve). Nothing consults SlashJudge, SlashAppeal, or slashRecords. An operator with a live challenge or an open appeal can start unbonding freely.

Is that actually wrong?

Arguably not — ADR 026 § Unbonding window says the 14-day window is itself the mitigation: it is 'sized to exceed the ADR 014 5-day SlashJudge evidence-presentation window with a 9-day safety margin so misbehavior detected just before unbond initiation still has bond available to slash' (adr/026-tokenomics.md:156), and slashing during unbonding is explicitly permitted. Under that reading, gating requestUnbond would be redundant with the window and would let a griefing challenger freeze an honest operator's exit.

So this is a spec/implementation disagreement, not necessarily a contract bug.

Decision needed

Pick one and make the other side match:

  1. The window is the mitigation (what the contract does today) — correct the G-NODE-06 negative case in cli+e2e G-NODE-06: decdn node unbond / capacity reduction #1033 and in the spec anchor internal/Product/gaps-and-e2e-test-specs.md#g-node-06, so nobody writes a test asserting a gate that must not exist.
  2. A gate is intended — specify what blocks it (an unresolved slashRecords entry? a pending SlashAppeal?) and how an operator gets unstuck if a challenge is never revealed, then implement it in CapacityBond and record it in ADR 026.

Why this surfaced

Implementing #1033's CLI half. The G-NODE-06 e2e (crates/e2e/tests/g_node_06_unbond.rs) deliberately does not assert this negative case, since asserting current behaviour would lock in whichever reading turns out to be wrong.

Activity

  1. added
    area:contracts
    design:adr
    kind:test
    design:missing-decision
    prio:medium
    on Jul 21, 2026
  2. self-assigned this
    on Jul 21, 2026
  3. thiras commented on Jul 21, 2026

    @thiras
    Contributor

    Resolved in #1360 as option 1: the window is the mitigation, no gate.

    ADR 026 § Unbonding window now says so explicitly — requestUnbond consults neither SlashJudge nor SlashAppeal nor slashRecords, because the 14-day window already outlasts the 5-day evidence window by 9 days and the bond stays slashable throughout, while a gate would hand a griefing challenger an indefinite freeze on an honest exit (a challenge that is never revealed has no expiry to unstick it).

    For the record: the correction is to #1033's negative case, which is where the wrong text actually lives. The spec anchor this issue cites (internal/Product/gaps-and-e2e-test-specs.md#g-node-06) does not exist — no file in the workspace contains the string G-NODE-06 — so there is nothing to edit there. #1033 is closed, so crates/e2e/tests/g_node_06_unbond.rs now carries a module-doc note saying the absent assertion is deliberate, which is the copy a future contributor will actually read.

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

Metadata

Metadata

Assignees

Labels

area:contractsdesign:adrdesign:missing-decisionkind:testprio:medium

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions