ExchangeUnion / xud-docker

Streamlined setup of xud and all dependencies via docker 🐳
https://docs.exchangeunion.com
GNU Affero General Public License v3.0
5 stars 5 forks source link

LND unlock **before** xud restart #479

Closed kilrau closed 4 years ago

kilrau commented 4 years ago

It looks like https://github.com/ExchangeUnion/xud-docker/pull/469 did not fix lnd status stuck in lnd-XTC is Unlocked within xud in 100% of the cases. Sometimes, even after xud was restarted, lnd status got stuck in is Unlocked. One more xud restart always brought it up healthy though. So this issue is about verifying that unlocking lnd before restarting xud let's xud come up healthy 100%.

If this turns out to be the case, we'll add a verification path to the xud restart logic of https://github.com/ExchangeUnion/xud-docker/pull/469 where we detect if xucli getinfo returns lnd status is Unlocked after restart. If so, we'll automatically restart xud once more and prompt for password once more. This second password prompt will only occur if xud indeed has problems with lnd, which shouldn't happen for most users.

kilrau commented 4 years ago

Also, if we end up implementing this, we should test create flows of all 3 networks and testnet+mainnet with full nodes too to make sure we didn't break anything there @raladev .

raladev commented 4 years ago

Tested, it works, but I prefer the way without additional restart of xud. It seems more correct for me, but is required a little bit more work:

  1. Create wallets -> Admin macroon problem faced
  2. Print to the cli: Lnd restart is required because of admin macroon problem.
  3. Restart lnd - > Check getinfo 3.1 If correct response got -> move to step 5 3.2 If admin macroon response got -> move to step 4
  4. Print to the cli: lnd unlock is required before continue -> ask pwd for lnd unlock and unlock both or one of them.
  5. Restart xud -> unlock autoprint

What do you think about it @kilrau?

kilrau commented 4 years ago

Not needed anymore.