Bitcoin Forum
May 04, 2024, 10:25:36 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 [3]  All
  Print  
Author Topic: Basics of the Lightning Network  (Read 2244 times)
topcoin360
Member
**
Offline Offline

Activity: 75
Merit: 22


View Profile
December 03, 2020, 11:48:43 PM
 #41

Hi everyone,
I may have an idea that could significantly improve the lightning network if it works. I'd like to share it with you.

The proposed improvements are:
-Anyone could connect to several nodes on the same payment channel then go offline without disrupting the channel.
-We would only need the public key of the people we want to connect with to start a channel with them.
-The LN users would be able to make instant withdrawals with the cooperation of their peers.

For now let's call it the multidirectional payment channel. I didn't introduce any line of code which I will be working on asap but you can understand the logical pretty easily.

Channel opening: One of the participants opens the channel by transferring any amount of coins to a new multi-signature wallet. For security reasons the creator of the wallet (or the main user) must set a limit on the withdrawal fees (this restriction can be overruled with the signature of all the participants).
Deposits/withdrawals: Only the creator of the wallet can fund the channel but any participant can withdraw their coins. The withdrawals can be validated by one participant or by all the participants (the funds will be temporarily frozen unless the transaction is signed by everyone).
Payments: To make a transaction the payer must sign a payment to the payee then have it signed by all the other participants (they will actually sign their new balance on the channel). The main user does not have to validate the payments of the other users (so he  can go offline and it will not affect anyone).
Security: All the channel participants must protect themselves against fraud by verifying the payments that are made from their wallet. Any user can invalidate a fraudulent transaction with a penalty transaction and prevent the cheater from withdrawing more funds. A transaction can no longer be invalidated after the funds are unfrozen.


DISPUTE RESOLUTION CLAUSE

The case can be resolved at any of these steps (a delay for reply has to be determined):

1-User 1 makes a withdrawal.
2-Any user posts a penalty transaction to invalidate User 1’s withdrawal.
3-User 1 sends the latest lightning payment that was signed to him to prove that he has enough funds for his withdrawal.
4-Any user posts a more recent payment signed by User 1 to invalidate his proof.

A few important things to mention..
1.The creator of the wallet basically signs the total balance of the other users when he makes a payment and the other users sign their own total balance when they send him a payment. Therefore he doesn’t need to know the balance of each participant as he can invalidate a withdrawal by simply proving that the user who is making it is spending his coins (on the opposite side the other participants can invalidate his withdrawals by proving that he’s trying to spend their coins).  
2.The public key of any cheater will be removed from the channel (the coins on his channel will be transferred to a new wallet where his key is removed).
3.A withdrawal does not close the channel (the user who makes it must return the amount he owes to the other users).
4.A penalty transaction does not need to include any proof against the targeted user if he is not the main user (that is simply because there could be no proof if the targeted user has never made a payment).

The concept seems to work in theory but I don't know if it is feasible in practical.. maybe someone more knowledgeable can answer that:o. Thank you all for paying attention and hopefully we can do something with this! Grin
1714818336
Hero Member
*
Offline Offline

Posts: 1714818336

View Profile Personal Message (Offline)

Ignore
1714818336
Reply with quote  #2

1714818336
Report to moderator
1714818336
Hero Member
*
Offline Offline

Posts: 1714818336

View Profile Personal Message (Offline)

Ignore
1714818336
Reply with quote  #2

1714818336
Report to moderator
Transactions must be included in a block to be properly completed. When you send a transaction, it is broadcast to miners. Miners can then optionally include it in their next blocks. Miners will be more inclined to include your transaction if it has a higher transaction fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714818336
Hero Member
*
Offline Offline

Posts: 1714818336

View Profile Personal Message (Offline)

Ignore
1714818336
Reply with quote  #2

1714818336
Report to moderator
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5818


not your keys, not your coins!


View Profile WWW
August 31, 2021, 10:27:35 PM
Merited by Rath_ (2), JayJuanGee (1)
 #42

@Rath_ Hey, I'd like to have Phoenix and Breez added to the iOS Clients list!

I tested both for months and still use both regularly for transactions and onboarding new users!
I prefer to onboard with Phoenix, since it recently finally launched on the official AppStore, where everyone can download it.

Instead, Breez has more functionality, like sending to on-chain addresses (submarine swapping outwards) and shows all lnd functions in a  'developer menu' so you can manually fix stuff if things go south. However, it's not yet on the AppStore, but still available for everyone through the TestFlight Beta. It's still a slight hurdle for non-tech savvy users, so to those I always recommend Phoenix.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
MineSweep
Newbie
*
Offline Offline

Activity: 17
Merit: 7


View Profile
September 01, 2021, 02:06:37 AM
Merited by LoyceV (2)
 #43

The development of Lightning excites me more than its implementation. Does anyone know when lightning was bipped into the bitcoin network? Was it hard forked or is it a different layer as layer 2 scalability suggests? Either way I can likely find more material surfing the web  thanks  Cool
garlonicon
Hero Member
*****
Offline Offline

Activity: 803
Merit: 1932


View Profile
September 01, 2021, 04:49:36 AM
Merited by ndalliard (1)
 #44

Quote
when lightning was bipped into the bitcoin network?
It was never bipped, some people believe that it should be, maybe it will be in the future, but for now it is not.
Quote
Was it hard forked
No, implementing LN was possible after Segwit (which was a soft fork), because signatures were detached from calculating transaction hash.
Quote
or is it a different layer as layer 2 scalability suggests?
It is some kind of second layer, but it still has many dependencies on the first layer, for example introducing every user to the second layer needs on-chain transaction (for now).
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5818


not your keys, not your coins!


View Profile WWW
September 01, 2021, 12:13:58 PM
 #45

Quote
when lightning was bipped into the bitcoin network?
It was never bipped, some people believe that it should be, maybe it will be in the future, but for now it is not.
The reason why it's not a BIP is that it's not a change to Bitcoin whatsoever. It just utilizes and relies on the Bitcoin network, of course.
https://en.bitcoin.it/wiki/Bitcoin_Improvement_Proposals
Quote
A Bitcoin Improvement Proposal (BIP) is a design document for introducing features or information to Bitcoin

Quote
or is it a different layer as layer 2 scalability suggests?
It is some kind of second layer, but it still has many dependencies on the first layer, for example introducing every user to the second layer needs on-chain transaction (for now).
I would like to clarify this a little: it doesn't just "still" have some "dependencies" on first layer and "for now" - Lightning channels are created through normal Bitcoin transactions (hence no BIP needed) and the security of your funds lies in the fact that you can at any time close the channel (through another Bitcoin transaction) to transfer them to your Bitcoin address. It is thus highly interconnected with the Bitcoin blockchain and completely relying on it. It would simply not work without the first layer that is Bitcoin. This is the core foundation of Lightning, so I don't see how it will ever change (opposed to the 'still' and 'for now' additions in @garlonicon's reply) without fundamentally changing what Lightning Network is.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
vjudeu
Hero Member
*****
Offline Offline

Activity: 678
Merit: 1560



View Profile
September 01, 2021, 12:41:46 PM
 #46

Quote
The reason why it's not a BIP is that it's not a change to Bitcoin whatsoever.
https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-April/018858.html
Quote
Lightning itself really should be a series of BIPs.

Quote
I don't see how it will ever change
There are other second layers where they are connected with the first layer, but where introducing new people does not require creating on-chain transaction. Now, you cannot receive LN coins if you don't have any LN channel, you need on-chain transaction for that. Maybe things like Pedersen Commitments could solve that issues in the future, because I can imagine a network where there are on-chain transactions moving coins from and into some second layer, but where everything else can happen directly inside that second layer. Also, as far as I know, in Litecoin Mimble Wimble Extension Blocks will be made in that way: only sending between new and old addresses will need mainchain transaction, everything else will happen inside Extension Blocks, so maybe in LN it will be also possible in the future. Also, Paul Sztorc's Thunder Network will allow introducing new people to the second layer directly: https://www.truthcoin.info/blog/thunder/. Technically speaking, it is possible for other second layers, so it may be also possible for LN.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5818


not your keys, not your coins!


View Profile WWW
September 01, 2021, 12:49:20 PM
 #47

Quote
I don't see how it will ever change
There are other second layers where they are connected with the first layer, but where introducing new people does not require creating on-chain transaction. Now, you cannot receive LN coins if you don't have any LN channel, you need on-chain transaction for that. Maybe things like Pedersen Commitments could solve that issues in the future, because I can imagine a network where there are on-chain transactions moving coins from and into some second layer, but where everything else can happen directly inside that second layer. Also, as far as I know, in Litecoin Mimble Wimble Extension Blocks will be made in that way: only sending between new and old addresses will need mainchain transaction, everything else will happen inside Extension Blocks, so maybe in LN it will be also possible in the future. Also, Paul Sztorc's Thunder Network will allow introducing new people to the second layer directly: https://www.truthcoin.info/blog/thunder/. Technically speaking, it is possible for other second layers, so it may be also possible for LN.
Right, but still that 2nd layer is always relying and depending on the first layer, otherwise what kind of "2nd" layer is that? Wink

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
ndalliard
Full Member
***
Offline Offline

Activity: 154
Merit: 177



View Profile
September 01, 2021, 01:00:00 PM
 #48

Right, but still that 2nd layer is always relying and depending on the first layer, otherwise what kind of "2nd" layer is that? Wink
i guess the point of garlonicon was not that the 2nd layer doesn't depend on the 1st layer, but that the onboarding of new users will be possible without touching the 1st layer directly (still depending on it)
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5818


not your keys, not your coins!


View Profile WWW
September 01, 2021, 01:06:13 PM
 #49

Right, but still that 2nd layer is always relying and depending on the first layer, otherwise what kind of "2nd" layer is that? Wink
i guess the point of garlonicon was not that the 2nd layer doesn't depend on the 1st layer, but that the onboarding of new users will be possible without touching the 1st layer directly (still depending on it)
Oh yes, I guess that can be technically implemented.
But I wanted to clarify, through all of his "still relies", "some dependencies", "for now" etc. that LN very much depends and forever will be based and secured by, L1. Even if you might be able to onboard users without a new Bitcoin transaction every time.

This goes a bit into another topic, but this is a general LN thread so I guess it's fine: In my personal opinion, we should be good with the current setup for years to come. With SegWit and long-living LN channels, it shouldn't be needed to create channels without BTC transaction, even if millions of people join Bitcoin. One transaction per person (and everything after that mostly via LN) should easily be handled by the Blockchain as long as they don't all join at once Wink

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: « 1 2 [3]  All
  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!