Bitcoin Forum
October 21, 2018, 08:26:19 PM *
News: Make sure you are not using versions of Bitcoin Core other than 0.17.0 [Torrent], 0.16.3, 0.15.2, or 0.14.3. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 »  All
  Print  
Author Topic: Basics of the Lightning Network - explanation and wallets  (Read 368 times)
BitCryptex
Sr. Member
****
Online Online

Activity: 364
Merit: 298



View Profile WWW
August 22, 2018, 07:43:13 PM
Merited by ebliever (5), Carlton Banks (3), Welsh (3), Anon136 (2), ETFbitcoin (2), LoyceV (2), bob123 (2), DdmrDdmr (2), aplistir (2), d5000 (1), mocacinno (1), harizen (1), buwaytress (1), wilwxk (1), Heisenberg_Hunter (1), vphasitha01 (1), btj (1)
 #1

Introduction

This thread contains some more detailed information that has been already mentioned in the set of questions answered by me. Below you will see an explanation of the Lightning Network basics. We had many discussions on bitcointalk whether or not it is a good scaling solutions. Here are the most popular threads: Is the Lightning Network centralized?, Lightning Network Discussion Thread, Lightning Network fraud possible?

Table of contents

      1. What is the Lightning Network?
      2. How does it work?
      3. Wallets and nodes
      4. Known problems
      5. Planned features
      6. Security risks
      7. Other second-layer scaling solutions
      8. Useful sources of information

1. What is the Lightning Network?

The Lightning network is an alternative to the traditional Bitcoin on-chain transactions. It doesn’t replace them completely because on-chain transactions are still needed for closing and opening payment channels. The Lightning Network is a second layer solution and is fully opt-in. Transactions done between Lightning Network participants have no negative impact on the Bitcoin network.

The Lightning Network allows for instant and extremely cheap P2P (micro)payments.

2. How does it work?

Creating a payment channel

What is exactly a payment channel? According to the Bitcoin wiki, payment channel is a class of techniques designed to allow users to make multiple Bitcoin transactions without commiting all of the transactions to the Bitcoin blockchain. A maximum of two transactions will be broadcasted to the blockchain.

To start using the Lightning Network you have to use compatible software. Two people may establish a payment channel by locking up funds in a multi-signature address which needs both signatures to spend from it. This transaction is time locked so that the funds will be automatically dispersed in the event that one of the parties becomes uncooperative. Payment channel can be used as long as both participants remain cooperative.

Sending and routing payments

Both parties transact without broadcasting the current state of their trade to the Blockchain. They both keep the copy of the channel information. Sending payments through the Lightning Network is possible as long as there is at least one connection to the other person and sufficient funds in the channels which route the transaction. Each node is rewarded for routing the payment accordingly to their fee policy.

Secure routing of payments would not be possible without Hashed Timelock Contracts (HTLCs). The example below explains why they are needed.

1. Alice opens a payment channel to Bob, and Bob opens a payment channel to Charlie.
2. Alice wants to buy something from Charlie for 1000 satoshis.
3. Charlie generates a random number and generates its SHA256 hash. Charlie gives that hash to Alice.
4. Alice uses her payment channel to Bob to pay him 1,000 satoshis, but she adds the hash Charlie gave her to the payment along with an extra condition: in order for Bob to claim the payment, he has to provide the data which was used to produce that hash.
5. Bob uses his payment channel to Charlie to pay Charlie 1,000 satoshis, and Bob adds a copy of the same condition that Alice put on the payment she gave Bob.
6. Charlie has the original data that was used to produce the hash (called a pre-image), so Charlie can use it to finalize his payment and fully receive the payment from Bob. By doing so, Charlie necessarily makes the pre-image available to Bob.
7. Bob uses the pre-image to finalize his payment from Alice

Closing the channel

There are two ways of closing payment channels. Cooperative and uncooperative.

The latter method takes more time because the other party is offline. In order to avoid frauds, one have to wait a certain amount of time, which was negotiated while opening the channel, before broadcasting the closing transaction.

3. Wallets and nodes

There are a few Lightning Network implementations and each of them might contain some bugs which may lead to the loss of funds. Most of them require user to run a full Bitcoin node but thanks to neutrino, you can replace it with a light node if you decide to use LND. iOS and Android wallets are easy to use and don’t require much setup but most of them can’t be used for requesting payments.

Each implementation has a different setup process.

Desktop clients


Mobile clients


The above list includes software which is officially available and can be configured for the Bitcoin mainnet usage. Every user running a Lightning Network node takes part in payments routing. The number of routed transactions depends on how well one's node is connected, amount of bitcoins locked up in the channel and the fee policy. There is no point in describing features of these wallets since they are constantly being updated at this state.

4. Known problems

  • offline nodes are considered capable of routing which results in payments not going through in some cases,
  • there is no standard for safe backup. Using an old backup is considered as cheating therefore a penalty transaction is being broadcast,
  • one can’t receive payments and defend from the other party cheat if one’s node is offline,
  • there still might be a problem with full blocks in the future. However, developers are working on solutions which will increase the number of transactions per block e.g. Schnorr signatures.

5. Planned features

  • Watchtowers – it is possible that the second party will attempt to cheat by broadcasting an old state of the payment channel. Normally, this would not be possible since the other node would broadcast a penalty transaction. To prevent frauds, the concept of watchtowers is being developed. Watchtowers will be able to broadcast a penalty transaction if necessary.
  • Atomic swaps - trustless method of exchanging two different cryptocurrencies without the need to use escrow.
  • Multi-path payments - currently, one can send transaction using only one route. In the future, it will be possible to split the transaction among multiple routes in order to decrease the fail rate of transactions which is often caused by the lack of funds across the nodes.
  • Dual-funded channels - two users instead of one will be able to fund a payment channel as originally described in the Lightning Network Paper.
  • Eltoo - eltoo will be an alternative to the current method of settling payments between users. Updating channels is done by building a chain of timelocked transactions. A soft fork is needed to make eltoo available on the Lightning Network (in order to avoid having to broadcast the whole transaction history between users). Here you can find out which opcodes need to be modified.
  • Channel factories - existing Lightning Network channels could be used for creating new channels without broadcasting anything to the rest of the Bitcoin network. Normally, a channel is opened to only one person. In channel factories we have multiple people forming a group. Group members maintain channels between themselves. More interested users = higher savings. If one of the participants is uncooperative, existing channels are not affected - new channels can't be created, though.

6. Security risks

  • Improper timelocks - sufficient time should be given in case of interaction with non-cooperative or malicious channel counterparties.
  • Forced expiration spam - closing many channels at the same time might lead to filling up the whole block completely. If the spam lasts enough time, some timelocked transactions might become valid.
  • Data loss - most of the Lightning Network clients don’t provide reliable method of backup. Using an old copy of the database might be considered as cheating. The other party broadcasts a penalty transaction in that case.
  • Coin theft - most of the Lightning Network nodes work 24/7 and store their coins in hot wallets which makes it easier for an attacker to steal their private keys.
  • Colluding miner attacks - miners have power to decide which transactions they want to include in the block so they can refuse certain transactions selected by an attacker. This attack is very unlikely to happen due to high cost and complexity (all miners would have to cooperate).

7. Other second-layer scaling solutions


8. Useful sources of information

http://lightning.network/docs/ (especially “Bitcoin Lightning Network Paper”)
https://cointelegraph.com/tags/lightning-network
https://lnroute.com/
https://dev.lightning.community/
https://blog.lightning.engineering/
https://en.bitcoin.it/wiki/Lightning_Network
https://bitcoinmagazine.com/articles/future-bitcoin-what-lightning-could-look/

1540153579
Hero Member
*
Offline Offline

Posts: 1540153579

View Profile Personal Message (Offline)

Ignore
1540153579
Reply with quote  #2

1540153579
Report to moderator
1540153579
Hero Member
*
Offline Offline

Posts: 1540153579

View Profile Personal Message (Offline)

Ignore
1540153579
Reply with quote  #2

1540153579
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1540153579
Hero Member
*
Offline Offline

Posts: 1540153579

View Profile Personal Message (Offline)

Ignore
1540153579
Reply with quote  #2

1540153579
Report to moderator
1540153579
Hero Member
*
Offline Offline

Posts: 1540153579

View Profile Personal Message (Offline)

Ignore
1540153579
Reply with quote  #2

1540153579
Report to moderator
1540153579
Hero Member
*
Offline Offline

Posts: 1540153579

View Profile Personal Message (Offline)

Ignore
1540153579
Reply with quote  #2

1540153579
Report to moderator
Anon136
Legendary
*
Offline Offline

Activity: 1624
Merit: 1178



View Profile
August 22, 2018, 08:42:59 PM
Merited by BitCryptex (3)
 #2

This post is a quick proof reading and critique as per the request of OP.


Quote
It has no impact on the Bitcoin network.
Technically I mean if it reduces the total number of on chain transactions this is an impact on the bitcoin network. I understand what you mean but perhaps this sentence could be more clear. Something like "once a lightning channel has been established transactions within said channel do not impact the bitcoin blockchain". Or something like that. Not trying to write it for you, just explaining what I mean.


Quote
To start using the Lightning Network you have to use a compatible software.


Quote
To start using the Lightning Network you have to use a compatible software. Two people establish a payment channel by locking up funds in a multi-signature address which needs both signatures to spend from it. Payment channel can be used as long as both participants agree to cooperate. One can close the channel even if the other participant is offline but it won't happen instantly in that case.
I would change wording and the order a bit here.

To start using the Lightning Network you have to use a compatible software. Two people may establish a payment channel by locking up funds in a multi-signature address which needs both signatures to spend from it. This transaction is time locked so that the funds will be automatically dispersed in the event that one of the parties becomes uncooperative. Payment channel can be used as long as both participants agree to cooperate remain cooperative. One can close the channel even if the other participant is offline but it won't happen instantly in that case.


Great post. Thanks for being a continued asset to the community. +merit

Rep Thread: https://bitcointalk.org/index.php?topic=381041
If one can not confer upon another a right which he does not himself first possess, by what means does the state derive the right to engage in behaviors from which the public is prohibited?
d5000
Legendary
*
Offline Offline

Activity: 1890
Merit: 1225



View Profile
August 23, 2018, 01:16:50 AM
 #3

Thank you for that great post!

It confirmed a doubt I had for a long time but nobody was able to "refute" it: the "forced expiration spam" problem. That weakness has an important consequence: We should never let Lightning "hubs" become too big, otherwise they would become a systemic risk, as they could spam the blockchain for a long time if they're malicious.

I'm currently installing Neutrino+LND to test the "light client" scenario which would make LN available "for the masses", but I ran into some problems. But I won't spam this thread with them - I'll look if I can solve them myself (I'm a total Go noob, so maybe a bit of RTFM is enough Wink ). Perhaps we can start another thread of this "Lightning series": "Lightning Network Experiences"?

ETFbitcoin
Legendary
*
Offline Offline

Activity: 1470
Merit: 1200


Use SegWit and enjoy lower fees


View Profile WWW
August 23, 2018, 06:49:30 AM
 #4

Thanks for neat and well written article, there's few things that i think should be included :
1. Implementation of Schnorr Siganture which reduce transaction size (which have multiple input since LN use 2-of-2 multisig) should be added to "Planned features", even though AFAIK Schnorr Signature should have backward compability.
2. There are few other 2nd layer scaling solution worth mentioned such as Mimblewimble which focus on privacy/fungibility
3. Add https://lnroute.com/ to "Useful sources of information"

███           ▄▄▄                          ███
███           ███    ▄█                    ███
███ ▄▄▄▄▄▄          ▄██▄▄▄▄      ▄▄▄▄▄     ███        ▄██▄    ▄▄▄         ▄▄▄
███████████▄  ███ ▐████████  ██▄███████▄   ███       ██████    ███       ███▀
███▀    ▀███▌ ███   ███      ███▀    ▀███  ███      ████████    ███     ███▀
███      ▐██▌ ███   ███      ███      ███  ███     ██▀    ▀██    ███   ███▀
███      ▐██▌ ███   ███      ███      ███  ███    ███      ███    ███ ███▀
███▄    ▄███▌ ███   ███▄     ███▄    ▄███  ███   ████▄    ▄████    █████▀
███████████▀  ███   ▀██████  ███████████▀  ███  ████████████████    ███▀
▀▀▀ ▀▀▀▀▀▀    ▀▀▀     ▀▀▀▀▀  ███ ▀▀▀▀▀▀    ▀▀▀   ▀▀▀▀▀▀▀▀▀▀▀▀▀▀    ███▀
                             ███       ▄▄▄ ▄   ▄  ▄ ▄▄▄          ▄███▀
                             ███      █    █   █  █ █▄▄▀      █████▀
                             ▀▀▀      ▀▄▄▄ █▄▄ ▀▄▄▀ █▄▄█      ▀▀▀















❱❱
❰❰

buwaytress
Hero Member
*****
Offline Offline

Activity: 770
Merit: 707


I bit, therefore I am


View Profile
August 23, 2018, 08:11:43 AM
 #5

Thanks for this well laid out piece, I'm really going to dig in at some point soon! My burning question is actually about that "Other" second layer you mention: Rootstock. So I apologise if this is completely unrelated, though since I saw you linking to Rootstock...

My first encounter with it was in 2016 I believe, when looking at Bitcoin smart contracts. The interest then, (and still now) was in smart contract use for e-scrow. This is also the use case described by some old articles on Google, but then I can't seem to find a link to an actual code that shows a working example for such a trustless escrow, a service still very much in demand.

I wonder, if during this LN implementation, it would be too difficult to add a second second layer (or 2 parallel layers) to also allow for escrow, or perhaps within LN itself? Or using LN as an escrow method?

Wind_FURY
Hero Member
*****
Offline Offline

Activity: 882
Merit: 678


Crypto-Games.net: Multiple coins, multiple games


View Profile
August 23, 2018, 09:08:52 AM
 #6

Quote
Colluding miner attacks - miners have power to decide which transactions they want to include in the block so they can refuse certain transactions selected by an attacker. This attack is very unlikely to happen due to high cost and complexity (all miners would have to cooperate).

If miners start censoring transactions, then it would be the only time that I will sell all of my Bitcoins. But, it would also be the best time to start calling for a UAHF type POW change.


▄▄▄████████▄▄▄
▄██████████████████▄
▄██████████████████████▄
██████████████████████████
████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
████████████████████████████
██████████████████████████
▀██████████████████████▀
▀██████████████████▀
▀▀▀████████▀▀▀
   ███████
██████████
██████████
██████████
██████████
██████████
██████████
██████████
██████████
██████████
██████████
██████████
███████
BTC  ◉PLAY  ◉XMR  ◉DOGE  ◉BCH  ◉STRAT  ◉ETH  ◉GAS  ◉LTC  ◉DASH  ◉PPC
     ▄▄██████████████▄▄
  ▄██████████████████████▄        █████
▄██████████████████████████▄      █████
████ ▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄ ████     ▄██▀
████ █████ ██████ █████ ████    ▄██▀
████ █████ ██████ █████ ████    ██▀
████ █████ ██████ █████ ████    ██
████ ▀▀▀▀▀ ▀▀▀▀▀▀ ▀▀▀▀▀ ████ ▄██████▄
████████████████████████████ ████████
███████▀            ▀███████ ▀██████▀
█████▀                ▀█████
▀██████████████████████████▀
  ▀▀████████████████████▀▀ 
✔️DICE           
✔️BLACKJACK
✔️PLINKO
✔️VIDEO POKER
✔️ROULETTE     
✔️LOTTO
bob123
Hero Member
*****
Offline Offline

Activity: 714
Merit: 611



View Profile WWW
August 23, 2018, 09:31:11 AM
 #7

If miners start censoring transactions, [...]

Well, it actually depends on how you define censoring.

Miner do choose transactions based on some properties. And the most important one is the fee rate (sat/B) payed.

Since all miner have to agree, there needs to be an incentive for all of them. And all miner do definitely benefit from higher fees.
So most do choose the top X transactions from their list (ordered by fee rate) from transactions from the mempool.

They might not censor transactions from/to specific addresses since an incentive for all miner is missing here, but as far as all of them can profit, they probably always 'favor' transactions based on some properties.

Kprawn
Legendary
*
Offline Offline

Activity: 1638
Merit: 1052


View Profile
August 23, 2018, 03:43:31 PM
 #8

If miners start censoring transactions, [...]

Well, it actually depends on how you define censoring.

Miner do choose transactions based on some properties. And the most important one is the fee rate (sat/B) payed.

Since all miner have to agree, there needs to be an incentive for all of them. And all miner do definitely benefit from higher fees.
So most do choose the top X transactions from their list (ordered by fee rate) from transactions from the mempool.

They might not censor transactions from/to specific addresses since an incentive for all miner is missing here, but as far as all of them can profit, they probably always 'favor' transactions based on some properties.


But at some point of time the tx will be mined by someone not in the group of miners that wants to censor these tx's right?

These tx's might just take a little bit longer, because they have less miners fees, but they will be picked up by some desperate

miner.  Roll Eyes  Some people might even target these "scraps" because it is being discarded by the big boys? 

Signature space for Hire :->
BitCryptex
Sr. Member
****
Online Online

Activity: 364
Merit: 298



View Profile WWW
August 23, 2018, 07:41:30 PM
 #9

I'm currently installing Neutrino+LND to test the "light client" scenario which would make LN available "for the masses", but I ran into some problems. But I won't spam this thread with them - I'll look if I can solve them myself (I'm a total Go noob, so maybe a bit of RTFM is enough Wink ). Perhaps we can start another thread of this "Lightning series": "Lightning Network Experiences"?

That might be a good idea. Feel free to PM me if you need some help.

~snip

Thanks for your suggestions. I haven't mentioned Schnorr signatures because they are not strictly connected with the Lightning Network. Updated.

I wonder, if during this LN implementation, it would be too difficult to add a second second layer (or 2 parallel layers) to also allow for escrow, or perhaps within LN itself? Or using LN as an escrow method?

There won't be any problems with having more than one second layer, especially if they have different features. It is possible to build more layers on top of the Lightning Network. Some think that ordinary people will use them instead of on-chain transactions.

I am going to write a long guide on the Lightning Network wallets once they stop changing so much. Developers are constantly updating their implementations.

Wind_FURY
Hero Member
*****
Offline Offline

Activity: 882
Merit: 678


Crypto-Games.net: Multiple coins, multiple games


View Profile
August 24, 2018, 07:22:33 AM
 #10

If miners start censoring transactions, [...]

Well, it actually depends on how you define censoring.

Miner do choose transactions based on some properties. And the most important one is the fee rate (sat/B) payed.

Since all miner have to agree, there needs to be an incentive for all of them. And all miner do definitely benefit from higher fees.
So most do choose the top X transactions from their list (ordered by fee rate) from transactions from the mempool.

They might not censor transactions from/to specific addresses since an incentive for all miner is missing here, but as far as all of them can profit, they probably always 'favor' transactions based on some properties.


What I am trying to say is real censorship by miner collusion or miner centralization. If that becomes real in the network then it will become nothing but an inefficient and expensive FED 2.0.

But a community-backed UAHF will happen before FED 2.0 happens in my opinion. The miners should be careful.


▄▄▄████████▄▄▄
▄██████████████████▄
▄██████████████████████▄
██████████████████████████
████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
████████████████████████████
██████████████████████████
▀██████████████████████▀
▀██████████████████▀
▀▀▀████████▀▀▀
   ███████
██████████
██████████
██████████
██████████
██████████
██████████
██████████
██████████
██████████
██████████
██████████
███████
BTC  ◉PLAY  ◉XMR  ◉DOGE  ◉BCH  ◉STRAT  ◉ETH  ◉GAS  ◉LTC  ◉DASH  ◉PPC
     ▄▄██████████████▄▄
  ▄██████████████████████▄        █████
▄██████████████████████████▄      █████
████ ▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄ ████     ▄██▀
████ █████ ██████ █████ ████    ▄██▀
████ █████ ██████ █████ ████    ██▀
████ █████ ██████ █████ ████    ██
████ ▀▀▀▀▀ ▀▀▀▀▀▀ ▀▀▀▀▀ ████ ▄██████▄
████████████████████████████ ████████
███████▀            ▀███████ ▀██████▀
█████▀                ▀█████
▀██████████████████████████▀
  ▀▀████████████████████▀▀ 
✔️DICE           
✔️BLACKJACK
✔️PLINKO
✔️VIDEO POKER
✔️ROULETTE     
✔️LOTTO
bob123
Hero Member
*****
Offline Offline

Activity: 714
Merit: 611



View Profile WWW
August 24, 2018, 09:03:46 AM
 #11

But at some point of time the tx will be mined by someone not in the group of miners that wants to censor these tx's right?

Theoretically, yes.
But practically, most miner (probably each one) has a financial incentive to mine bitcoins.
And with choosing the transactions with the highest fees to be included (either the pool operator or the solo miner decides this) the financial benefit will be the biggest.



These tx's might just take a little bit longer, because they have less miners fees, but they will be picked up by some desperate
miner.  Roll Eyes  Some people might even target these "scraps" because it is being discarded by the big boys? 

This is definitely a possiblity.
But why should a miner be desperate enough to pick a low-fee tx over a high-fee tx (assuming the mempool is by far NOT empty).
He would give up on some btc's.

buwaytress
Hero Member
*****
Offline Offline

Activity: 770
Merit: 707


I bit, therefore I am


View Profile
August 24, 2018, 03:44:24 PM
 #12

I wonder, if during this LN implementation, it would be too difficult to add a second second layer (or 2 parallel layers) to also allow for escrow, or perhaps within LN itself? Or using LN as an escrow method?

There won't be any problems with having more than one second layer, especially if they have different features. It is possible to build more layers on top of the Lightning Network. Some think that ordinary people will use them instead of on-chain transactions.

I am going to write a long guide on the Lightning Network wallets once they stop changing so much. Developers are constantly updating their implementations.

This is actually the scenario I believe will happen as well. I mean, the way people use Bitcoin now, most don't realise which implementation they're using, or even if they're actually signing any transactions at all. If/When these LN implemetations get to the point they look just like any Bitcoin wallet, you can be sure people will be using LN without ever interacting with the chain. In the end, this probably won't matter I suppose. It will take a lot more to convince me to move over, though I'm really keen (if I'm the typical example of a mainstream user).


btj
Member
**
Offline Offline

Activity: 106
Merit: 14


View Profile
August 25, 2018, 01:35:55 AM
 #13

Thank you for this nice post !

Unfortunately this confirm that LN = centralization ! It's against Bitcoin's primary objective and personally i can't support this technology (In the current state and especially if nothing will be made to improve the idea more in decentralized way).

2 importants depreciated factors join the game: Middle man and Trust.

Of course there adventages using it like enjoying a micro transaction fees, save Blockchain transactions ... but what about security (Keeping things decentralized) ?

I am not the negative guy of the gang, it's great to offer solutions to improve bitcoin or blockchain technology ... but security first (Especially when people's money at stake).

bob123
Hero Member
*****
Offline Offline

Activity: 714
Merit: 611



View Profile WWW
August 25, 2018, 07:40:01 AM
 #14

Unfortunately this confirm that LN = centralization !

 Huh
How did you get to THAT conclusion ?  Huh
This doesn't make any sense. Please elaborate.



It's against Bitcoin's primary objective and personally i can't support this technology (In the current state and especially if nothing will be made to improve the idea more in decentralized way).

Fortunately, you don't have to support anything.
If you believe the LN is centralized, take a look at it again. Read a few articles. And come back with more knowledge. The LN is anything but centralized..



2 importants depreciated factors join the game: Middle man and Trust.

Well, good thing is: The LN does NOT need a middle man and does NOT require trust.

You seem to be overwhelmed by looking at the pictures illustrating the LN.
Please, do yourself a favor, and read into the LN.

This takes 5 minutes of your life, but will keep you safe from embarrassing moments/posts (like this one).



Of course there adventages using it like enjoying a micro transaction fees, save Blockchain transactions ... but what about security (Keeping things decentralized) ?

What has security to do with centralization ?! You seem to be mixing up a lot words you have heard.

As already mentioned, LN is no way decentralized. And you would know that if you would have read at least 1 proper article about the LN.

If you have any security concerns, feel free to shout them out. I will be glad to answer all of your questions regarding security.



I am not the negative guy of the gang, it's great to offer solutions to improve bitcoin or blockchain technology ... but security first (Especially when people's money at stake).

You seem to be the 'uneducated' guy of the gang. At least regarding the LN.
You have a lot of misconceptions regarding the LN.


btj
Member
**
Offline Offline

Activity: 106
Merit: 14


View Profile
August 25, 2018, 12:32:47 PM
 #15

I am not the negative guy of the gang, it's great to offer solutions to improve bitcoin or blockchain technology ... but security first (Especially when people's money at stake).

You seem to be the 'uneducated' guy of the gang. At least regarding the LN.
You have a lot of misconceptions regarding the LN.



Before going furthur, stay educated and do not shoot garbage there face to someone you don't know.

So let start with MIDDLE MAN:

Quote
1. Alice opens a payment channel to Bob, and Bob opens a payment channel to Charlie.
2. Alice wants to buy something from Charlie for 1000 satoshis.
3. Charlie generates a random number and generates its SHA256 hash. Charlie gives that hash to Alice.
4. Alice uses her payment channel to Bob to pay him 1,000 satoshis, but she adds the hash Charlie gave her to the payment along with an extra condition: in order for Bob to claim the payment, he has to provide the data which was used to produce that hash.
5. Bob uses his payment channel to Charlie to pay Charlie 1,000 satoshis, and Bob adds a copy of the same condition that Alice put on the payment she gave Bob.
6. Charlie has the original data that was used to produce the hash (called a pre-image), so Charlie can use it to finalize his payment and fully receive the payment from Bob. By doing so, Charlie necessarily makes the pre-image available to Bob.
7. Bob uses the pre-image to finalize his payment from Alice

So Bob here is the middle man, he can affect time of transaction and especially if he go offline.

LN is a network of several centralized hubs ... and you have to choose a performent and all time online to prevent delaying transaction etc ... So here a contract of trust ...

I invite you to read more here for disadvantages of LN in the current state and what make it centralized:
https://medium.com/crypto-punks/lightning-network-ux-centralization-b517037b92ec

Colluding miner attacks - miners have power to decide which transactions they want to include in the block so they can refuse certain transactions selected by an attacker. This attack is very unlikely to happen due to high cost and complexity (all miners would have to cooperate).

You have to trust miners.

And please read more about "what make a technology decentralized" before posting anything else ... and also to prevent spamming this thread since the first goal is to give some knowledge about LN and not to debate it (I given my feedback like you did yourself, there many other threads about this.).
BitCryptex
Sr. Member
****
Online Online

Activity: 364
Merit: 298



View Profile WWW
August 25, 2018, 05:36:52 PM
 #16

So let start with MIDDLE MAN:
-SNIP
So Bob here is the middle man, he can affect time of transaction and especially if he go offline.

The time is not a real problem since every transaction has its own timeout. It all happens nearly instantly. I have sent about 100 LN payments and the longest one took 1 minute. Bob can't steal funds because of HTLCs

LN is a network of several centralized hubs ... and you have to choose a performent and all time online to prevent delaying transaction etc ... So here a contract of trust ...

You can still open a direct channel to someone who you are going to transact with very often. Here you can see the largest nodes. Only one node has 1/4 of the total Lightning Network capacity. Keep in mind that principal is not the most important factor; the number of connections and channel balancing are much more important. The need of being online is definitely a huge disadvantage for some people, can't argue with that.

Colluding miner attacks - miners have power to decide which transactions they want to include in the block so they can refuse certain transactions selected by an attacker. This attack is very unlikely to happen due to high cost and complexity (all miners would have to cooperate).

You have to trust miners.

If ALL miners decided to cooperate with a single person then you would have to be more concerned about 51% attack. It won't happen since it would scare future investors and users. Miners would lose money long-term.

It took me some time to format this text on my phone. I am going to read what you have linked once I get home.

btj
Member
**
Offline Offline

Activity: 106
Merit: 14


View Profile
August 25, 2018, 06:31:28 PM
 #17

So let start with MIDDLE MAN:
-SNIP
So Bob here is the middle man, he can affect time of transaction and especially if he go offline.

The time is not a real problem since every transaction has its own timeout. It all happens nearly instantly. I have sent about 100 LN payments and the longest one took 1 minute. Bob can't steal funds because of HTLCs

LN is a network of several centralized hubs ... and you have to choose a performent and all time online to prevent delaying transaction etc ... So here a contract of trust ...

You can still open a direct channel to someone who you are going to transact with very often. Here you can see the largest nodes. Only one node has 1/4 of the total Lightning Network capacity. Keep in mind that principal is not the most important factor; the number of connections and channel balancing are much more important. The need of being online is definitely a huge disadvantage for some people, can't argue with that.

Colluding miner attacks - miners have power to decide which transactions they want to include in the block so they can refuse certain transactions selected by an attacker. This attack is very unlikely to happen due to high cost and complexity (all miners would have to cooperate).

You have to trust miners.

If ALL miners decided to cooperate with a single person then you would have to be more concerned about 51% attack. It won't happen since it would scare future investors and users. Miners would lose money long-term.

It took me some time to format this text on my phone. I am going to read what you have linked once I get home.

Instructive return, thank you.

Waiting your feedback about the link of my previous answer.
LoyceV
Legendary
*
Offline Offline

Activity: 1274
Merit: 2138


Self-made Legendary!


View Profile WWW
August 26, 2018, 11:10:01 AM
 #18

Colluding miner attacks - miners have power to decide which transactions they want to include in the block so they can refuse certain transactions selected by an attacker. This attack is very unlikely to happen due to high cost and complexity (all miners would have to cooperate).

You have to trust miners.
If ALL miners decided to cooperate with a single person then you would have to be more concerned about 51% attack. It won't happen since it would scare future investors and users. Miners would lose money long-term.
The same applies to the current Bitcoin network, without Lightning Network. If all miners decide to reject transactions from a certain address, they break the one thing that makes Bitcoin so great, and severely treaten the value of their investment.

BitCryptex
Sr. Member
****
Online Online

Activity: 364
Merit: 298



View Profile WWW
August 26, 2018, 08:11:36 PM
 #19

Waiting your feedback about the link of my previous answer.

The article linked by you is well written. It covers a lot of problems and suggests solutions which are quite reasonable. However, one thing drew my attention.

[...]It will be very dangerous, if a counterparty has an older state, where all or most money on his side, because it becomes very lucrative to cheat (risk almost nothing for a chance to get all channel’s funds)[...]
User should keep untrusted counterparty from exhausting a channel
Solution: a minimum collateral should be set automatically (especially if routing is enabled), but user still should be aware of a problem and not change default settings when dealing with untrusted nodes.[...]

That's why eltoo was proposed. It will be an alternative to the current penalty system. A softfork is needed. Also, it's not possible to spend all funds that are locked up in the channel - there is such a thing as reserve which is a minimum balance that channel must maintain. For example, one of my channels has 0.0049 BTC capacity; the reserve is 0.000049 BTC.


btj
Member
**
Offline Offline

Activity: 106
Merit: 14


View Profile
August 27, 2018, 12:54:45 PM
 #20

That's why eltoo was proposed. It will be an alternative to the current penalty system. A softfork is needed. Also, it's not possible to spend all funds that are locked up in the channel - there is such a thing as reserve which is a minimum balance that channel must maintain. For example, one of my channels has 0.0049 BTC capacity; the reserve is 0.000049 BTC.

Thank you for your time reading the article ! Yes it cover many cases with offering a solutions to remedy the problems.

Eltoo solve the problem by continuously updating payment channel balances off-chain.

Soft fork is required since “SIGHASH_NOINPUT” flag for signature must be introduced to Bitcoin Protocol to make it working.

I suggest you to edit your post and add this basic video explaination about how LN works:
https://www.youtube.com/watch?v=rrr_zPmEiME

Pages: [1] 2 »  All
  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!