Pages:
Author

Topic: The Lightning Network FAQ - page 19. (Read 33639 times)

hero member
Activity: 1274
Merit: 681
I rather die on my feet than to live on my knees
February 03, 2022, 03:54:50 PM
Have you managed to make it work?
Hi, thanks for your persistence!

I think that my node should be working fine. This is my getinfo:
Code:
admin@raspibolt:~/.lightning/testnet $ lightning-cli --testnet getinfo
{
   "id": "0261f00131d87b1bb2b02e6d96ad31d72e33c1c9e8a87583f734c000e9a0155144",
   "alias": "LightningVortex",
   "color": "0261f0",
   "num_peers": 1,
   "num_pending_channels": 0,
   "num_active_channels": 1,
   "num_inactive_channels": 0,
   "address": [
      {
         "type": "torv3",
         "address": "xixzo67fevmab7wytj5qp7mowvbildpbr7xgaj4hp5dbqgr36termcyd.onion",
         "port": 9735
      }
   ],
   "binding": [
      {
         "type": "ipv4",
         "address": "127.0.0.1",
         "port": 9735
      }
   ],
   "version": "v0.10.2",
   "blockheight": 2138884,
   "network": "testnet",
   "msatoshi_fees_collected": 0,
   "fees_collected_msat": "0msat",
   "lightning-dir": "/home/admin/.lightning/testnet"
}

Code:
0261f00131d87b1bb2b02e6d96ad31d72e33c1c9e8a87583f734c000e9a0155144@xixzo67fevmab7wytj5qp7mowvbildpbr7xgaj4hp5dbqgr36termcyd.onion:9735

Try to connect with me, we'll most likely connect properly. Electrum doesn't, though:


At least it gives me a message now. Could I have a context of what does that mean?

I still couldn't connect to you!
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
February 03, 2022, 03:40:11 AM
Have you managed to make it work?
Hi, thanks for your persistence!

I think that my node should be working fine. This is my getinfo:
Code:
admin@raspibolt:~/.lightning/testnet $ lightning-cli --testnet getinfo
{
   "id": "0261f00131d87b1bb2b02e6d96ad31d72e33c1c9e8a87583f734c000e9a0155144",
   "alias": "LightningVortex",
   "color": "0261f0",
   "num_peers": 1,
   "num_pending_channels": 0,
   "num_active_channels": 1,
   "num_inactive_channels": 0,
   "address": [
      {
         "type": "torv3",
         "address": "xixzo67fevmab7wytj5qp7mowvbildpbr7xgaj4hp5dbqgr36termcyd.onion",
         "port": 9735
      }
   ],
   "binding": [
      {
         "type": "ipv4",
         "address": "127.0.0.1",
         "port": 9735
      }
   ],
   "version": "v0.10.2",
   "blockheight": 2138884,
   "network": "testnet",
   "msatoshi_fees_collected": 0,
   "fees_collected_msat": "0msat",
   "lightning-dir": "/home/admin/.lightning/testnet"
}

Code:
0261f00131d87b1bb2b02e6d96ad31d72e33c1c9e8a87583f734c000e9a0155144@xixzo67fevmab7wytj5qp7mowvbildpbr7xgaj4hp5dbqgr36termcyd.onion:9735

Try to connect with me, we'll most likely connect properly. Electrum doesn't, though:


At least it gives me a message now. Could I have a context of what does that mean?
hero member
Activity: 1274
Merit: 681
I rather die on my feet than to live on my knees
February 02, 2022, 06:47:41 PM
You need to remove all '$' signs from the command.

Code:
usermod -a -G debian-tor bitcoin
Done and restarted C-Lightning. The error remains. Something tells me that I have to reinstall C-Lightning for the 4th time. Any tutorials recommended besides n0nce's that I have to also install openSUSE?

Do you have any incoming connections in Bitcoin Core? Does it run behind Tor as well?
Yes and yes.

Have you managed to make it work? I also struggled with this. And I did so many things that I can't even say what was wrong!

If you still haven't managed it to work, we can try to go step by step, check config files, check services, check logs, etc!
hero member
Activity: 924
Merit: 5950
not your keys, not your coins!
February 02, 2022, 06:15:24 AM
there will be a version of this integrated in the main wallet? and not separated one, which may look kinda of tech savy for many normal people?
A version of what? And which main wallet? You mean whether Lightning will be integrated into Bitcoin Core?
No, Lightning will not be integrated into Bitcoin Core and it wouldn't even necessarily make anything simpler.

If you want something simpler, you can use Lightning through light clients such as:
Electrum
Breez
Wallet of Satoshi

However, if you want to help decentralize the LN network, just as is the case when decentralizing the Bitcoin L1 network, you do need to get into the 'tech savvy' intricacies of running your own full node.
legendary
Activity: 3248
Merit: 1072
February 02, 2022, 06:03:39 AM
there will be a version of this integrated in the main wallet? and not separated one, which may look kinda of tech savy for many normal people?
hero member
Activity: 924
Merit: 5950
not your keys, not your coins!
January 29, 2022, 12:03:38 PM
Is the port correct (matching configuration - in my guide and own config I used 9735) and have you rebooted after changing configuration? Sometimes it's easiest to reboot because it restarts all the services kind of in oder.
The port is supposed to be 19735 as that's the testnet port number. I haven't followed your guide in a detailly way; for instance I don't have openSUSE. I have just C-Lightning installed.
Oh right, I see. I saw some people use 19735 for Tor connection and 9735 for clearnet, didn't know it was the convention to use the former for testnet actually. My suspicion was that it could have been an issue like setting 9735 in torrc but telling C-Lightning to use 19735, so both simply not matching.

I don't understand how will reboot help, but once I do it I'll let you know.
Sometimes when you restart only bitcoind or only lightningd, there were little bugs / issues in the past.

@BlackHatCoiner, I see that n0nce's guide includes some instructions on editing the /etc/tor/torrc file, but it appears to me that something is missing.

Try adding the following lines of code to your torrc file.

Code: (https://lightning.readthedocs.io/TOR.html)
ControlPort 9051
CookieAuthentication 1
CookieAuthFileGroupReadable 1
Nope, it's not needed. I didn't just copy-paste C-Lightning instructions for a reason. Grin
Specifically, I don't like to open the control port and just connect 'manually'. Therefore, also the addr=statictor is not needed.
I can confirm that my guide works if followed 1:1 (even if only installing Lightning with it), because I followed it myself a while ago from a fresh install.

Code: (https://lightning.readthedocs.io/TOR.html)
proxy=127.0.0.1:9050
bind-addr=127.0.0.1:19735
addr=statictor:127.0.0.1:9051
always-use-proxy=true
Don't do this if you follow my guide.. Following this part 'standalone', should work just fine.

Don't forget to restart Tor (systemctl restart tor) and c-lightning after making changes.
Or like this, but should be equivalent: sudo service tor restart
legendary
Activity: 1876
Merit: 3139
January 28, 2022, 05:11:47 PM
I don't have any more ideas for now. We might find a clue in either Tor or c-lightning* logs.

* - you need to append log-level=debug:connectd to your config file and restart your node.

Any tutorials recommended besides n0nce's that I have to also install openSUSE?

Why don't you follow the official documentation? It's pretty straightforward. There are instructions for a couple of different operating systems if you want to compile the source. You can also use pre-compiled binaries if you don't have much time.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
January 28, 2022, 11:54:29 AM
You need to remove all '$' signs from the command.

Code:
usermod -a -G debian-tor bitcoin
Done and restarted C-Lightning. The error remains. Something tells me that I have to reinstall C-Lightning for the 4th time. Any tutorials recommended besides n0nce's that I have to also install openSUSE?

Do you have any incoming connections in Bitcoin Core? Does it run behind Tor as well?
Yes and yes.
legendary
Activity: 1876
Merit: 3139
January 28, 2022, 11:49:31 AM
Note: I run C-Lightning from the same user that I run Bitcoin Core. I don't know if it matters.
What exactly do I execute next? This?

You need to remove all '$' signs from the command.

Code:
usermod -a -G debian-tor bitcoin

Do you have any incoming connections in Bitcoin Core? Does it run behind Tor as well?
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
January 28, 2022, 11:47:31 AM
Note: I run C-Lightning from the same user that I run Bitcoin Core. I don't know if it matters.

The output is {TORGROUP} which you need for the next command
The output of this command is debian-tor.

What exactly do I execute next? This?
Code:
usermod -a -G $debian-tor $bitcoin

It returns me:
Code:
usermod: option requires an argument -- 'G'
legendary
Activity: 1876
Merit: 3139
January 28, 2022, 11:37:22 AM
I just did. Same errors:

Did you look at other instructions in this documentation? Maybe your user is not a member of Tor group?

Code: (https://lightning.readthedocs.io/TOR.html)
stat -c '%G' /run/tor/control.authcookie

The output is {TORGROUP} which you need for the next command.

Code: (https://lightning.readthedocs.io/TOR.html)
usermod -a -G ${TORGROUP} ${LIGHTNINGUSER}

Try restarting c-lightning afterwards.

legendary
Activity: 1512
Merit: 7340
Farewell, Leo
January 28, 2022, 11:21:57 AM
[...]

I just did. Same errors:

Code: (Electrum client log)
039a7e0982d3b0f967dfc18b8b69c9e8cafd035985eff1832258daf08de119b10e@xixzo67fevmab7wytj5qp7mowvbildpbr7xgaj4hp5dbqgr36termcyd.onion:19735
20220128T162054.871007Z |     INFO | lnpeer.Peer.[LNWallet, xixzo67fevmab7wytj5qp7mowvbildpbr7xgaj4hp5dbqgr36termcyd.onion:19735] | Disconnecting: SOCKSFailure('connection refused')
legendary
Activity: 1876
Merit: 3139
January 28, 2022, 11:11:03 AM
@BlackHatCoiner, I see that n0nce's guide includes some instructions on editing the /etc/tor/torrc file, but it appears to me that something is missing.

Try adding the following lines of code to your torrc file.

Code: (https://lightning.readthedocs.io/TOR.html)
ControlPort 9051
CookieAuthentication 1
CookieAuthFileGroupReadable 1

Also, you need to double-check your c-lightning config.

Code: (https://lightning.readthedocs.io/TOR.html)
proxy=127.0.0.1:9050
bind-addr=127.0.0.1:19735
addr=statictor:127.0.0.1:9051
always-use-proxy=true

Don't forget to restart Tor (systemctl restart tor) and c-lightning after making changes.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
January 28, 2022, 10:17:36 AM
I will add the still missing section about RTL install and configuration later, then it won't take a day to get it running, I promise!
Thank you!  Smiley

Is the port correct (matching configuration - in my guide and own config I used 9735) and have you rebooted after changing configuration? Sometimes it's easiest to reboot because it restarts all the services kind of in oder.
The port is supposed to be 19735 as that's the testnet port number. I haven't followed your guide in a detailly way; for instance I don't have openSUSE. I have just C-Lightning installed.

I don't understand how will reboot help, but once I do it I'll let you know.
hero member
Activity: 924
Merit: 5950
not your keys, not your coins!
January 28, 2022, 09:55:27 AM
But now I seem to understand Electrum shall act as a front-end for C-Lightning? Can it do this?
It allows you to open channels with nodes so I acted as obviously as I could. I wanted to test if my node works just like others, but it doesn't. I've thought of installing RTL, but it's a hustle and I don't find the time to devote one whole day for the Lightning Network.  Sad
I will add the still missing section about RTL install and configuration later, then it won't take a day to get it running, I promise!
However, it sounds like it should be possible with Electrum, as well. Probably a misconfiguration.

C-Lightning is running. The full URI is shown in 1ml.com so it is advertised properly. However, when I try to establish a connection from the Electrum client (again), I get the same CancelledError().

Log:
Code:
20220128T092225.634863Z |     INFO | lnworker.LNWallet.[themaintestnetwallet] | adding peer 039a7e0982d3b0f967dfc18b8b69c9e8cafd035985eff1832258daf08de119b10e@xixzo67fevmab7wytj5qp7mowvbildpbr7xgaj4hp5dbqgr36termcyd.onion:19735
20220128T092231.541283Z |     INFO | network | fee_histogram [[1.0, 18965]]
20220128T092231.677023Z |     INFO | lnpeer.Peer.[LNWallet, xixzo67fevmab7wytj5qp7mowvbildpbr7xgaj4hp5dbqgr36termcyd.onion:19735] | Disconnecting: SOCKSFailure('connection refused')

Why is it refusing to connect...
Is the port correct (matching configuration - in my guide and own config I used 9735) and have you rebooted after changing configuration? Sometimes it's easiest to reboot because it restarts all the services kind of in oder.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
January 28, 2022, 04:24:49 AM
Yes, I think I had forgotten to include something in the Tor configuration file. Now that I reread n0nce's C-Lightning installation guide I believe it should be working fine. (Although I have a problem with the service, but I'll make a post there as it's off-topic)

C-Lightning is running. The full URI is shown in 1ml.com so it is advertised properly. However, when I try to establish a connection from the Electrum client (again), I get the same CancelledError().

Log:
Code:
20220128T092225.634863Z |     INFO | lnworker.LNWallet.[themaintestnetwallet] | adding peer 039a7e0982d3b0f967dfc18b8b69c9e8cafd035985eff1832258daf08de119b10e@xixzo67fevmab7wytj5qp7mowvbildpbr7xgaj4hp5dbqgr36termcyd.onion:19735
20220128T092231.541283Z |     INFO | network | fee_histogram [[1.0, 18965]]
20220128T092231.677023Z |     INFO | lnpeer.Peer.[LNWallet, xixzo67fevmab7wytj5qp7mowvbildpbr7xgaj4hp5dbqgr36termcyd.onion:19735] | Disconnecting: SOCKSFailure('connection refused')

Why is it refusing to connect...
legendary
Activity: 1876
Merit: 3139
January 27, 2022, 06:10:56 AM
I tried opening a channel to your node through Electrum and I got the same error, but I also enabled logs:

Code:
INFO | lnworker.LNWallet.[default_wallet] | adding peer 039a7e0982d3b0f967dfc18b8b69c9e8cafd035985eff1832258daf08de119b10e@pn4dvsmjxpkemwsuhocrytdpfgrqjzbd6zagasyrg4msce63sldxtlqd.onion:9735
INFO | lnpeer.Peer.[LNWallet, pn4dvsmjxpkemwsuhocrytdpfgrqjzbd6zagasyrg4msce63sldxtlqd.onion:9735] | Disconnecting: SOCKSFailure('unknown SOCKS5 error code: 240')

I looked up your node on 1ml.com and for some reason your onion address is not listed there, which means that it is not advertised properly. There might be something wrong with your Tor setup.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
January 27, 2022, 05:37:13 AM
But now I seem to understand Electrum shall act as a front-end for C-Lightning? Can it do this?
It allows you to open channels with nodes so I acted as obviously as I could. I wanted to test if my node works just like others, but it doesn't. I've thought of installing RTL, but it's a hustle and I don't find the time to devote one whole day for the Lightning Network.  Sad
hero member
Activity: 924
Merit: 5950
not your keys, not your coins!
January 27, 2022, 05:26:07 AM
Side question: why are you trying to use Electrum for Lightning all the time? Why not whip up a second C-Lightning or lnd node?
I don't know, I just like the easiness of Electrum. Do you recommend me to run another C-Lightning node on my main computer and make those communicate? What would be the benefits?
Well if you have two nodes that you both control, you can play around with channels, fees and transactions more easily. I thought that's what you were trying to do with the C-Lightning + Electrum thing.
But now I seem to understand Electrum shall act as a front-end for C-Lightning? Can it do this?
I haven't done that so far; instead I either use CLI or RTL web interface.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
January 27, 2022, 05:12:10 AM
I couldn't connect to your node using only the pub key! Can you provide your node URI?
Sorry for not responding! This must be it:
Code:
039a7e0982d3b0f967dfc18b8b69c9e8cafd035985eff1832258daf08de119b10e@pn4dvsmjxpkemwsuhocrytdpfgrqjzbd6zagasyrg4msce63sldxtlqd.onion:9735

Do you already have a channel from your C-Lightning node to your Electrum node?
You mean from my Electrum client? No, because I can't establish a connection. Both my Electrum node and C-Lightning node run on the same computer. (RPi 4)

Side question: why are you trying to use Electrum for Lightning all the time? Why not whip up a second C-Lightning or lnd node?
I don't know, I just like the easiness of Electrum. Do you recommend me to run another C-Lightning node on my main computer and make those communicate? What would be the benefits?
Pages:
Jump to: