Skip to content

Track remaining work for the shared Rust core integration on iOS #334

Description

@pgherveou

Context

Track the remaining work to land the initial Rust integration , complete the migration to the shared Rust core, and address the main production-readiness gaps.

other references: https://hackmd.io/rNkC3LdOSpy4yL--s1XoBw

Initial integration blockers

  • Permission-gating:
    • Outbound network requests
    • WebRTC access inside the container
  • Add Extrinsic V5 support TrUAPI #333.
    • Related WIP PRs: frame-decode #104, Subxt #2268.
    • Encode the transaction-extension pipeline version from metadata rather than a constant — #382, merged as 0b1ae564. Raised by @kianenigma below: mainnet keeps two extension pipelines, and the allowance builder wrote a hardcoded 0x00 while selecting its extension set by extrinsic-format version. Both the extrinsic body and the ring-VRF proof message now carry the version the runtime declares.
  • Make sure that PGAS allowances are supported.
    • Claim on Asset Hub, shared by the direct and SSO allocation paths — #391, merged as f0761139. Live-verified against paseo-next-v2 Asset Hub.
    • truapi-host-cli serves Asset Hub as a chain role, so the claim is reachable from a host — #404, merged as d88d3414.
    • supported_chains must return Asset Hub from dotli, iOS, and Android before products see anything but NotAvailable.
  • Statement store allowances: when no slot are available - Native replace the oldest one that can be replaced and replace it, rust does not. — #378, merged as b5734119. Replaces the oldest slot past Resources.StmtStoreReplacementCooldown, aged against the chain's clock rather than the host's, and reports exhaustion only when nothing is replaceable.
    • NOTE: this covers choosing the victim. When nothing is replaceable the core reports exhaustion but nobody acts on it — the host CLI rotates its auto-managed account, the renewal loop only logs a warning, and a product gets a bare NotAvailable. The core→host exhaustion signal is tracked as a #308 follow-up.
  • Complete Chat modality support (#326, specification).
  • Build and packaging. Swift framework artifacts should be published so that the app can be outside of the current submodule
  • SignVRF not implemented on Android (Tarik's breakdown)

Full integration follow-up

  • Move SSO to the shared Rust core. Related work: polkadot-app-ios-v2#1313.
  • Implement RFC 0017 in Rust.
  • Route payment functions and subscriptions for products such as T3rminal through the native/shared core, or add temporary callbacks for payment subscriptions.
  • Add background processing for statement-store allowance renewal (#308) and Coinage.
    • Renewal engine, target ledger, and periodic driver — #308, merged as f54d0c5c. Targets persist in CoreStorageKey::StatementRenewalTargets as derivation recipes; live-verified against paseo-next-v2.
    • Export the renewal entry points over UniFFI and drive them from an OS worker (WorkManager / BGTaskScheduler). Not reachable from iOS or Android today — see Drive statement-store allowance renewal from a host OS scheduler #376.
    • Coinage background processing — #344.

Performance and resilience

  • Investigate the PAPI provider memory issue when the app is backgrounded. @ERussel to provide details.
  • Support background execution for in-flight async work such as extrinsic submission, using a Rust callback/task abstraction. @ERussel to provide details.
  • Revalidate OS permissions before each protected operation because the host or OS may suspend, revoke, or reset them.
  • Add diagnostics that notify the user when an operation takes too long.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions