Skip to content

Mainnet: provide canonical recovery for legacy active PrivateNotes #146

Description

@Community-AI-tools

Problem

A historical mainnet PrivateNote is active, has no locks and no busy operation, but cannot be closed through a current official DexDo CLI.

The note has two distinct balances:

  • 100 SHELL in the trading record
  • 350 SHELL physical ECC[2] in the account gas pocket

The intended canonical close-out is note withdraw followed by note sweep to the operator's already-bound Hot wallet.

Reproduction

  1. Use the current mainnet 4.0.36 deployment manifest and official dexdo 0.2.1.
  2. Run dexdo note balance --note-addr <legacy-note> --raw.

Actual result:

Error: note <legacy-note> is not current PrivateNote:
actual code_hash 57e85fa67cc90284b907ea7e9d8c6d35830c02d14bd04d4be6ec884b5748ca0c,
expected code_hash acf19e140b58469a50165bcbda88cca952b2036678f1f5823b6a6bebd3fc32b1

The current CLI correctly fail-closes before a write.

A preserved historical CLI can read that note and reports the balances and idle state, but its doctor fails before signing because its Root contracts and manifest pins are older than mainnet 4.0.36.

A read-only inventory of preserved binaries found no official binary that both:

  1. passes doctor against mainnet 4.0.36; and
  2. recognizes this historical PrivateNote generation for canonical withdraw / sweep.

Expected

Provide an official, fail-closed recovery path for an old active PrivateNote on a current mainnet:

  • recognize a previous supported PrivateNote code hash only for recovery;
  • verify owner, no orders, no locks, and no busy operation;
  • execute the existing canonical close-out flow (withdraw then physical ECC[2] sweep) to an explicitly supplied canonical destination;
  • re-read source and destination and emit evidence;
  • reject unknown or unsupported code hashes without signing.

This must remain a DexDo CLI/manifest-supported route. Direct ABI/TVM calls or local contract patches are not acceptable.

Acceptance evidence

  • current doctor passes against mainnet 4.0.36;
  • legacy note is recognized for the recovery route;
  • trading balance is withdrawn;
  • physical ECC[2] balance is swept;
  • source note and destination wallet are re-read after each irreversible step.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    trackedAccepted and assigned a DEXDO- ticket

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions