Closed rsercano closed 3 years ago
Can we initialize all swap clients after the initial create now?
Can we initialize all swap clients after the initial create now?
Yes, thanks to #1973 we should automatically initialize wallets on future xud unlocks, so requiring all wallets/swap clients to be online upon initial create isn't that big a deal any more. So this change would make sense to me now.
Concept ACK
@raladev are you sure you have the correct changeset? I have the exact same condition and don't get an error:
checked once more, same result. Screenshot from 2020-11-25 21-55-33 Screenshot from 2020-11-25 21-55-21
Yeap, im sure that I am in same changeset.
native@ubuntu:~/xud$ git log -1
commit f7b955b89236861c33226e14bc105ae77c372f24 (HEAD -> fix/create-node-ignore-unavailable-clients, origin/fix/create-node-ignore-unavailable-clients)
Author: rsercano <ozdemirsercan27@gmail.com>
Date: Tue Nov 24 12:51:05 2020 +0300
fix: ignores unavailable swap clients during create node (#1815)
U have a little bit differrent condition, in your case both lnd are not avaliable, in my case only lndbtc is not avaliable.
My steps:
loglevel = "trace"
noencrypt = false
[http] host = "localhost" port = 8887
[lnd.BTC] cltvdelta = 40 disable = false host = "localhost" nomacaroons = false port = 30009 certpath = "/home/native/.xud-docker/simnet/data/lndbtc/tls.cert" macaroonpath = "/home/native/.xud-docker/simnet/data/lndbtc/data/chain/bitcoin/simnet/admin.macaroon"
[lnd.LTC] cltvdelta = 576 disable = false host = "localhost" nomacaroons = false port = 31009 certpath = "/home/native/.xud-docker/simnet/data/lndltc/tls.cert" macaroonpath = "/home/native/.xud-docker/simnet/data/lndltc/data/chain/litecoin/simnet/admin.macaroon"
[raiden] disable = true
[connext] disable = false host = "localhost" port = 25040
[debug] testing = false
9. cd ~/xud
10. git checkout fix/create-node-ignore-unavailable-clients
11. npm install & npm run compile & npm run compile:seedutil https://docs.exchangeunion.com/development/native-installation
12. sudo ./bin/xud
13. sudo ./bin/xucli create
Thanks for sharing all steps briefly Roman I will check it.
25 Kas 2020 Çar 22:06 tarihinde raladev notifications@github.com şunu yazdı:
checked once more, same result. Screenshot from 2020-11-25 21-55-33 https://user-images.githubusercontent.com/29906866/100270494-33ad5080-2f69-11eb-9ad9-9515ab0090c4.png Screenshot from 2020-11-25 21-55-21 https://user-images.githubusercontent.com/29906866/100270499-35771400-2f69-11eb-92b9-008142564341.png
Yeap, im sure that am in same changeset.
native@ubuntu:~/xud$ git log -1 commit f7b955b89236861c33226e14bc105ae77c372f24 (HEAD -> fix/create-node-ignore-unavailable-clients, origin/fix/create-node-ignore-unavailable-clients) Author: rsercano ozdemirsercan27@gmail.com Date: Tue Nov 24 12:51:05 2020 +0300
fix: ignores unavailable swap clients during create node (#1815)
U have a little bit differrent condition, in your case both lnd are not avaliable, in my case only lndbtc is not avaliable.
My steps:
share lnd port through simnet.conf - https://docs.exchangeunion.com/development/developer-guide
- bash xud.sh
- wait for neutrino sync
- close utils
- docker rm -f simnet_xud_1
- docker stop simnet_lndbtc_1
- git clone https://github.com/ExchangeUnion/xud.git
- mkdir .xud & cd ./xud
- nano xud.conf - set pathes to lndbtc and lndltc certs
loglevel = "trace" noencrypt = false
[http] host = "localhost" port = 8887
[lnd.BTC] cltvdelta = 40 disable = false host = "localhost" nomacaroons = false port = 30009 certpath = "/home/native/.xud-docker/simnet/data/lndbtc/tls.cert" macaroonpath = "/home/native/.xud-docker/simnet/data/lndbtc/data/chain/bitcoin/simnet/admin.macaroon"
[lnd.LTC] cltvdelta = 576 disable = false host = "localhost" nomacaroons = false port = 31009 certpath = "/home/native/.xud-docker/simnet/data/lndltc/tls.cert" macaroonpath = "/home/native/.xud-docker/simnet/data/lndltc/data/chain/litecoin/simnet/admin.macaroon"
[raiden] disable = true
[connext] disable = false host = "localhost" port = 25040
[debug] testing = false
- cd ~/xud
- git checkout fix/create-node-ignore-unavailable-clients
- npm install & npm run compile & npm run compile:seedutil https://docs.exchangeunion.com/development/native-installation
- sudo ./bin/xud
- sudo ./bin/xucli create
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/ExchangeUnion/xud/pull/2004#issuecomment-733897729, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3YYMH2QWOYGSEEW7H2ST3SRVIVFANCNFSM4UAUWLLQ .
I changed how initWallets
in SwapClientManager
behave while initializing by removing throw error
phrase, therefore it won't throw while initializing a wallet per swap client and create/restore commands should continue as is, if one of the clients is not available for initializing.
@raladev @sangaman
Could you please give this another look? @sangaman
This error 24/11/2020 09:32:03.099 [LND-BTC] error: AssertionError [ERR_ASSERTION]: awaitWalletInit should not be called from a status besides Initialized or Unlocked
is unrelated to this PR - I'll look into it separately. It's a bit of an edge case but I can reproduce it by setting up a new node with an enabled lnd in the config that is unreachable. It's setting the state of that lnd to WaitingUnlock
when it should really be disconnected, so it tries to unlock it anyway and hits that exception.
Sercan's workaround to remove the throw
line is fine for now, but I think it would make sense to reenable it once the above is addressed.
attempts to fix #1815
But as a followup I don't know if this affects next startups when L2 is setup properly @sangaman