-
Notifications
You must be signed in to change notification settings - Fork 42
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
feat: ignore unavailable swap clients on create (#1815) #2004
Conversation
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. |
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 change is very straightforward to do and I think the use case makes at least some sense since wallets/swap clients that aren't initialized up front will be initialized on future unlock calls. It does mean, however, that a user could create an xud node and not have all swap clients initialized upon first run, if they want them to be initialized properly later they'll need to restart xud. But maybe that's a desirable tradeoff. The thinking originally of having this requirement was to prevent users from initializing xud without initializing all the swap clients it is using (if a swap client is enabled and configured, presumably we expect the user to want it to be initialized), the related issue changes that behavior.
Note that we still require swap clients to be online for restore calls, which makes sense to keep that restriction to help ensure we restore everything properly.
It'd be good to get a concept ACK from @kilrau about the above, but the code change here is fine.
Concept ACK |
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.
Steps:
- wait for neutrino sync
- stop container with lndbtc
- try to create xud wallet
- I am still getting unavaliable err
native@ubuntu:~/xud$ ./bin/xucli create
You are creating an xud node key and underlying wallets. All will be secured by a single password provided below.
Enter a password:
Re-enter password:
Error: 13 INTERNAL: could not initialize lnd-BTC: 14 UNAVAILABLE: failed to connect to all addresses
native@ubuntu:~/xud$ ./bin/xucli getbalance
xud is locked, run 'xucli unlock', 'xucli create', or 'xucli restore' then try again
native@ubuntu:~/xud$ ./bin/xucli unlock
Enter master xud password:
no xud node exists to unlock, try creating one with 'xucli create' or 'xucli restore'
native@ubuntu:~/xud$
- also it would be good if u fix assertion for auto-post-create flow
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
at LndClient.<anonymous> (/home/native/xud/dist/lndclient/LndClient.js:369:38)
at Generator.next (<anonymous>)
at /home/native/xud/dist/lndclient/LndClient.js:27:71
at new Promise (<anonymous>)
at __awaiter (/home/native/xud/dist/lndclient/LndClient.js:23:12)
at LndClient.awaitWalletInit (/home/native/xud/dist/lndclient/LndClient.js:348:42)
at LndClient.<anonymous> (/home/native/xud/dist/lndclient/LndClient.js:413:30)
at Generator.next (<anonymous>)
at /home/native/xud/dist/lndclient/LndClient.js:27:71
at new Promise (<anonymous>)
@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. Yeap, im sure that I am in same changeset.
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:
|
Thanks for sharing all steps briefly Roman I will check it.
25 Kas 2020 Çar 22:06 tarihinde raladev <[email protected]> ş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.
***@***.***:~/xud$ git log -1
commit f7b955b (HEAD -> fix/create-node-ignore-unavailable-clients, origin/fix/create-node-ignore-unavailable-clients)
Author: rsercano ***@***.***>
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:
0. share lnd port through simnet.conf -
https://docs.exchangeunion.com/development/developer-guide
1. bash xud.sh
2. wait for neutrino sync
3. close utils
4. docker rm -f simnet_xud_1
5. docker stop simnet_lndbtc_1
6. git clone https://github.com/ExchangeUnion/xud.git
7. mkdir .xud & cd ./xud
8. 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
1. cd ~/xud
2. git checkout fix/create-node-ignore-unavailable-clients
3. npm install & npm run compile & npm run compile:seedutil
https://docs.exchangeunion.com/development/native-installation
4. sudo ./bin/xud
5. sudo ./bin/xucli create
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#2004 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA3YYMH2QWOYGSEEW7H2ST3SRVIVFANCNFSM4UAUWLLQ>
.
|
f7b955b
to
0d39a5d
Compare
I changed how |
Could you please give this another look? @sangaman |
This error Sercan's workaround to remove the |
attempts to fix #1815
But as a followup I don't know if this affects next startups when L2 is setup properly @sangaman