Skip to content

Port coinage to the Rust core #969

Open

Description

@valentunn

Part of Coinage R3 (#968).

Goal

Coinage runs in the Rust core, so iOS, Android and products share one implementation, and native coinage becomes a thin client over the runtime.

Scope

  • Port the coinage domain from hosts/android/feature/coinage and hosts/ios/Packages/Coinage: coin and voucher ledger, resource oracle, split, unload and claim submission policies, transfer planning, receiving and claiming, recycling and vouchers, installation registration, backup recovery, top-up and offramp.
  • Serve RFC 6 Payment from Rust, replacing the R2 bridge to native coinage (Re-introduce RFC-006 payment.topUp / balanceSubscribe on the TrUAPI runtime (iOS + Android) #778).
  • App-facing API on the runtime for the wallet UI and chat coin sends; chat coin sends move to the two-phase handoff (reserve, save message, commit, reconcile on start).
  • One-time import of existing native coinage and durable_tx rows.

Open questions and risks

  • Which platform is the reference where the two differ, for example how installations and counters are stored.
  • Data migration: native ledger rows are never deleted and recovery depends on them; a faulty import can lock funds. Native and Rust coinage must never operate on the same coins.
  • Multi-device behaviour (Coinage on 2 mobile devices: simple handover #733) carries over.

Blocked by #964 (durable transaction engine in the Rust core).

Metadata

Metadata

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions