Skip to content

Shielded funding callbacks still report an outpoint for a lock that was safely abandoned #6413

Backlog

Description

@thepastaclaw

PastaClaw flagged this while reviewing #5931, where it was deferred to a follow-up instead of being fixed in that pull request. This issue tracks the follow-up.

Shielded funding callbacks still report an outpoint for a lock that was safely abandoned (suggestion)

Impact: A C host funding Shielded from the Core balance or a CoinJoin drain cannot tell from the result whether it may start over or must reconcile the reported outpoint.

Where: packages/rs-platform-wallet/src/wallet/asset_lock/build.rs:1861-1866 at 95643fe88ac6:

return Err(PlatformWalletError::AssetLockAbandonedBeforeSend {
out_point,
reason: format!(
"its {kind} recipient was not made durable before dispatch: {error}"
),
});

The host can keep trying to resume a lock that was durably removed before anything was sent. The typed AssetLockAbandonedBeforeSend added by 63c2b7ff71 reaches shielded funding as well as external top-ups. The identity export clears its outpoint for that verdict, but shielded funding has already passed its outpoint to on_asset_lock_built; the ordinary route flattens the verdict to code 6 and CoinJoin drain's e.into() falls back to 99. Both generic codes can also represent errors after dispatch. Expose the wallet's definite pre-send verdict on both callback-based routes and update AssetLockBuiltFn's contract so callers need not parse error text or infer safety from a later code 23.

Origin

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