bisq-network / bisq

A decentralized bitcoin exchange network
https://bisq.network
GNU Affero General Public License v3.0
4.63k stars 1.26k forks source link

Bisq2 not seeing all BSQ burned for reputation #7138

Closed lordbah closed 3 weeks ago

lordbah commented 4 weeks ago

Description

I told it to burn 260 BSQ. The transaction on the blockchain shows only 5.94 BSQ were burned. Yet BSQ UI says the transaction burned 260 and shows a BSQ wallet balance as if 260 were burned. Bisq2 is looking at the chain, so only awarded reputation corresponding to 5.94 BSQ. Repeated resync DAO state and rebuild DAO from genesis TX have not corrected the situation.

EDIT: The blockchain explorers were lying to me, correct amount was burned, though using 2 inputs. The oracle node didn't see the second input until it was resynced.

Version

1.9.15

Steps to reproduce

I don't want to risk more by trying to reproduce the problem.

Expected behaviour

Bisq should have produced a transaction that burned the correct amount of BSQ. Further, I expected one of the resyncs/rebuilds to adjust whatever Bisq is using to generate the data it shows on the UI to match what is present on the blockchain.

Actual behaviour

It generated a burn for the wrong amount. Rebuild did not correct its view.

Screenshots

Screenshot from 2024-06-01 23-05-50 SCREENSHOT REMOVED

Device or machine

PopOS 22.04 LTS (Ubuntu Linux)

Additional info

Burn transaction id REDACTED BSQ purchase transaction id just before that REDACTED

lordbah commented 3 weeks ago

Looking at the same transaction on blockchair. 33380+594=33974 in, 7974 out on output 0 (returned to me as change), 33974-7974=26000, which is the 260 that I asked it to burn. Fine. Except it wasn't all burned. Another 17600 went to output 1. That address is in my bisq wallet.

BsqTxListItem.java has this comment

               // We don't support send txs with multiple outputs to multiple receivers, so we can
                // assume that only one output is not from our own wallets.

There are multiple outputs here, but both are in my wallet, so is that not considered "multiple receivers"?

Anyway, my question is why did output 1 get added to the transaction? And why in the amount of 17600?

I have no idea what that d-d6 address is.

SCREENSHOT REMOVED

lordbah commented 3 weeks ago

And, that 17600 seems to have been returned as what bisq regards as BTC but not BSQ. What's up with that?

HenrikJannsen commented 3 weeks ago

The 2 inputs are both BSQ inputs. The first output is a BSQ output the second one is a BTC output and the 3rd the opReturn from the burn tx (look at https://mempool.emzy.de/tx/ece70cb8da04e8e07cdd1d58f5b868d62d8161de926776411a3739b101f33399 which more standard, the d- prefix at your explorer screenshot is likely for data but never saw that in an explorer).

Burned BSQ is used for minerfees. Usually a BSQ tx requires a BTC input for the minerfees, though if enough BSQ gets burned no BTC input is required. So in your case the minerfee is paid from the burned BSQ.

The burned BSQ show correctly here: https://markets.bisq.services/tx/ece70cb8da04e8e07cdd1d58f5b868d62d8161de926776411a3739b101f33399

Where do you see that 5.94 BSQ got burned?

Regarding the comment in BsqTxListItem: That is meant that not multiple BSQ receivers are supported (but multiple outputs (BSQ, BTC, opReturn).

HenrikJannsen commented 3 weeks ago

Did you use the burn for Bisq2? If so, did you see the reputation correctly there? If not let me know, the oracle node has sometimes an issue and needs restart.

lordbah commented 3 weeks ago

Where do you see that 5.94 BSQ got burned?

The second screenshot in my first post says "Burnt Amount 5.94 BSQ". It also shows that 5.94 as the only input, which disagrees with the two explorers you linked. I don't understand quite how that's possible since my screenshot also came from REDACTED same URL as yours except for the "bisq." in the beginning. That URL won't load for me now, "confirmed but not in the database".

Did you use the burn for Bisq2? If so, did you see the reputation correctly there? If not let me know, the oracle node has sometimes an issue and needs restart

The intent was to burn 260 for 26000 reputation. But Bisq2 is showing just 5.94/594 under User Options / User Profile, and in User Options / Reputation / Ranking if I search for myself. Through several restarts and days. That info comes to Bisq2 from an "oracle node"? I'd guess either that's not reading the second BSQ input in the transaction, or as you say it needs a restart.

HenrikJannsen commented 3 weeks ago

Unfortunately the BSQ explorers are unstable and sometimes wrong. https://markets.bisq.services/ tends to be more stable.

The oracle node is still not getting the tx. I need to resync the node, which will take a bit.

Tor suffers heavy ddos since a while and that affects Bisq badly. This leads to instabilities in the network. We are working on improvements but we are short on dev resources...

lordbah commented 3 weeks ago

Okay, let me know when I should check it.

lordbah commented 3 weeks ago

Looks like it sees all the burned BSQ now. Thanks.

HenrikJannsen commented 3 weeks ago

Oracle node should be fine again.