Bitcoin Forum
May 05, 2024, 11:46:13 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: A Beginner's guideline to Bitcoin Lightning Network  (Read 1336 times)
Pffrt
Sr. Member
****
Offline Offline

Activity: 1372
Merit: 322


View Profile
June 08, 2020, 02:07:28 PM
Merited by JayJuanGee (1)
 #21

Bob open a 1BTC channel with Alice and send her 0.5BTC. If Alice wants to send Bob 0.5BTC may she uses the same channel or it is just onedirection channel  and she has to open another channel which is in direction Alice->Bob and use this for paying Bob.
What you need to understand is that LN is a kind of settlement. So, yes. Alice can send Bob and vice versa with one channel. But there are some sort of restrictions on receiving fund. If you have started a channel with 1 BTC, as long as you don't send any fund, you can't receive any too. You can only receive fund as the same amount which you sent although it can be increased in some way.
1714952773
Hero Member
*
Offline Offline

Posts: 1714952773

View Profile Personal Message (Offline)

Ignore
1714952773
Reply with quote  #2

1714952773
Report to moderator
1714952773
Hero Member
*
Offline Offline

Posts: 1714952773

View Profile Personal Message (Offline)

Ignore
1714952773
Reply with quote  #2

1714952773
Report to moderator
If you see garbage posts (off-topic, trolling, spam, no point, etc.), use the "report to moderator" links. All reports are investigated, though you will rarely be contacted about your reports.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
bpovtmg
Full Member
***
Offline Offline

Activity: 411
Merit: 199

Join the Bitcoin Lightning Revolution (Ask me How)


View Profile WWW
September 14, 2020, 11:59:46 PM
Last edit: September 15, 2020, 07:20:18 AM by bpovtmg
Merited by JayJuanGee (1)
 #22

Guys,

The LN is a great re-invention and a smart try of bringing back micropayments into the Bitcoin world that faded away when the transfer fees had risen significantly.

I really like this technology and actually I dropped from the btc world about 3 years ago when micropayments became expensive, in 2020  I decided to take another look to see what's going on and discovered the LN.

To get you started, please check out this thread to get your 200 satoshis to play around with the LN bitcoins:
https://bitcointalk.org/index.php?topic=5275451.0

For some more fun, visit my Telegram channel where we occasionally play a simple Lightning Dice doing small quick and easy bets (100-1000 satoshis depending on the mood) via LN:
https://web.telegram.org/#/im?p=g407859681
  
You will see how easy and simple you can send and receive a couple of $$ via the LN.

Word of Caution: For the start, install one of the easiest custodial wallets like Wallet of Satoshi or Blue Wallet. Leave more advance stuff for the future.

GO LIGHTNING GO !!

* Join the Bitcoin Lightning Revolution:
https://bitcointalk.org/index.php?topic=5276985
*Visit my Free Bookshop: https://bitcointalk.org/index.php?topic=5274233.0
Penguinoraurus
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
July 06, 2021, 03:09:31 AM
 #23

Sorry for pumping this the thread.

Curious, How if in the end or bad happened like lost of the private key then not able to make sign signature and the are not able to online, what's the next will be?
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3131



View Profile
July 06, 2021, 08:48:18 AM
 #24

Curious, How if in the end or bad happened like lost of the private key then not able to make sign signature and the are not able to online, what's the next will be?

The other party would very likely close the channel forcefully after some time. It would be possible because channel participants constantly sign new commitment transactions which can be used to settle the balance on-chain once a certain timelock has passed.

Unfortunately, in this case, the other party could attempt to cheat by broadcasting some old commitment transaction. Normally, you would be able to revoke it and publish a penalty transaction. A watchtower could also do that but it would have had to be set up beforehand.

However, not all participants of the network have malicious intentions. If the channel was closed using the latest commitment transaction, you would get all of your coins back to your on-chain wallet which you should be able to recover using your seed.

I am not sure how mobile wallets behave, but LND generates a backup file which lets you close your channels thanks to data-loss protection (note that in this case your peers have to cooperate with you). C-lightning users can use a backup plugin which makes a copy of the whole channel database whenever it is updated. If you have such a copy, you can easily recover your node without having to close any channels.
ndalliard
Full Member
***
Offline Offline

Activity: 154
Merit: 177



View Profile
July 06, 2021, 09:42:11 AM
 #25

The other party would very likely close the channel forcefully after some time. It would be possible because channel participants constantly sign new commitment transactions which can be used to settle the balance on-chain once a certain timelock has passed.

is the period of that timelock every time a new commitment is broadcastet updated? so it is a moving timeframe? and that timeframe will be set in stone with the opening transaction on the base layer, is that correct?
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3131



View Profile
July 06, 2021, 01:00:54 PM
Merited by LoyceV (6), ABCbits (6), DdmrDdmr (5), o_e_l_e_o (4), JayJuanGee (2), hosseinimr93 (1)
 #26

is the period of that timelock every time a new commitment is broadcastet updated? so it is a moving timeframe? and that timeframe will be set in stone with the opening transaction on the base layer, is that correct?

I might have phrased that slightly wrong, so let me explain it in more detail. If you are closing a channel uncooperatively, there are actually two on-chain transactions involved instead of just one.

First of all, the timelock is decided before the channel is established. By default, most nodes force the other peer to wait 144 blocks (~1 day). The maximum acceptable value by default is 2016 blocks (~2 weeks). I configured my node to create channels with their_to_self_delay = 432 blocks (~3 days), so if someone decides to close the channel opened to my node uncooperatively, they will have to wait 432 blocks (after the commitment transaction has been included in a block) before they can spend the output belonging to them. Those timelocks are relative which means that you do not have to sign a new commitment transaction whenever a new block is mined. New commitment transactions are signed periodically because their fees need to match the current state of the mempool. There is no point in paying 60 sat/vbyte when 1 sat/vbyte transactions are getting confirmed in just a few minutes. It also applies the other way around.

The first transaction is the commitment transaction. Let's say there's node A(lice) and node B(ob), and node A broadcasts the commitment transaction. That commitment transaction includes two outputs:

- output #0: 3 BTC (spendable by node B's private key) - reflecting node B balance
- output #1: 6 BTC (RSMC) - reflecting node A balance

There is one more important detail before we go any further. Whenever a new commitment transaction is signed, both parties exchange revocation keys for the previous commitment transaction so that they can both be sure that the other party is very unlikely to broadcast an old state of the channel.

RSMC is short for Revocable Sequence Maturing Contract. Such an output contains a relative timelock. This means that you can't spend this output until a certain amount of blocks have been mined since the transaction which includes that output was mined.

Let's say node B didn't change the default value of 144 blocks and the commitment transaction has been confirmed. There are two possible scenarios.

1) Node A attempts to cheat and broadcast an old commitment transaction. Node B has 144 blocks to spend the RSMC output using his and node A's revocation key which he got while they were working on a new commitment transaction.

2) Node A broadcasts the latest commitment transaction. In such a case, node B never got node A's revocation key for that commitment transaction, so he cannot spend that RSMC. Node A can broadcast another transaction spending that output after 144 blocks have been mined.

I know it sounds complicated. I am working on a thread which will explain it in a more understandable way.
ndalliard
Full Member
***
Offline Offline

Activity: 154
Merit: 177



View Profile
July 06, 2021, 02:24:57 PM
 #27

I know it sounds complicated. I am working on a thread which will explain it in a more understandable way.

thanks a lot for explaining it. yes it is kinda hard, i try to wrap my head around it, i just need some time to digest that all, it's fascinating - i looked for a save button here, i guess there is none and i just save the url  Cheesy i am looking forward to the thread - it will be a good one
Pages: « 1 [2]  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!