-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trade payout address was reused from prior trade & no funds received #5725
Comments
Is it problem with BitcoinJ |
I don't see anything wrong with the few lines of code used to create |
This problem has been reported again. A prior trade completed normally then its payout address was reused by trade |
Received a third reported case A "band-aid" fix might possibly be to check for the payout amount to match the trade details, and that might prevent the issue from a user perspective, but the underlying problem is that Bisq chose to reuse an old address which is bad practice and quite wrong. Opinions sought from @bisq-network/bisq-maintainers @chimp1984 |
Yes your suggestion sounds feasible. The address should not be reused but there might be edge cases/bug situations where that happens. |
Another instance of this issue was reported by @pazza83. |
Checking for payout amount would not work if the trade was settled using Manual Payout or with a Mediation penalty. But checking that block height of the payout > deposit block height would work. |
Buy trade, maker:
czcgg
. Upon clicking "Payment started", the trade immediately transitioned to complete, although the seller had not yet acknowledged payment receipt.Investigation showed that the trade obtained the same payout address as a prior trade done an hour earlier. Therefore the payout address listener found funds (from the prior trade) - this indicated to Bisq that the trade was complete.
The code in Bisq explicitly requests an unused address, ultimately relying on BitcoinJ for that.
An unused payout address is requested at trade initiation:
bisq/core/src/main/java/bisq/core/trade/protocol/tasks/maker/MakerSendsInputsForDepositTxResponse.java
Line 62 in 4849988
bisq/core/src/main/java/bisq/core/btc/wallet/BtcWalletService.java
Lines 668 to 672 in 4849988
bisq/core/src/main/java/bisq/core/btc/wallet/WalletService.java
Lines 545 to 546 in 4849988
bisq/core/src/main/java/bisq/core/btc/wallet/WalletService.java
Lines 529 to 542 in 4849988
https://github.com/bisq-network/bitcoinj/blob/3186b200fff690fa51f3ebbf578f427d78242bc2/core/src/main/java/org/bitcoinj/wallet/Wallet.java#L3000-L3009
The text was updated successfully, but these errors were encountered: