-
Notifications
You must be signed in to change notification settings - Fork 43
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(swaps): no remote fail when sending payment #1761
Conversation
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.
The changes look good @sangaman. As a follow-up what do you think about making the this.failDeal
explicit and by default not failing the deal? At the moment it's the opposite.
I'll rearrange the logic in a separate PR so as to not hold this one up. |
Created that follow-up issue. |
Been restarting the builds for several hours now and they seem to be failing with random errors. |
Same for me... I'm going to dig into this to see if this change somehow breaks the security tests. Getting context deadline exceeded there (sometimes) so it could be hanging waiting for a swap to fail that doesn't fail due to this change perhaps? |
I'm testing a fix for the simulation tests. The tests were expecting the maker to fail due to SwapTimedOut, which is actually not desirable and what this PR is intended to fix. |
d510edf
to
8d689b0
Compare
I believe I straightened out the simulation tests. However, it appears that I had to revert the security sim test changes from c9be219. The maker should not be canceling his incoming htlc until his outgoing htlc has expired, that's what this PR is fixing. |
That sounds quite right. Can you give check the simtest changes once more? @erkarl |
8d689b0
to
94a12d4
Compare
There is still no monitoring continuation for maker side after maker's xud restart. Steps:
Screenshot from 2020-07-29 19-36-15 monitor_xud_taker.log maker's xud db - https://gofile.io/d/7GKTmK |
Also needs a rebase. |
This prevents the maker from failing a swap due to a swap failed packet received from the taker if the maker has already started sending its payment. This is because the taker may still claim the payment, and the maker needs to continue monitoring its outgoing payment until it is certain that the payment cannot be claimed. Fixes #1749.
94a12d4
to
dc7e4d2
Compare
This is very helpful but after some investigation I'm pretty sure this is a separate issue from this PR and the issue it indends to fix. It's due to the fact that a connext sendpayment call can "fail" while the payment is still in limbo. It's actually somewhat related to #1794, the solution is to not fail the deal when a sendpayment calls, and to have a mechanism within swaps to monitor swaps that are still in an active status even after they've timed out and even after our attempts to send payment have failed, up until we get confirmation that all HTLCs are canceled/expired. Everything in |
This prevents the maker from failing a swap due to a swap failed packet received from the taker if the maker has already started sending its payment. This is because the taker may still claim the payment, and the maker needs to continue monitoring its outgoing payment until it is certain that the payment cannot be claimed.
Fixes #1749.