Skip to content

platform-wallet: record an unconfirmed data contract update and reconcile it before signing a replacement #6067

Open

Description

@QuantumExplorer

Problem

When a data contract update comes back unconfirmed (ErrorTransactionBroadcastUnconfirmed, code 20), it may have executed or may still land. Nothing outside the screen that sent it remembers that:

A second update signed while the first is still pending cannot apply twice: the update is bound to the reviewed version, and Drive refuses the loser. But the loser can be refused for a fee, and the app can't tell the user whether the first one landed.

Proposal

Have rs-platform-wallet record an unconfirmed contract update: owner, contract id, base version and transition hash. Before it signs another update of the same contract, it resolves the record, for example through the status-by-hash lookup in #5269. Swift and Kotlin would only read that state; a hold that outlives a screen needs a rule for when it lifts, and that rule belongs in Rust.

Context

Raised in review of #6053 and deferred there (thepastaclaw thread on UpdateContractView.swift). Related: #5269.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions