pub enum MirrorReconcileRefusal {
NotPublishing {
state: MirrorAdvertiseState,
},
UrlUnchanged,
NoMirrorCoins,
InsufficientFunds {
have_dig_base_units: u64,
need_dig_base_units: u64,
},
ReconcileInProgress,
Disabled,
ChainUnreadable,
RequirementUnknown {
collateral_reason: CollateralUnknownReason,
},
WalletUnavailable {
capability: MirrorReconcileWalletCapability,
},
FundsUnmeasured,
}Expand description
Why control.mirror.reconcile refused — and NOTHING was spent.
Every member is paired with the same guarantee (see MirrorReconcileResult::Refused): the
node found a reason it must not even START the reclaim-then-recreate sequence, per
dig_ecosystem#3203’s central invariant — establish and validate the new URL BEFORE reclaiming
anything, and if it cannot be established, do nothing at all. A reset that half-executes is
worse than one that refuses, because the half that runs is the half that destroys value.
§Ten gates, and conflating any two sends an operator to the wrong remedy
0.34.0 shipped six reasons and one of them, advertise_off, silently meant two different
things: dig-node SPEC §25.10’s “nothing is publishable” and §25.7’s node-wide
collateralisation switch. This version separates them (NotPublishing
and Disabled respectively) and adds the reasons 0.34.0 had no words for
at all — an unreadable chain, an unpriced epoch, a wallet that cannot spend, and funds this
node has not yet measured — each of which 0.34.0 would otherwise have mis-reported as
InsufficientFunds, the EXACT conflation dig-node SPEC §25.8 exists
to forbid (“the wallet may be full”).
Variants§
NotPublishing
This node is not currently publishing an advertise URL at all, for one of
MirrorAdvertiseState’s four non-publishing reasons — the SAME enum
control.config.get already serves, carried here rather than re-invented so a client
rendering one renders the other with no new arm.
state is never
AdvertisingOverride or
AdvertisingDerived here — either would mean
the node IS publishing, and reconcile would not have refused this way.
Fields
state: MirrorAdvertiseStateWhich of the four non-publishing states applies.
UrlUnchanged
The URL this node would advertise next is IDENTICAL to the one its existing mirror coins already advertise. Reconciling would spend real $DIG to reach the state the node is already in, so the node refuses rather than charge the operator for a pure-cost no-op.
NoMirrorCoins
This node holds no mirror coins at all, so there is nothing to reclaim and no bond whose advertise URL could be stale.
InsufficientFunds
The operator wallet cannot afford ANY of the plan, not even its first step. See
MirrorReconcileResult::Submitted for the case where it can afford a PREFIX instead.
Fields
ReconcileInProgress
A reconcile this node started earlier is still in flight. Reconciling is not idempotent mid-flight — a second call racing the first could reclaim a coin the first call is still waiting to recreate — so the node serializes reconciles rather than interleaving them.
Disabled
This node’s mirror-collateral advertising is switched OFF node-wide (dig-node SPEC
§25.7) — the operator’s own earlier decision, not a fault. Distinct from
NotPublishing: that gate is about WHAT URL to advertise; this one
is about whether the node bonds anything AT ALL, regardless of URL.
ChainUnreadable
The node cannot read mirror coins from chain, so it cannot tell which of its coins are stale, or how many mirror coins it holds at all. Reconciling from an unreadable chain view risks reclaiming a coin the node has misjudged.
RequirementUnknown
This epoch’s collateral requirement is not
Known, so no create can be PRICED. Not an
out-of-funds state — the wallet may be full; a client that renders this as
InsufficientFunds tells an operator to send money that would
price nothing.
Fields
collateral_reason: CollateralUnknownReasonWhy the requirement is unknown, in the SAME taxonomy
CollateralRequirementResult::Unknown uses — named collateral_reason rather than
reason because this variant already sits inside a reason-tagged enum, and the two
concepts (which REFUSAL this is, versus which COLLATERAL fact is missing) must not
share one wire key.
The node cannot spend at all — it can neither sign nor broadcast — for a reason that is
NOT a shortfall. See MirrorReconcileWalletCapability for which capability and why.
FundsUnmeasured
The node has a wallet, but has not yet MEASURED what it holds (dig-node SPEC §25.12), so it cannot say whether the plan is affordable. This refusal states only that measurement, never affordability, is what is missing — quoting a figure here would be fabricated.
Implementations§
Source§impl MirrorReconcileRefusal
impl MirrorReconcileRefusal
Sourcepub const ALL: &'static [MirrorReconcileRefusal]
pub const ALL: &'static [MirrorReconcileRefusal]
Every refusal reason, for exhaustive rendering and the wire-token uniqueness KAT.
Each fixture value is representative rather than load-bearing here — ALL exists to walk
the VARIANT set, not to pin any one payload; the golden-vector KAT pins payloads.
Trait Implementations§
Source§impl Clone for MirrorReconcileRefusal
impl Clone for MirrorReconcileRefusal
Source§fn clone(&self) -> MirrorReconcileRefusal
fn clone(&self) -> MirrorReconcileRefusal
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more