Repository navigation
Description
What
CapacityBond.deregisterNode is now the entry point to a full bond exit: it clears declaredMbps, which releases the bondRequired(declaredMbps) floor that requestUnbond enforces (#1351). The complete sequence is
deregisterNode() -> requestUnbond(activeBond) -> [14-day window] -> unbond()
The CLI covers the last two legs (decdn node unbond) and the entry leg on the way in (decdn node register), but there is no decdn node deregister. An operator who wants to exit has to hand-craft the deregisterNode transaction.
Why it matters now
Before the #1351 fix a full exit was not expressible at all, so the missing command was moot — decdn node unbond --all was documented as "release everything the curve permits", not "exit". Now the on-chain path exists and the CLI is the only thing in the way. crates/cli/src/commands/unbond.rs's module docs currently name the raw contract call, following the precedent of setup.rs's already-registered error ("... or deregister on-chain first"), which has the same gap.
Shape
crates/cli/src/commands/register.rs (306 lines) is the closest sibling and the natural template, minus the signature construction — deregisterNode() takes no arguments and needs no EIP-712 or ed25519 signature, just the operator signer. Worth carrying over from unbond:
--dry-runand the--jsonreceipt shape.- A confirmation gate. Deregistration is at least as consequential as starting an unbonding window: it drops the node from the active set, bumps
registrationNonce[nodeId](invalidating previously signed registration signatures), and clears the declared tier, so re-entry costs a freshdeclareMbps+registerNode.unbond'sdecide_confirmation/confirm_or_bailsplit is directly reusable. - Disclosure that the bond is not returned by this call and stays fully slashable (ADR 003 § Node Registry) — the most likely operator misconception.
An e2e leg on G-NODE-06 asserting a real end-to-end exit (deregister -> --all -> withdraw -> activeBond == 0) becomes possible once the command exists; today that assertion lives at the Solidity level in test_fullExit_deregisterThenUnbondEverything.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
fix(contracts,e2e): make deregistration a real bond exit; settle the …
fix: batch six review follow-ups (#1346, #1347, #1348, #1349, #1359, #…
thiras commentedon Jul 21, 2026
Fixed in #1362 (merged as e73fa04).
Note the batch's review round revised the framing of this issue's premise where it was wrong — see the PR description and the ADR/NatSpec updates for the corrected account.