Skip to content

Port the durable transaction engine to the Rust core #964

Description

@valentunn

Part of #637. Builds on #963; also the foundation for the coinage port (#638).

Goal

The crash-durable transaction engine runs in the Rust core, so NFT purses and coinage share one implementation on every host.

Scope

  • Port the native engine close to 1:1 (hosts/android/feature/transactions, hosts/ios/Packages/DurableTransactions): the durable_tx ledger, completion ladder, recovery pass, submission buckets with backoff, and the per-domain oracle and submission-policy extension points.
  • The engine never builds a transaction: it receives a presigned one, or calls back into the domain's submission policy to build or rebuild it.
  • Registration joins the caller's database transaction, so domain rows and transaction rows commit together.
  • Recovery is driven by the native background schedulers (WorkManager, BGTask) through a runtime-level entry point.

Open questions and risks

  • Native recovery reads older blocks through the legacy RPC (chain_getBlockHash, chain_getBlock). The core is built on chainHead_v1, which only serves recent pinned blocks. If the legacy methods are unavailable, recovery after long offline periods needs a redesign.
  • Which platform is the reference where lifecycle details differ (recovery start and stop, schedule semantics).

Blocked by #963.

Activity

  1. changed the title [-]NFTs R2 · Stage 2: Port the durable transaction engine to the Rust core[/-] [+]Port the durable transaction engine to the Rust core[/+] on Sep 24, 2026
  2. self-assigned this
    on Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Coinage R2Host Rust CoreNFTs R2R2 blockerMust be done for R2R2 infraBrevity monorepo, Wire format, Rust core integration, correctness, test infra, tech debt

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions