sparrowwallet / sparrow

Desktop Bitcoin Wallet focused on security and privacy. Free and open source.
https://sparrowwallet.com/
Apache License 2.0
1.36k stars 192 forks source link

[Bug - Sparrow Server] Rejected mix UTXO due to unconfirmed status #788

Closed RequestPrivacy closed 1 year ago

RequestPrivacy commented 1 year ago

Description

While waiting for confirmation, Sparrow Server seems to re-register an utxo in the 5.000.000 sats pool postmix although it has an unconfirmed status. Its input therefore gets rejected frequently (the mix progress bar resets the error message but once it re-registers it gets rejected again).

<DATE> ERROR [Whirlpool-HttpClient-COORDINATOR_WEBSOCKET-85] c.s.w.c.m.MixClient[1672074727137] [null:-1] ERROR: Waiting for first mix confirmation
<DATE> ERROR [Whirlpool-HttpClient-COORDINATOR_WEBSOCKET-85] c.s.w.c.w.WhirlpoolWallet [null:-1]  - [MIX] 0.05btc ⣿ WHIRLPOOL FAILED ⣿ Input rejected ; Waiting for first mix confirmation

Some more background:

I'm pretty confident that this isn't a back-end issue...

UPDATE:

After hitting <Refresh> in the Postmix UTXO section the balance decreased by 5.000.000 back to the correct amount. Now there is only the "old" i.e. already confirmed utxo with mixesDone. Yet, the input still gets rejected, so there is still the unconfirmed transaction sitting in the mempool somewhere but apparently Sparrow Server doesn't know about it and keeps trying to re-register...

UPDATE 2:

The unconfirmed (and in the UI not visible utxo) has been confirmed and Sparrow has now been informed correctly over the fact, i.e. the mix count has been increased to mixesDone+1, the balance has the correct amount and the "old" utxo with the error messages has been replaced by the new one and isn't getting rejected anymore.

I see two problems on Sparrow's side:

  1. Somehow Sparrow tries to re-register an unconfirmed remixer UTXO
  2. Hitting <Refresh> drops the formerly shown unconfirmed utxo from the UI while problem no. 1 still exists.
craigraw commented 1 year ago

Thanks for the detailed report.

Sounds like a temporary miscommunication between Sparrow and Fulcrum resulting in incorrect wallet history, which was then picked up by the Whirlpool client (which has it's own history cache that updates on a different schedule). Could be a bug in Fulcrum or Sparrow, more likely just a missed notification due to network issues. Could also be reorg, although they are rare so that is less likely.

RequestPrivacy commented 1 year ago

Thanks for the info. I will keep an eye on it and report back if it happens again.

RequestPrivacy commented 1 year ago

Going to close this off as it didn't happen again.