-
Notifications
You must be signed in to change notification settings - Fork 44
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
test(sim): maker connext-client crash before taker order settlement #1758
base: master
Are you sure you want to change the base?
Conversation
After 2 attempts I was able to get them passing locally. The first 2 attempts failed with |
@sangaman please also try to run them locally to see if you run into similar issues? |
Can you give this a rebase and see if this still works? @LePremierHomme |
# Conflicts: # test/simulation/custom-xud.patch
4448c5c
to
f41a0a7
Compare
The test case doesn't pass anymore, probably due to recent changes. As described, the test simulate the maker's connext client crash while taker is delaying the settlement. After the settlement, connext client is re-started and connection is verified. But then the recovery procedure doesn't kicking in, although its interval was adjusted to 2sec. Looks like there's an error connecting with LND-BTC, although its still alive, and later the invoice subscription is being deleted. The test fails because the maker's BTC funds aren't recovered, and the channel remains with active htlcs. @sangaman @erkarl any ideas? Maker xud log
|
In those logs it does look like the Connext client gets shut down but it doesn't look like the send payment call to Connext actually fails - I don't see the logging statement from this line https://github.com/ExchangeUnion/xud/blob/master/lib/swaps/Swaps.ts#L1057 that I'd expect if a sendpayment call failed. I'm honestly not sure why that is - could it be that the client is down too briefly? If the call doesn't fail, it will get stuck waiting for a response from that call which appears to be what is happening. I have no explanation for why LND-BTC decides to fail after a while. Maybe it's hitting some timeout within the simulation test? As for why the invoice gets deleted, that's what we do when the invoice subscription to lnd gives us an error. |
Let's leave this open as draft as-is and give this another shot after switch to vector like you said @LePremierHomme |
Implementing a new instability test scenario where, during a swap, the maker’s outgoing payment ETH swap client crashes while the taker is delaying his settlement.
I've implemented a similar one for LND, but it looks like that if the maker LND is crashing, the taker cannot settle.
The cannonical xud don't even reach that stage:
swapFailed
packet, so the taker fails the deal.If custom code is introduced, the taker still fails to settle the invoice (
UnexpectedClientError
). This scenario also causes the channel to get closed.That's why I thought there's no point to keep this test, and I removed the test code (I still have it stashed in case we'll want it).