Skip to content

fix(platform-wallet): DashPay payment reconcile still stores under the wallet-manager write guard (stage/unstage split) #4609

Description

@llbartekll

Summary

Follow-up to the lock-scope fix for the DPNS and DashPay profile passes. Two DashPay sync-manager paths still call the host persister while holding the wallet-manager write guard:

  • reconcile_incoming_paymentsrecord_received_payment_totals(info, &self.persister, …) (wallet/identity/network/payments.rs ~37-72)
  • reconcile_sent_payments_from_tx_historymanaged.record_dashpay_payment(txid, entry, &self.persister) in a loop (~577-615), shared with the live record_incoming_dashpay_payments (~750-798)

record_dashpay_payment (state/managed_identity/identity_ops.rs ~145-188) rolls its in-memory insert back when the store fails, so the DPNS-style "collect and store after the guard" split needs a stage/unstage pair (stage under the guard, store outside, re-take the guard once to unstage on Err) rather than a buffering persister, which would silently break the retry guard.

Also in the same shape (one-off, lower cadence): sync_contact_requests_reporting ingest (contact_requests.rs ~1461/1510/1538) and discover_inner's add_identity / add_keys under the guard (discovery.rs ~450-490).

Why

The host store is synchronous and serialized behind FFIPersister::store's round_lock; while a slow commit runs (minutes on a 2000-tx wallet, see the persister issue) any store under the write guard holds the wallet-manager lock for that long and every reader — including the host UI — waits.

Related

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