Author

Topic: Question about lightning network. (Read 142 times)

hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
January 02, 2023, 12:52:23 PM
#7
~Snipped~
Wow now I get it. The number of intermediary node does matter only the opening and the closing transactions are broadcasted to the Blockchain even if I make up to a hundred transactions during the time the channel was still open those transactions wouldn't be broadcasted as long as long as the channel remains open.
Thanks for the explanation.
Exactly; you need to open a channel once, can transact as often and as many times as you want on it and close it some time in the future, settling the final balance on the blockchain. Between opening and closing transactions, nothing happens on the blockchain. That's why it's considered an L2 / off-chain protocol.

The 'number of intermediary nodes' only affects routing fees (which are pretty low though, anyway). Only real problem to consider is that sometimes you may find no route to the destination, no matter how many intermediary nodes are tried. You can counteract that by having multiple open channels, keeping them balanced and wisely choosing your channel partners.



We have a Lightning Network FAQ and Lightning Network node experience thread, as well as full node installation guides like here:
[Guide] FULL NODE OpenSUSE 15.3: bitcoind + electrs + c-lightning + RTL
newbie
Activity: 13
Merit: 8
January 01, 2023, 02:32:44 PM
#6
~Snipped~

Wow now I get it. The number of intermediary node does matter only the opening and the closing transactions are broadcasted to the Blockchain even if I make up to a hundred transactions during the time the channel was still open those transactions wouldn't be broadcasted as long as long as the channel remains open.
Thanks for the explanation.

copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
January 01, 2023, 02:28:04 PM
#5
Channels remain open until they're closed by the nodes they're created between.

While a channel is open it is essentially able to exchange contracts with other node owners to send and receive bitcoin.

When a channel gets closed, both sides operating it know how much money each should have and can close it based off that (if one broadcasts inaccurately, a penalty is charged though iirc).



Since these contract exchanges happen it means two noeds don't need a channel open between them to pay as payments can hop over several channels/servers.

It's possible for some transactions to fail though on the lighting network too if you open a channel with a node that doesn't have enough connections to be able to route your transaction fully - you'll find out within seconds if this is the case thouugh and you'll keep your funds in your channel.
legendary
Activity: 2268
Merit: 18711
January 01, 2023, 02:23:00 PM
#4
Does a transaction get sent to the Blockchain when you use the Lightning Network to send payment to someone you're not directly connected to via an intermediary node? Because, according to what I've read, only the first and last transaction appear in the Blockchain, I'm not sure if those involving an intermediary node will as well.
You are confusing different concepts here.

Lightning transactions are never committed to the blockchain. It does not matter if you pay someone you are directly connected to, or if you pay someone via 20 intermediaries. These transactions do not get broadcast or mined on the main layer.

The "first and last" transactions you have read about are the transactions to open and close your Lightning channel. Let's say you open a channel with me. That opening transaction is broadcast and mined on the blockchain, even though we haven't actually exchanged any coins yet. We can then pay each other back and forth as many times as we like, and if I am connected to other channels too, then you can pay other people using me as an intermediary. None of those payments, either between us or you using me as an intermediary, are broadcast or mined. When one or both of use decides we want to close our channel, then the closing transaction is broadcast, just like the opening transaction was.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
January 01, 2023, 10:31:21 AM
#3
You're making two questions here:

  • Can you pay someone you're not directly connected to, with the assistance of an intermediary node? - You can, with the use of Hashed Time Locked Contract, as long as the intermediary node(s) have sufficient liquidity.
  • How many transactions do you make on-blockchain when you pay someone either directly or with the use of intermediary nodes? - You make one transaction on-chain, wherein you open the channel with a partner, and once you're done with it (i.e., you don't want to leave funds to lightning anymore) you make another transaction for closing the channel. So, for one channel, there will be 2 transactions on-chain, regardless of how many you two accomplish off-chain.
hero member
Activity: 1050
Merit: 681
January 01, 2023, 07:36:11 AM
#2
Does a transaction get sent to the Blockchain when you use the Lightning Network to send payment to someone you're not directly connected to via an intermediary node?
Yes, an intermediary node is involved in lightning network. An intermediate node knows the previous hop's identity and the identity of the next hop as well as the forwarded amount, the hash-lock, and the timeout value.
Businesses that invest in Lightning Network nodes may become hubs or centralized nodes in the network by having more open connections with others.

Read more here: 1. Investopedia
2. Lightning network privacy
newbie
Activity: 13
Merit: 8
January 01, 2023, 06:35:19 AM
#1
I'm new to Bitcoin and crypto in general, and I've been doing some reading to get a better understanding of how it works. and I came across "Lightning Network" and I like it, but I have some questions about some things I'm not sure about.

Does a transaction get sent to the Blockchain when you use the Lightning Network to send payment to someone you're not directly connected to via an intermediary node? Because, according to what I've read, only the first and last transaction appear in the Blockchain, I'm not sure if those involving an intermediary node will as well.
Jump to: