Skip to content

feat(mirror-coin): lifecycle driven by .dig presence, created and reclaimed per epoch - #379

Draft
MichaelTaylor3d wants to merge 2 commits into
mainfrom
loop/377-mirror-coin-lifecycle
Draft

feat(mirror-coin): lifecycle driven by .dig presence, created and reclaimed per epoch#379
MichaelTaylor3d wants to merge 2 commits into
mainfrom
loop/377-mirror-coin-lifecycle

Conversation

@MichaelTaylor3d

Copy link
Copy Markdown
Contributor

DO NOT MERGE — lane in progress.

Implements the mirror-coin lifecycle (dig-node#377): presence of a .dig file on disk drives
creation of an on-chain mirror coin locking 20 $DIG for that (store, root, owner, epoch), and
its disappearance drives reclaim of the collateral.

Closes #377

Parent epic: https://github.com/DIG-Network/dig_ecosystem/issues/3166

Status

  • lane opened, worktree cut
  • design locked (signing scope, reconcile loop, debounce)
  • TDD implementation
  • SPEC.md + docs sweep
  • deps to latest (§2.4b)

…FIED, not wired in)

Salvaged from a lane that hit the weekly usage cap mid-implementation. Pushed so
the work is durable, NOT because it is finished.

State, stated honestly so the next lane does not mistake this for working code:

* `mod mirror;` is NOT declared anywhere, so the module is inert. It is not
  compiled as part of the crate, and a green CI on this commit says nothing
  about it.
* It has never been compiled or tested. Treat every signature as a proposal.
* The lane's own last message said it was about to start "the two structural
  pieces: the scoped key and the MirrorSpends newtype" — so the signing path
  is the part most likely to be missing or wrong.

What is here: mod.rs (the design rationale), plan.rs, presence.rs, spends.rs.

The design decisions recorded in mod.rs are worth keeping even if the code is
rewritten — particularly that reclaims run FIRST in every pass and are NEVER
gated on funds, because a reclaim returns collateral that may fund the creates
behind it, and a wallet at zero must not be unable to recover what it already
locked.

Refs #377

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mirror-coin lifecycle: presence tracks the .dig file on disk, created/reclaimed automatically per epoch

1 participant