Task
dig_mirror_coin::create takes its Vec<Cat> $DIG inputs from the caller, and this node has no way
to select them scoped to the operator puzzle hash. Until it does, the mirror lifecycle can
observe and reclaim but cannot create a bond — so a held (store, root) stays uncollateralised and
the node stays undiscoverable for that capsule.
Why the existing selector cannot be used
WalletBackend::select_cats selects from the node-custodied replica's own coin set
(db.unreserved_unspent_coins), not from the §16.4 operator wallet's coins. Funding a mirror coin
from those would be a real spend of the wrong wallet's money that looks entirely successful — so
NodeMirrorEffects::create refuses by name instead (crates/dig-node-service/src/mirror/lifecycle.rs),
the pass reports it in stopped_at, and §25.8 keeps reporting the bond as uncovered. That is true,
and it is the safe direction.
What is needed
A $DIG CAT coin selector over a dig_chainsource_interface::ChainSource, scoped to a given owner
puzzle hash: the unspent CAT coins at that owner under dig_mirror_coin::DIG_ASSET_ID, with their
lineage reconstructed from each creating spend so the resulting Cat values are spendable.
Note the asymmetry that makes this the hard half: a reclaim needs no coin selection at all —
dig_mirror_coin::reclaim is supported at fee = 0 with no fee coins, which is §25.4.4 and is
already implemented. Only creates need this.
Constraints
- The asset id is
dig_mirror_coin::DIG_ASSET_ID; never re-derive it.
- Never hand-roll a spend bundle —
dig-mirror-coin builds them.
- Selection must be reservation-aware, or one coin funds two in-flight bundles.
- A partial or unauthenticated selection must REFUSE rather than fund a smaller coin: a mirror coin
below the epoch's requirement is collateral that is genuinely locked and does not satisfy the
bond.
Parent
#412 ·
#377 ·
epic https://github.com/DIG-Network/dig_ecosystem/issues/3166
Task
dig_mirror_coin::createtakes itsVec<Cat>$DIG inputs from the caller, and this node has no wayto select them scoped to the operator puzzle hash. Until it does, the mirror lifecycle can
observe and reclaim but cannot create a bond — so a held
(store, root)stays uncollateralised andthe node stays undiscoverable for that capsule.
Why the existing selector cannot be used
WalletBackend::select_catsselects from the node-custodied replica's own coin set(
db.unreserved_unspent_coins), not from the §16.4 operator wallet's coins. Funding a mirror coinfrom those would be a real spend of the wrong wallet's money that looks entirely successful — so
NodeMirrorEffects::createrefuses by name instead (crates/dig-node-service/src/mirror/lifecycle.rs),the pass reports it in
stopped_at, and §25.8 keeps reporting the bond as uncovered. That is true,and it is the safe direction.
What is needed
A $DIG CAT coin selector over a
dig_chainsource_interface::ChainSource, scoped to a given ownerpuzzle hash: the unspent CAT coins at that owner under
dig_mirror_coin::DIG_ASSET_ID, with theirlineage reconstructed from each creating spend so the resulting
Catvalues are spendable.Note the asymmetry that makes this the hard half: a reclaim needs no coin selection at all —
dig_mirror_coin::reclaimis supported atfee = 0with no fee coins, which is §25.4.4 and isalready implemented. Only creates need this.
Constraints
dig_mirror_coin::DIG_ASSET_ID; never re-derive it.dig-mirror-coinbuilds them.below the epoch's requirement is collateral that is genuinely locked and does not satisfy the
bond.
Parent
#412 ·
#377 ·
epic https://github.com/DIG-Network/dig_ecosystem/issues/3166