-
Notifications
You must be signed in to change notification settings - Fork 94
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
fix(watchtower): fix watchtower taker-side restart bug #1908
Conversation
f915050
to
6402adf
Compare
started swap, killed taker after takerpayment sent and waited for watcher to send makerpayment to taker in this tx https://kmdexplorer.io/tx/a2513faf3d479b8e14096be9b0ba8977d669a7a9ca722be0e2bbe3833fa51a4e, then restarted taker swap is shown as successful but also as "recoverable": when i click "recover funds" i get this error:
@smk762 do you know where ADEX Desktop gets the "is_recoverable" info from?
|
I guess |
Should be fixed after the latest commit :) |
tested and it is fixed, recover button is gone in Desktop other question: does watcher cover maker refunds too (eg when maker needs to refund makerpayment because takerpayment was not sent), or only taker? |
Currently, watchers only covers takers, this was the priority due to security considerations but it's planned to cover maker refund in the future. |
I checked last commit 1eb1d48 on Komodo web wallet and macos native. Following was observed for Taker: dex_taker_issue.movApp logs attached: |
I think this related to swaps events handling in web wallet, please note that |
So we need enhancements for web app and potentially mobile client right? Or this fix should be applicable only to legacy Desktop and CLI? |
yeah apps will need to tweak how they parse the swap json - KomodoPlatform/komodo-wallet#1298 (comment) |
https://sdk.devbuilds.komodo.earth/bugfix-watchtower/mm2_1eb1d48-linux-x86-64.zip is no more |
Merged with dev, new build should be compiled soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* use ALICE_PASSPHRASE for eth_distributor in docker_tests_common.rs
This PR fixes #1887, which causes the swaps to appear failed on the taker side if the watcher already completed it and the taker is restarted. The issue is fixed by checking if the watcher has spent the maker payment or refunded the taker payment before kick-starting an unfinished saved swap. If the watcher has not completed the swap, taker continues the swap itself. If the watcher has completed the swap, the saved swap is also completed by using new events
MakerPaymentSpentByWatcher
orTakerPaymentRefundedByWatcher
.