Bitcoin Forum
April 23, 2024, 06:41:16 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What the hell is a/the Lightning Network?  (Read 1013 times)
huskypower2015 (OP)
Member
**
Offline Offline

Activity: 94
Merit: 12


View Profile
April 29, 2017, 09:53:42 PM
Merited by ABCbits (2)
 #1

I recently read a whitepaper on what seems to describe an implementation of Lightning Network on top of the Bitcoin Blockchain.

https://lightning.network/lightning-network-paper.pdf

Going over the technical details and descriptions of LN, there are many things that I do not get:

1.) What exactly does the LN transx accomplish that a general transx fails to do?
2.) ELI5 the mechanics of LN and the transx that occur. How is the transaction validated onto the blockchain after coins are moved?
3.) What are channels? How does one "open/close" one? Can you create one?
4.) What incentives are there for miners/nodes on the network?
5.) Is there simply a single LN, or can there be several networks running concurrently alongside the blockchain?
6.) What is the bridge between LN and applications running alongside the blockchain?
Remember that Bitcoin is still beta software. Don't put all of your money into BTC!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3374
Merit: 6530


Just writing some code


View Profile WWW
April 29, 2017, 10:17:13 PM
Merited by ABCbits (3)
 #2

1.) What exactly does the LN transx accomplish that a general transx fails to do?
LN allows two parties to transact between each other without having to make an on chain (and thus costly due to fees) transactions for each transaction that they want to perform. If two people were to make 5 transactions on an LN channel, instead of paying 5 transactions worth of transaction fees, they would only need to pay 2 transactions of transaction fees (opening and closing transaction).

2.) ELI5 the mechanics of LN and the transx that occur.
Two people decide to make a LN payment channel. They make a transaction that sends Bitcoin to a 2-of-2 multisig address. Then they make another transaction which spends from the multisig address and sends Bitcoin to their own addresses. This second transaction is not broadcast. When one person in that channel pays the other person, they remake the second transaction and change the amount that their address will receive. Again, this transaction is not broadcast. They repeat that step as long as they want. When both people decide they no longer want to continue transacting with each other, the last transaction that they had created will be broadcast to the network and they will receive the Bitcoin back to their addresses to be used elsewhere.

How is the transaction validated onto the blockchain after coins are moved?
LN transactions don't touch the blockchain until the channel is closed.

3.) What are channels? How does one "open/close" one? Can you create one?
Channels are opened by both people in the channel sending some amount of Bitcoin to a 2-of-2 multisig address. Channels are closed by broadcasting a transaction which spends from the multisig address and sends some agreed upon amount of Bitcoin back to the addresses of the people in the channel. If any payments over the channel had occurred, then when the channel is closed, both people will likely have a different amount of Bitcoin coming out of the channel than they had put into the channel.

4.) What incentives are there for miners/nodes on the network?
Miners and nodes are not directly involved in LN. However there can be LN nodes, i.e. people who have lots of channels open with other people so payments can be routed through him.

5.) Is there simply a single LN, or can there be several networks running concurrently alongside the blockchain?
LN is one specification of a payment channel network. There can be others as well, and you can have LN payment channels without actually being connected to any other channel in "the network".

6.) What is the bridge between LN and applications running alongside the blockchain?
LN transactions are still Bitcoin transactions.

-ck
Legendary
*
Offline Offline

Activity: 4088
Merit: 1630


Ruu \o/


View Profile WWW
April 29, 2017, 10:28:37 PM
Merited by ABCbits (1)
 #3

4.) What incentives are there for miners/nodes on the network?
Miners and nodes are not directly involved in LN. However there can be LN nodes, i.e. people who have lots of channels open with other people so payments can be routed through him.
Except for mining the opening and closing transactions which is still done by miners and broadcast as regular transactions by nodes.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
huskypower2015 (OP)
Member
**
Offline Offline

Activity: 94
Merit: 12


View Profile
April 29, 2017, 10:53:17 PM
 #4


LN allows two parties to transact between each other without having to make an on chain (and thus costly due to fees) transactions for each transaction that they want to perform. If two people were to make 5 transactions on an LN channel, instead of paying 5 transactions worth of transaction fees, they would only need to pay 2 transactions of transaction fees (opening and closing transaction).


Two people decide to make a LN payment channel. They make a transaction that sends Bitcoin to a 2-of-2 multisig address. Then they make another transaction which spends from the multisig address and sends Bitcoin to their own addresses. This second transaction is not broadcast. When one person in that channel pays the other person, they remake the second transaction and change the amount that their address will receive. Again, this transaction is not broadcast. They repeat that step as long as they want. When both people decide they no longer want to continue transacting with each other, the last transaction that they had created will be broadcast to the network and they will receive the Bitcoin back to their addresses to be used elsewhere.


LN transactions don't touch the blockchain until the channel is closed.


Channels are opened by both people in the channel sending some amount of Bitcoin to a 2-of-2 multisig address. Channels are closed by broadcasting a transaction which spends from the multisig address and sends some agreed upon amount of Bitcoin back to the addresses of the people in the channel. If any payments over the channel had occurred, then when the channel is closed, both people will likely have a different amount of Bitcoin coming out of the channel than they had put into the channel.


Miners and nodes are not directly involved in LN. However there can be LN nodes, i.e. people who have lots of channels open with other people so payments can be routed through him.


LN is one specification of a payment channel network. There can be others as well, and you can have LN payment channels without actually being connected to any other channel in "the network".


LN transactions are still Bitcoin transactions.

Makes sense. More straightforward than I would have guessed. It is basically a blockchain tranx that enables 0 time exchange of coins that both parties signed off on instead of the network signing off on the transx.

Is there any interest in applications that have LN enabled that parties can make an agreement based on set conditions lined out? Similar to smart contracts on ETH, but instead of the blockchain enforcing the contract, the LN regulates the conditions. When both parties sign the contract(actually sign each condition met,) then coins are exchanged. Correct?

What about "multi-party" transactions. Say I want to send 1 BTC to Alice, Bob, and Charlie. 0.4 to Alice, 0.5 to Bob, and 0.1 to Charlie. The current implementation does not allow this does it? Could this be alleviate with multiple keys signing off on my transx with a contract? Of course, if one of the third-parties refuses to sign, then the transx cannot commence, unless conditions say otherwise.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3374
Merit: 6530


Just writing some code


View Profile WWW
April 29, 2017, 11:57:33 PM
 #5

Makes sense. More straightforward than I would have guessed. It is basically a blockchain tranx that enables 0 time exchange of coins that both parties signed off on instead of the network signing off on the transx.

Is there any interest in applications that have LN enabled that parties can make an agreement based on set conditions lined out? Similar to smart contracts on ETH, but instead of the blockchain enforcing the contract, the LN regulates the conditions. When both parties sign the contract(actually sign each condition met,) then coins are exchanged. Correct?
I don't think LN will facilitate smart contracts like that. The limitations of that are due to transaction scripts since LN is really just a different way to make Bitcoin transactions.

What about "multi-party" transactions. Say I want to send 1 BTC to Alice, Bob, and Charlie. 0.4 to Alice, 0.5 to Bob, and 0.1 to Charlie. The current implementation does not allow this does it? Could this be alleviate with multiple keys signing off on my transx with a contract? Of course, if one of the third-parties refuses to sign, then the transx cannot commence, unless conditions say otherwise.
It is possible to have more than 2 parties in a payment channel, but it can get very messy very quickly due to the number of possible outcomes that could happen. The current lightning spec does not allow for more than 2 parties in a channel.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!