-
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
Recover from LND crashes while swapping #1126
Comments
Colorful. |
Do you want to discuss an implementation proposal? @sangaman |
. |
As discussed with @sangaman , this is a simulation test task. LND/Raiden crashed need to be simulated in different phases of the swap. @LePremierHomme |
Updates? @LePremierHomme |
@LePremierHomme To elaborate on what this would entail, we want to simulate scenarios where LND abruptly shuts down or freezes in the middle of a swap. This would be part of our instability test suite. We could perhaps do this by subscribing to an invoice on lnd that's involved in a swap and immediately issuing a sigkill when we detect its status changing, then on the xud side we want to make sure that we can recover from the crash gracefully and not lose any funds. |
@sangaman thanks for the details.
|
|
After implemented the test scenario i'm see the following behaviour. Maker
Taker
|
Yes that looks exactly correct, thank you. If you want to reduce the wait time down from 5 minutes for the modified branch code, you can look into changing or replacing this value https://github.com/ExchangeUnion/xud/blob/master/lib/swaps/SwapRecovery.ts#L18. |
Just want to make sure that we don't want to consider these improvements:
|
This sounds like a very reasonable improvement to our swap logic. wdyt? @sangaman If you agree, let's open an issue.
Your example above indeed shows that this trade should be marked as "SwapCompleted" for the taker. Nevertheless I would not simply ignore the Makers |
Also afai understand it you implemented one scenario with the maker lnd crashing after sending the second payment. I agree this is the most critical scenario. Did you come up with any other relevant scenarios we should cover here? @LePremierHomme |
It might worth having a scenario where Besides that, we can simulate the same things on the taker side - more for testing the functionality, as the funds are less at risk. |
Lets wait for @sangaman to chime in |
Closed by #1484 |
Enhancement of #1081
Currently #1081 only deals with
xud
crashing somewhere betweenSwapCreated
andSwapCompleted
: This is about dealing with LND crashing in these swap phases and restoring from it.Open new issue to do the same for connext/c-lightning.
The text was updated successfully, but these errors were encountered: