Bitcoin Forum
May 21, 2019, 05:59:12 AM *
News: Latest Bitcoin Core release: 0.18.0 [Torrent] (New!)
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: A few questions about using LND and Lightning in general  (Read 285 times)
Zand_
Member
**
Offline Offline

Activity: 112
Merit: 15


View Profile
October 18, 2018, 06:06:48 PM
Last edit: October 30, 2018, 05:35:14 PM by Zand_
Merited by dbshck (2), DarkStar_ (2)
 #1

I recently configured my first Lightning node (Bitcoin Full Node + Lightning Node) on a Raspiberry Pi using LND. I learned a lot in the process and feel I have a pretty good understanding of how Lightning works. With that being said, there are still a few things I'd like to get clarification on.

________________________________________________

1) When using LND and funding a new channel, is there a way to see what fees you're paying to have that channel opened? Conversely, is there a way to check what fees are paid to close the channel?

2) When your channel is being used to route payments, how do the fees get paid out to the channel owners? Do the fees go to your LND wallet or get added to your channel balance?

3) I noticed you can customize your alias and color (ex. #68f442). What purpose does the color serve?

4) How are funds allocated with Autopilot when you add new funds into your LND wallet? Are the channels created/funding amounts totally random?

5) How do I send funds from my LND wallet to my main BTC address? What command do I need to use? Do I have any control over choosing the fee?

6) What's the purpose of connecting to peers with "lncli connect NODEADDRESS" if you don't have a channel open with them?

7) Any good visualizers you'd recommend where I can see my node? The one on 1ML is a bit confusing to navigate.

8 ) How often does 1ML update node info? Is there a way to force an update? My node was last updated 11 hours ago but I noticed other nodes have been updated more recently


9) How long does it take to retrieve funds after "force closing" a channel? Two of the nodes I had channels open with were offline so I had to force close, it's been about 24 hours and the balance is still in limbo



________________________________________________

That's all I have for now, I'll be sure to update this thread if anything else comes to mind. Thanks in advance!
1558418352
Hero Member
*
Offline Offline

Posts: 1558418352

View Profile Personal Message (Offline)

Ignore
1558418352
Reply with quote  #2

1558418352
Report to moderator
1558418352
Hero Member
*
Offline Offline

Posts: 1558418352

View Profile Personal Message (Offline)

Ignore
1558418352
Reply with quote  #2

1558418352
Report to moderator
1558418352
Hero Member
*
Offline Offline

Posts: 1558418352

View Profile Personal Message (Offline)

Ignore
1558418352
Reply with quote  #2

1558418352
Report to moderator
"Your bitcoin is secured in a way that is physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter a majority of miners, no matter what." -- gmaxwell
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1558418352
Hero Member
*
Offline Offline

Posts: 1558418352

View Profile Personal Message (Offline)

Ignore
1558418352
Reply with quote  #2

1558418352
Report to moderator
1558418352
Hero Member
*
Offline Offline

Posts: 1558418352

View Profile Personal Message (Offline)

Ignore
1558418352
Reply with quote  #2

1558418352
Report to moderator
1558418352
Hero Member
*
Offline Offline

Posts: 1558418352

View Profile Personal Message (Offline)

Ignore
1558418352
Reply with quote  #2

1558418352
Report to moderator
BitCryptex
Hero Member
*****
Offline Offline

Activity: 574
Merit: 718


Write @BitCryptex or quote my post to notify me


View Profile WWW
October 18, 2018, 07:18:22 PM
Last edit: October 18, 2018, 08:32:54 PM by BitCryptex
Merited by DarkStar_ (4), dbshck (3), Heisenberg_Hunter (1)
 #2

1) When using LND and funding a new channel, is there a way to see what fees you're paying to have that channel opened? Conversely, is there a way to check what fees are paid to close the channel?

Yes, it is possible. There is an optional parameter which allows you to change the fee rate. It should also work for closing channels. Check out this page if you don't know what value is optimal.

Code:
lncli openchannel [REQUIRED_PARAMETERS] --sat_per_byte [VALUE]

2) When your channel is being used to route payments, how do the fees get paid out to the channel owners? Do the fees go to your LND wallet or get added to your channel balance?

Every single satoshi earned from payment routing is added to the balance of your channel.

3) I noticed you can customize your alias and color (ex. #68f442). What purpose does the color serve?

As far as I know, colors are used only by Lightning Network visualisers. Not important.

4) How are funds allocated with Autopilot when you add new funds into your LND wallet? Are the channels created/funding amounts totally random?

Autopilot is not enabled by default and needs to be configured in order to work. Search here for "autopilot" and you will see that you can adjust how much of your available funds can be used for opening new channels automatically. The purpose of autopilot is to open channels which will generate profit from payment routing.

5) How do I send funds from my LND wallet to my main BTC address? What command do I need to use? Do I have any control over choosing the fee?

You can send an on-chain transaction using the following command. --sat_per_byte parameter can be also used.

Code:
lncli sendcoins [address] [amount in satoshis]

Zand_
Member
**
Offline Offline

Activity: 112
Merit: 15


View Profile
October 18, 2018, 08:26:18 PM
 #3

1) When using LND and funding a new channel, is there a way to see what fees you're paying to have that channel opened? Conversely, is there a way to check what fees are paid to close the channel?

Yes, it is possible. There is an optional parameter which allows you to change the fee rate. It should also work for closing channels. Check out this page if you don't know what value is optimal.

Code:
lncli openchannel [REQUIRED_PARAMETERS] --sat_per_byte [VALUE]

2) When your channel is being used to route payments, how do the fees get paid out to the channel owners? Do the fees go to your LND wallet or get added to your channel balance?

Every single satoshi earned from payment routing is added to the balance of your channel.

3) I noticed you can customize your alias and color (ex. #68f442). What purpose does the color serve?

As far as I know, colors are used only by Lightning Network visualisers. Not important.

4) How are funds allocated with Autopilot when you add new funds into your LND wallet? Are the channels created/funding amounts totally random?

Autopilot is not enabled by default and needs to be configured in order to work. Search here for "autopilot" and you will see that you can adjust how much of your available funds can be used for opening new channels automatically. The purpose of autopilot is to open channels which will generate profit from payment routing.

5) How do I send funds from my LND wallet to my main BTC address? What command do I need to use? Do I have any control over choosing the fee?

You can send an on-chain transaction using the following command. --sat_per_byte parameter can be also used.

Code:
lncli sendcoins [address] [amount in satoshis]

Awesome thank you as always! I believe my Autopilot was enabled by default, any idea on how to disable it? Should I comment it out or set it =0?
BitCryptex
Hero Member
*****
Offline Offline

Activity: 574
Merit: 718


Write @BitCryptex or quote my post to notify me


View Profile WWW
October 18, 2018, 08:37:02 PM
 #4

Awesome thank you as always! I believe my Autopilot was enabled by default, any idea on how to disable it? Should I comment it out or set it =0?

I would recommend you setting the autopilot.active to zero. This will ensure that it is turned off completely. By the way, don't confuse satoshi per byte with the transaction fee. Setting --sat_per_byte to 1 [sat/byte] or 3 [sat/byte] should be enough nowadays.

Zand_
Member
**
Offline Offline

Activity: 112
Merit: 15


View Profile
October 19, 2018, 05:39:35 PM
 #5

Awesome thank you as always! I believe my Autopilot was enabled by default, any idea on how to disable it? Should I comment it out or set it =0?

I would recommend you setting the autopilot.active to zero. This will ensure that it is turned off completely. By the way, don't confuse satoshi per byte with the transaction fee. Setting --sat_per_byte to 1 [sat/byte] or 3 [sat/byte] should be enough nowadays.

I did what you recommended and set it to zero but the autopilot still went info effect. Although now that I think about it, it could be due to the fact that I updated the lnd.conf file after sending new funds to my wallet. There were no block confirmations by the time I set it to zero, but maybe they still showed up as an unconfirmed balance. I'll have to play around with it some more. One strange thing I noticed was the amount of funds it allocated. The autopilot.allocation is set to 0.6 by default, which means 60% of total funds available should be used to setup channel. However, in my case it only allocated 50% of the total BTC that I deposited. If I want to allocate the remaining funds into new channels with autopilot, would I just set the autopilot.allocation to 1? Then save and reset LND.
BitCryptex
Hero Member
*****
Offline Offline

Activity: 574
Merit: 718


Write @BitCryptex or quote my post to notify me


View Profile WWW
October 19, 2018, 06:35:36 PM
 #6

If I want to allocate the remaining funds into new channels with autopilot, would I just set the autopilot.allocation to 1? Then save and reset LND.

Yes, don't forget to increase the maximum amount of channels that can be created by the autopilot (autopilot.maxchannels). You can also set it to zero to avoid further problems. Autopilot opens channels accordingly to the potential profit. It doesn't have to use all of the allocated funds. That's why it used only 50% instead of 60% of your wallet funds.

Zand_
Member
**
Offline Offline

Activity: 112
Merit: 15


View Profile
October 21, 2018, 03:37:55 PM
Last edit: October 21, 2018, 06:42:38 PM by Zand_
 #7

If I want to allocate the remaining funds into new channels with autopilot, would I just set the autopilot.allocation to 1? Then save and reset LND.

Yes, don't forget to increase the maximum amount of channels that can be created by the autopilot (autopilot.maxchannels). You can also set it to zero to avoid further problems. Autopilot opens channels accordingly to the potential profit. It doesn't have to use all of the allocated funds. That's why it used only 50% instead of 60% of your wallet funds.

Thanks!

A couple more questions.

1) What's the purpose of connecting to peers with "lncli connect NODEADDRESS" if you don't have a channel open with them?

2) Any good visualizers you'd recommend where I can see my node? The one on 1ML is a bit confusing to navigate.

3) My autopilot by default created 6 of my 9 channels, 4 of those 6 channels are max size (.1677 BTC). Is it generally more profitable to have fewer large size channels over multiple smaller ones?

4) What are the current vulnerabilities of the LN? Have any nodes/channels ever been compromised on mainnet?
BitCryptex
Hero Member
*****
Offline Offline

Activity: 574
Merit: 718


Write @BitCryptex or quote my post to notify me


View Profile WWW
October 21, 2018, 07:52:52 PM
Merited by dbshck (2), HeRetiK (1)
 #8

1) What's the purpose of connecting to peers with "lncli connect NODEADDRESS" if you don't have a channel open with them?

Using lncli connect is required so that both nodes could be aware of each other's existence. There is no central server to which any node could connect and request information about the other one. You won't be able to open a channel if there is no connection between these two nodes.

2) Any good visualizers you'd recommend where I can see my node? The one on 1ML is a bit confusing to navigate.

Due to a large number of nodes it might be difficult to browse some of the Lightning Network visualisers. If I were you, I would try using this one.

3) My autopilot by default created 6 of my 9 channels, 4 of those 6 channels are max size (.1677 BTC). Is it generally more profitable to have fewer large size channels over multiple smaller ones?

Autopilot opens channels to nodes from which payments might be often routed. The higher payment you route, the more you earn from it. Opening many small channels would cost you more and you might be forced to close your channel earlier in order to rebalance it. Don't forget that your fee policy is very important.

4) What are the current vulnerabilities of the LN? Have any nodes/channels ever been compromised on mainnet?

I have already covered this topic in my thread with the most common questions regarding the Lightning Network. The biggest problem we have faced so far was when someone closed 50% of the available channels at the same time. Some payments started to fail but most of the network was working just fine.

Zand_
Member
**
Offline Offline

Activity: 112
Merit: 15


View Profile
October 22, 2018, 12:35:49 AM
Last edit: October 22, 2018, 04:13:37 PM by Zand_
 #9

1) What's the purpose of connecting to peers with "lncli connect NODEADDRESS" if you don't have a channel open with them?

Using lncli connect is required so that both nodes could be aware of each other's existence. There is no central server to which any node could connect and request information about the other one. You won't be able to open a channel if there is no connection between these two nodes.

2) Any good visualizers you'd recommend where I can see my node? The one on 1ML is a bit confusing to navigate.

Due to a large number of nodes it might be difficult to browse some of the Lightning Network visualisers. If I were you, I would try using this one.

3) My autopilot by default created 6 of my 9 channels, 4 of those 6 channels are max size (.1677 BTC). Is it generally more profitable to have fewer large size channels over multiple smaller ones?

Autopilot opens channels to nodes from which payments might be often routed. The higher payment you route, the more you earn from it. Opening many small channels would cost you more and you might be forced to close your channel earlier in order to rebalance it. Don't forget that your fee policy is very important.

4) What are the current vulnerabilities of the LN? Have any nodes/channels ever been compromised on mainnet?

I have already covered this topic in my thread with the most common questions regarding the Lightning Network. The biggest problem we have faced so far was when someone closed 50% of the available channels at the same time. Some payments started to fail but most of the network was working just fine.

Great thanks I'll have to check out your thread. Do you mind expanding on fee policy? What is it set at by default and how do I change it? So far I haven't made a single satoshi

Also, I checked out that visualizer. Very cool and I can find my node but only displays 2 of 9 channels, guessing it's a bit behind. One thing I noticed is the ridiculous number of nodes in Greenland. Any idea why or is it a glitch?
BitCryptex
Hero Member
*****
Offline Offline

Activity: 574
Merit: 718


Write @BitCryptex or quote my post to notify me


View Profile WWW
October 22, 2018, 07:09:19 PM
 #10

Great thanks I'll have to check out your thread. Do you mind expanding on fee policy? What is it set at by default and how do I change it? So far I haven't made a single satoshi

It will take some time before you start earning money on routing payments. User d5000 described how he had managed to increase his earnings in a few posts in the Lightning Network discussion thread. Add the following two variables to your config.

Code:
bitcoin.basefee=1000
bitcoin.feerate=0.00001

The total fee charged is basefee + (amount * feerate / 1000000), where amount is the forwarded amount. If you set both of these values too high, you won't route any payments. If you set them too low, you will later lose money on rebalancing your channel which requires you to reopen it. You don't have to restart your node every time you change your config. Use the following command to make temporary changes.

lncli updatechanpolicy --base_fee_msat VALUE --fee_rate VALUE

Zand_
Member
**
Offline Offline

Activity: 112
Merit: 15


View Profile
October 23, 2018, 03:16:47 PM
 #11

Great thanks I'll have to check out your thread. Do you mind expanding on fee policy? What is it set at by default and how do I change it? So far I haven't made a single satoshi

It will take some time before you start earning money on routing payments. User d5000 described how he had managed to increase his earnings in a few posts in the Lightning Network discussion thread. Add the following two variables to your config.

Code:
bitcoin.basefee=1000
bitcoin.feerate=0.00001

The total fee charged is basefee + (amount * feerate / 1000000), where amount is the forwarded amount. If you set both of these values too high, you won't route any payments. If you set them too low, you will later lose money on rebalancing your channel which requires you to reopen it. You don't have to restart your node every time you change your config. Use the following command to make temporary changes.

lncli updatechanpolicy --base_fee_msat VALUE --fee_rate VALUE

Ok thanks, it looks like all my channels were created with the default rate (base fee of 1 and fee rate 0.000001). I tried adding your code into my lnd.config file but my node stopped working afterwards so I had to remove it. I'm assuming there's no way to change my channels fee rate without reopening them?

Also have a question about a mysterious channel that was recently closed. I tried cross referencing the channel between my node and 1ML and can't seem to find it. Below is a screenshot of my closed channels and then a link to my node on 1ML



https://1ml.com/node/0230101e66a8df1b33c2df3c0c47ec8ce518f42a7ccf798c5f5ce9432b7f17a40b

As you can see, my node hasn't updated in 12 hours (not sure how to manually update) but you can still see the first 3 closed channels match up with the 3 on 1ML. The fourth one hasn't updated on 1ML but I don't see that channel under active either. Also it's the only one of my closed channels that has a "0" settled balance. Any ideas?

BitCryptex
Hero Member
*****
Offline Offline

Activity: 574
Merit: 718


Write @BitCryptex or quote my post to notify me


View Profile WWW
October 23, 2018, 05:34:48 PM
 #12

I tried adding your code into my lnd.config file but my node stopped working afterwards so I had to remove it. I'm assuming there's no way to change my channels fee rate without reopening them?

Make sure that these two variables aren't already in the config file. You don't have to reopen your channels to change their fee policy. Use the command which I posted above.

lncli updatechanpolicy --base_fee_msat VALUE --fee_rate VALUE

I have no idea about the fourth channel on your list. Could you try looking up the closing txid in any block explorer? I guess that nothing will appear since settled_balance equals zero.

Zand_
Member
**
Offline Offline

Activity: 112
Merit: 15


View Profile
October 30, 2018, 05:36:07 PM
 #13

Any idea on how long it takes to retrieve funds after "force closing" a channel? Two of the nodes I had channels open with were offline so I had to force close, it's been about 24 hours and the balance is still in limbo

Closing TXID below, each TX has over 80+ confirmations

https://blockexplorer.com/tx/6a4d6b6a6765a412d706597a6f08c7191bc272b3f212c18dd0ffc99314143074

https://blockexplorer.com/tx/ddcb697642fbcce20330939df31d2e3302d2f8d4923d1fe11bac65792587f946
BitCryptex
Hero Member
*****
Offline Offline

Activity: 574
Merit: 718


Write @BitCryptex or quote my post to notify me


View Profile WWW
October 30, 2018, 07:55:25 PM
Last edit: October 30, 2018, 09:31:40 PM by BitCryptex
 #14

Any idea on how long it takes to retrieve funds after "force closing" a channel? Two of the nodes I had channels open with were offline so I had to force close, it's been about 24 hours and the balance is still in limbo

It depends on the timelock which is always negotiated while opening a channel, usually it's 144 blocks (~1 day). Your case is a bit weird. Can you show me the output of lncli listchannels? It might show some information about these channels (I doubt it since the transaction has been already confirmed). Have you tried restarting your node?

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!