[bisq-network/bisq] Lost ~0.02159616 BTC during 0.01 BTC trade (#5661)

DarkAnge1 notifications at github.com
Fri Aug 13 11:09:53 CEST 2021


Thank you for prompt reaction and attention to this issue. Let me go through your comments and address them:

> * Balances not recognized usually means the wallet is in a bad state.  Unfortunately that happens quite a bit, along with the frequent advice to "SPV resync" whenever wallet issues pop up.  The underlying wallet library while nice in some respects unfortunately is quite fragile.

That is probably the key cause of this and issue #5623 and really preventing from fully fledged trading. I understand that replacing or reinforcing library that is in the core - is pretty complex task, but if this component is known for issues and can cause money loss - that limits Bisq liquidity a lot. I'm personally not ready to trade serious volumes in such a case and will remain accounts on lowest possible level to reduce damage if it happens. 

Need to note, that between normal operation and when issue occurred - Bisq wasn't restarted (it's been up for few days)

> * Your missing 0.02159616 is not showing up in the wallet UI, but ultimately you still own the private key and can recover the balance by restoring from seed phrase.

I also hope for that. Question I have is: is there a store of public addresses in the wallet, which is not visible in UI due to some criteria? If yes, probably Bisq has removed that address due to some reason from UI and that could be fixed in future versions.

> * Bisq never knowingly re-uses an address, the fact that it happened could be related to the wallet being in a bad state or a bug - this is something I can look into by trying to reproduce it in a test environment.

That is my expectation as well, however when I've cruised through the logs I've found this:


Address appears:
```
Aug-09 19:20:28.316 [JavaFX Application Thread] INFO  b.c.b.w.BtcWalletService: getOrCreateAddressEntry: add new AddressEntry AddressEntry{address=bc1qnvwx9xfeh34v4e7tws2ll3fdspjra4uhllwfyu, context=AVAILABLE, offerId='null', coinLockedInMultiSig=0, segwit=true} 
Aug-09 19:20:28.316 [JavaFX Application Thread] INFO  b.c.b.m.AddressEntryList: addAddressEntry: add new AddressEntry AddressEntry{address=bc1qnvwx9xfeh34v4e7tws2ll3fdspjra4uhllwfyu, context=AVAILABLE, offerId='null', coinLockedInMultiSig=0, segwit=true} 
```

Address is declared as available:
```
Aug-09 21:26:53.017 [JavaFX Application Thread] INFO  b.c.b.w.BtcWalletService: resetAddressEntriesForOpenOffer offerId=h4ka1igg-6aea5d9a-a8d4-414d-aa13-e81b95ad0756-172 
Aug-09 21:26:53.018 [JavaFX Application Thread] INFO  b.c.b.w.BtcWalletService: swap addressEntry with address bc1qnvwx9xfeh34v4e7tws2ll3fdspjra4uhllwfyu and offerId h4ka1igg-6aea5d9a-a8d4-414d-aa13-e81b95ad0756-172 from context OFFER_FUNDING to available 
Aug-09 21:26:53.018 [JavaFX Application Thread] INFO  b.c.b.m.AddressEntryList: swapToAvailable addressEntry to swap=AddressEntry{address=bc1qnvwx9xfeh34v4e7tws2ll3fdspjra4uhllwfyu, context=OFFER_FUNDING, offerId='h4ka1igg-6aea5d9a-a8d4-414d-aa13-e81b95ad0756-172', coinLockedInMultiSig=0, segwit=true} 
Aug-09 21:26:53.018 [JavaFX Application Thread] INFO  b.c.b.w.BtcWalletService: resetAddressEntriesForOpenOffer offerId=h4ka1igg-6aea5d9a-a8d4-414d-aa13-e81b95ad0756-172 
```

In particular that switch of context from OFFER_FUNDING to available.

> * 1.7.0 was mostly a protocol change to close a potential privacy loophole, so I don't think it is the inflection point which caused your problems.  There have not been any core wallet changes since the segwit upgrade last year.
> 

Hmm. That is interesting. Probably my wallet got corrupt within time or since I have hundreds of transactions and offers there, I'm experiencing this issue more and more frequently.

If that is the case maybe there is a safe way to share a wallet with you for test purposes?

I haven't seen any errors in logs though related to wallets, transactions, offers, etc. The only errors I've seen were related to network and they were reasonable.

> In the mean time I would strongly recommend you [export your accounts](https://bisq.wiki/Backing_up_application_data#Back_up_payment_accounts), make a [backup](https://bisq.wiki/Backing_up_application_data), and start from a [fresh data directory](https://bisq.wiki/Switching_to_a_new_data_directory). Restore your wallet balances from the [recovery seed word](https://bisq.wiki/Restoring_your_wallet_from_seed). Re-import your accounts. That way you are starting from a solid foundation with all balances accounted for and the wallet corruption would not be there to cause further problems.
> 
> Any other issues or concerns feel free to reach out to me on keybase (same username).

While a was hoping to avoid this, since it is time consuming and might lead to a loss of signed accounts, it seems that this is the only way to go. Will try that and will let you know the result. And thank you for offering a helping hand in keybase - appreciate it.

@pazza83 
Thank you for offering help. Address which holds money is this: bc1qnvwx9xfeh34v4e7tws2ll3fdspjra4uhllwfyu 

Will ping you on keybase.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/issues/5661#issuecomment-898306714
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210813/32fef2fb/attachment-0001.htm>


More information about the bisq-github mailing list