Closed TrezorHannes closed 6 months ago
Thanks for the info. Can you please tell us which version of litd you are running? I think this might have been the macaroon between litd and lnd, so not really related to loop itself (judging from the error message).
Also, are you running litd in remote lnd
mode? Or what's the setting for lnd-mode=
?
Thanks Oliver coming back to me.
I'm running litd with remote-lnd. My lit.conf
missing the lnd-mode=
setting, but assuming standard would be remote.
remote.lnd.rpcserver=127.0.0.1:10009
remote.lnd.macaroonpath=~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon
remote.lnd.tlscertpath=~/.lnd/tls.cert
with rpc-middleware activated. And 🤦 of course, loop-version doesn't help here at all, haha.
litd -V
litd version 0.16.0-beta commit=lightning-terminal-v0.9.0-alpha
Oh, I think I might have found the issue. Is it possible that you waited more than 60 seconds between the CONTINUE SWAP? (y/n):
question and actually pressing y
?
If that's possible, then I guess the solution would be to not create the gRPC client in the Loop CLI before asking for confirmation. Otherwise the macaroon (to which loopcli
always adds a 60 second timeout after it is loaded from disk) would expire before it's actually being used.
Interesting scenario. I'm uncertain whether I had a minute delay between. But to validate, I'll try a > 60 second gap next time I'm looping-in or -out and will come back to you here. Mind if we leave the issue open until then?
Mind if we leave the issue open until then?
Sounds good, but now I'm actually pretty sure it must be this, since we don't add an expiry to any macaroon anywhere else.
By the way, you are using quite an old version of litd, I would highly recommend updating!
Mind if we leave the issue open until then?
Sounds good, but now I'm actually pretty sure it must be this, since we don't add an expiry to any macaroon anywhere
Will reconfirm, so we can look at how this could be mitigated.
By the way, you are using quite an old version of litd, I would highly recommend updating!
Aye 🖖
admin@debian-nuc /tmp ฿ litd --lnd.version
litd version 0.16.4-beta commit=lightning-terminal-v0.10.5-alpha
Can verify that this is solved with v0.10.5 onwards (have v0.12.2 running now)
Trying a loop-in via loop-cli resulted in an RPC error, stating that given macaroon has expired.
Reviewing the macaroon documentation on LND, and printing
lncli printmacaroon --macaroon_file /path/to/macaroon
didn't outline whether macaroons really expire, and if so, how to look those up and what would be require to renew / extent the expiration time.What actually helped was restarting the litd.service. Even though the macaroon timestamp didn't change, the swap in actually proceeded successfully
Now with litd system-service restarted, I'm not sure whether I can replicate it. But perhaps lit's loop-cli is using a cached version of the macaroon, which expires at some point? Perhaps some insights from you could help either document it, or we found a bug eventually
Standalone binaries downloaded from GH.
NUC 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz Linux debian-nuc 5.10.0-23-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64 GNU/Linux
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye
That's the only piece I found in litd.log which is relevant to the issue, but nothing insightful