Bitcoin Forum
December 14, 2024, 01:53:18 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 [54] 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 »
  Print  
Author Topic: The Lightning Network FAQ  (Read 33354 times)
This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic. (37 posts by 1+ user deleted.)
DaveF
Legendary
*
Offline Offline

Activity: 3696
Merit: 6686


Crypto Swap Exchange


View Profile WWW
October 17, 2021, 12:24:22 PM
 #1061


I restarted it.
There, I'm able to connect to the node.
Code:
$ lncli --rpcserver localhost:20009 connect 0370c1f28b315806fa9e7fc2616715a5052401fcbeff89e83d3810f1f9683b9a37@3thm3rotf4bhgppcfsyh7ihcdzany7ozew7kyxnjw5ozfq6mxn3afuad.onion:9735
{

}
$ lncli listpeers
{
            "pub_key": "0370c1f28b315806fa9e7fc2616715a5052401fcbeff89e83d3810f1f9683b9a37",
            "address": "3thm3rotf4bhgppcfsyh7ihcdzany7ozew7kyxnjw5ozfq6mxn3afuad.onion:9735",


Here is my URI:
Code:
02edda84bcaae1b32da8de236329e4c9572a00ec99e56f9f7f72811b1cfa2025e4@zrqoqad3aeqzzma5ce7pyc5fftmvem2qsleeay36gujnim5scuuixeqd.onion:9735


As could I. Good advice on the restart, I didn't even think of it. Sometimes the simple things work best.
@BlackHatCoiner di you want me (or any of us) to open a channels or are you still working on it? If you do any preference on amount?

-Dave

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1736
Merit: 8449


Fiatheist


View Profile WWW
October 17, 2021, 12:29:57 PM
 #1062

@BlackHatCoiner di you want me (or any of us) to open a channels or are you still working on it?

I want to open a channel, but it still says that I haven't synced with the chain. Anyway, you have to give me a lninvoice, right?

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
DaveF
Legendary
*
Offline Offline

Activity: 3696
Merit: 6686


Crypto Swap Exchange


View Profile WWW
October 17, 2021, 04:57:23 PM
Merited by JayJuanGee (1)
 #1063

@BlackHatCoiner di you want me (or any of us) to open a channels or are you still working on it?

I want to open a channel, but it still says that I haven't synced with the chain. Anyway, you have to give me a lninvoice, right?

No, if you have funds in your attached BTC wallet all I have to do is open a channel on my side and your node should just go and open it.
The that's why I asked if you wanted me to because:
1) I don't know if you have funds in there or if you do how much
and / or
2) If you wanted to do something else with the funds.

Lets say you have .0005 (~$30) sitting in there to test something this week then me opening a channel for .00041 (~$25) means you have to then close it before you do something else.

-Dave

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1736
Merit: 8449


Fiatheist


View Profile WWW
October 17, 2021, 05:42:50 PM
 #1064

I had deposited 500,000 sats few days ago. So, open it if you want. Do I have to give any permissions or you can just do it by having my URI?

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
DaveF
Legendary
*
Offline Offline

Activity: 3696
Merit: 6686


Crypto Swap Exchange


View Profile WWW
October 17, 2021, 07:39:31 PM
Merited by JayJuanGee (1)
 #1065

I had deposited 500,000 sats few days ago. So, open it if you want. Do I have to give any permissions or you can just do it by having my URI?

Tried, got this
Quote
received funding error from 0370c1f28b315806fa9e7fc2616715a5052401fcbeff89e83d3810f1f9683b9a37: chan_id=3355a3cbcc67496593849c6e487cec54c9ef6037ef304cddf18c2460411bb8fc, err=Synchronizing blockchain

So something may not be right on your side. As far as connecting a peer should not happen when your node is out of sync or at least thinks it's out of sync.
Just did a test one of my nodes was off since mid week and when I restarted it and tried to connect it failed.

Going to back off here since I really have no idea and don't want to give you bad / wrong advice.
You can always hop off to github and ask them.

-Dave

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1736
Merit: 8449


Fiatheist


View Profile WWW
October 17, 2021, 09:16:00 PM
Merited by JayJuanGee (1)
 #1066

Setting aside the connection of my node, I want to clear up some things first.

I'm trying to understand the technical background of the penalty mechanism and need some answers to continue my study further. First off, I'll write what I've understood so far. The juicy part of the lightning network is this IMO. How can you discourage someone from publishing an older state of the channel. Lightning must have been an enlightenment for whoever thought of it. I'll take Bob and Alice as my examples.

Let's say the channel starts with Alice having 10 coins and Bob nothing. (Commitment transaction #0)

Alice wants to send 2 coins to Bob. Once she signs the transfer, she has to assure Bob she'll not cheat him in the future. Thus, she provides an evidence that the previous transaction is revoked. So, she has to sign the following:

1) If Bob somehow provides a signature from Alice's revocation key, he can seize all of her coins. Otherwise, Alice can take the 10 coins if she broadcasts the transaction, in which she spends her coins and reveals her revocation key, acquires 432 confirmations.

2) Bob gets 2 coins.

They both exchange signed commitments and revocation keys as they transact. First, Alice sends the above to Bob and Bob agrees. If Bob wants to send 1 coin back, Alice needs to make sure he'll not publish the previous state. So, she tells him to provide her the new commitment transaction signed, so that she gives him the revocation key of the previous state. (The one that if Bob tried to cheat her, she could sign a transaction with and take her 2 coins back)



Am I wrong until here? I'm sure I've said something that's not true.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Icygreen
Legendary
*
Offline Offline

Activity: 1464
Merit: 1136



View Profile
October 18, 2021, 07:47:29 AM
 #1067

I've opened a channel using Umbrel's GUI and attempted to close it with the same however the funds have not returned to my wallet and the channel status shows closing since Sept 27.  Not sure what to do?  Here it is in Thunderhub.
 
DaveF
Legendary
*
Offline Offline

Activity: 3696
Merit: 6686


Crypto Swap Exchange


View Profile WWW
October 18, 2021, 12:22:19 PM
Merited by JayJuanGee (1)
 #1068

No txid. I'll post in the thread you've recommended, thanks.

The TXID is in the image you posted. If you look at it on an explorer is it confirmed or is it just sitting in limbo?
If you don't want to give it out for privacy reasons that's fine, but its an important data-point to check.

You just want to start by making sure that something did not go wrong and the transaction was never broadcast.
From the been there done that department.

-Dave

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Icygreen
Legendary
*
Offline Offline

Activity: 1464
Merit: 1136



View Profile
October 18, 2021, 03:17:40 PM
 #1069

No txid. I'll post in the thread you've recommended, thanks.

The TXID is in the image you posted. If you look at it on an explorer is it confirmed or is it just sitting in limbo?
If you don't want to give it out for privacy reasons that's fine, but its an important data-point to check.

You just want to start by making sure that something did not go wrong and the transaction was never broadcast.
From the been there done that department.

-Dave
Sorry, thought you'd meant the closing transaction.  Yes, that one's confirmed in block 700,550. I'm ok posting the details regarding this.

Code:
e884d01dcf0c31ffcfbf6e0dcfb8fd35c199a2ec5219bd0a0dee962636d2eeed

DaveF
Legendary
*
Offline Offline

Activity: 3696
Merit: 6686


Crypto Swap Exchange


View Profile WWW
October 18, 2021, 04:48:06 PM
 #1070

No txid. I'll post in the thread you've recommended, thanks.

The TXID is in the image you posted. If you look at it on an explorer is it confirmed or is it just sitting in limbo?
If you don't want to give it out for privacy reasons that's fine, but its an important data-point to check.

You just want to start by making sure that something did not go wrong and the transaction was never broadcast.
From the been there done that department.

-Dave
Sorry, thought you'd meant the closing transaction.  Yes, that one's confirmed in block 700,550. I'm ok posting the details regarding this.

Code:
e884d01dcf0c31ffcfbf6e0dcfb8fd35c199a2ec5219bd0a0dee962636d2eeed

Yeah, just trying to follow step by step. In theory it's 100% impossible for your node to open a channel and show it open without a valid TX.
In reality, it's still a bit more beta at times so if you spend time on the lnd github you can see some really oddball things crop up now and then.

I am on mobile at the moment, was there ever any routing through this channel?

Have you restarted LND? That actually fixed BlackHatCoiners unrelated problem above, but you never know.

-Dave



█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Icygreen
Legendary
*
Offline Offline

Activity: 1464
Merit: 1136



View Profile
October 18, 2021, 05:29:32 PM
 #1071

I don't believe this channel has routed any transactions. Couldn't find a way to reboot lightning independently so I've rebooted the Umbrel, not sure if this is the same. Also tried reloading the channel backup. No changes. 
Rath_ (OP)
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3139



View Profile
October 18, 2021, 11:48:51 PM
Merited by JayJuanGee (3), ABCbits (2), BlackHatCoiner (2), n0nce (2), ndalliard (1)
 #1072

Am I wrong until here? I'm sure I've said something that's not true.

I explained an uncooperative channel close in this post. I think that you should read it before reading my reply further.

Otherwise, Alice can take the 10 coins if she broadcasts the transaction, in which she spends her coins and reveals her revocation key, acquires 432 confirmations.

An uncooperative channel close always involves at least two transactions. The first one is the commitment transaction and the other one spends the RSMC output. There might be more transactions; two for each in-flight HTLC.

Things get a little bit complicated when we are talking about unsettled payments. Bob asks Alice to sign a commitment transaction with the following outputs:

- a standard output; 8 BTC to Alice's address
- HTLC; 2 BTC that can be spent on the following conditions: Bob can spend this output using the payment preimage and HTLC signatures (HTLC-success transaction); Otherwise Alice can spend this output using revocations keys or HTLC-timeout transaction.

Note that this is what Bob's commitment transaction looks like. Alice's transaction looks like this:

- RSMC; 8 BTC that can be spent on the following conditions: if X blocks are mined since this transaction has been confirmed, Alice can spend these coins; otherwise Bob can use his and Alice's revocation key to unlock this output.
- HTLC; 2 BTC that can be spent on the following conditions: Bob can spend this output using the payment preimage and HTLC signatures (HTLC-success transaction) or using the revocation keys; otherwise Alice can spend it through the HTLC-timeout transaction.

Note: The HTLC-timeout transaction contains an absolute timelock (cltv_expiry) to give the other party time to claim the funds with the payment sercet. The outputs of HTLC-success and HTLC-timeout transactions contain another locking script with the same relative timelock as the RSMC output (to_self_delay).

Once all of the in-flight payments are settled, the final commitment transactions look like this:

Bob's commitment transaction:

- a standard output; 8 BTC to Alice's address
- RSMC; 2 BTC that can be spent on the following conditions: if X blocks are mined since this transaction has been confirmed, Bob can spend these coins; otherwise Alice can use hers and Bob's revocation key to unlock this output.

Alice's commitment transaction:

- a standard output; 2 BTC to Bob's address
- RSMC; 8 BTC that can be spent on the following conditions: if X blocks are mined since this transaction has been confirmed, Alice can spend these coins; otherwise Bob can use his and Alice's revocation key to unlock this output.

If Bob wants to send 1 coin back, Alice needs to make sure he'll not publish the previous state. So, she tells him to provide her the new commitment transaction signed, so that she gives him the revocation key of the previous state. (The one that if Bob tried to cheat her, she could sign a transaction with and take her 2 coins back)

Alice constructs a new commitment transaction and asks Bob to sign it. Bob signs Alice's commitment transaction. Then, Bob creates his own version of the latest commitment transaction and asks Alice to sign it and revoke her previous commitment transaction. Once Alice signs Bob's transaction, he can safely hand her over his revocation key for the previous transaction.
Shymaa-Arafat
Full Member
***
Offline Offline

Activity: 228
Merit: 156


View Profile
October 19, 2021, 03:28:00 AM
 #1073

Since u r like the official post about lightning, may I ask about the law regulations if one of the two is required to freeze his/her money for some time?
I mean do they use experts and allow him/her to spend the UTXO (say into another one to be freezed) before the time lock ends and the other party use the revocation key to spend it?
I wrote a post asking, but don't know where it has gone

Aha
It was moved to legal
https://bitcointalk.org/index.php?topic=5366309.msg58210913#msg58210913
Rath_ (OP)
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3139



View Profile
October 19, 2021, 09:10:03 AM
Merited by JayJuanGee (1), ABCbits (1), psycodad (1)
 #1074

I mean do they use experts and allow him/her to spend the UTXO (say into another one to be freezed) before the time lock ends and the other party use the revocation key to spend it?

You seem to be slightly confused about how the Lightning Network works. Timelocks that are used in commitment transactions are relative (except for the HTLC outputs which also contain an absolute timelock but that's a rare case) which means that they are safe to use for an indefinite amount of time. Despite that, commitment transactions are resigned periodically, even if there isn't any activity in the channel, to update the on-chain fees based on the current mempool state.

Revocation keys can be used only if the other party publishes an old commitment transaction which had been revoked. If the latest commitment transaction is published, the transaction immediately refunds the other party their coins and the person who published the transaction has to wait a specific amount of time (144 blocks by default) before they can spend their output to themself in another transaction. Commitment transactions should not be used if both parties are online and willing to cooperate. They can agree to close the channel at any time without any delay.

I will take a look at your thread later today.
Shymaa-Arafat
Full Member
***
Offline Offline

Activity: 228
Merit: 156


View Profile
October 19, 2021, 05:44:19 PM
 #1075

Do u mean lock time is usually 144 block~= 1 day, so it's a very rare situation that someone participate in a channel and just happen to get a court order against him in that exact same day before he/she spends the coins?
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1736
Merit: 8449


Fiatheist


View Profile WWW
October 19, 2021, 07:56:08 PM
Merited by JayJuanGee (1)
 #1076

- RSMC; 8 BTC that can be spent on the following conditions: if X blocks are mined since this transaction has been confirmed, Alice can spend these coins; otherwise Bob can use his and Alice's revocation key to unlock this output.
What's the relation between Bob's revocation key and Alice's revocation key? You say that Bob can rip Alice off if he somehow gain access to her revocation key. What did Alice sign when she gave the signed commitment transaction to Bob? I think that's the hard part to understand. Is there some sort of public-key cryptography involved in the ack_and_revoke?

Bob shouldn't publish the first transaction in which he owns the entire 10 BTC, because Alice knows that commitment transaction's revocation key and can gain the RSMC output before the HTLC spending receives 144 confirmations?

Things get a little bit complicated when we are talking about unsettled payments.
What's an unsettled payment?

Otherwise Alice can spend this output using revocations keys or HTLC-timeout transaction.
What's HTLC-timeout transaction?

Note: The HTLC-timeout transaction contains an absolute timelock (cltv_expiry) to give the other party time to claim the funds with the payment sercet. The outputs of HTLC-success and HTLC-timeout transactions contain another locking script with the same relative timelock as the RSMC output (to_self_delay).
So, to simplify; there are two ways to timelock. One is to sign after which block a transaction is considered valid and the other a specific amount of blocks that need to be mined after it's included in a block for its outputs to be spendable.

Is that correct?

- RSMC; 2 BTC that can be spent on the following conditions: if X blocks are mined since this transaction has been confirmed, Bob can spend these coins; otherwise Alice can use hers and Bob's revocation key to unlock this output.
In case I've forgotten to mention it above, assuming Bob tries to cheat Alice:  What's the relation between his and hers revocation keys so that if one of them has both, they can unlock the output?




Sorry if I've been tiring in this thread. I just have this symptom where I HAVE to understand every detail of the system that I'm using. You've used some terms that are unknown to me, but, hopefully, they won't be.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Rath_ (OP)
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3139



View Profile
October 20, 2021, 12:11:21 AM
Merited by ABCbits (2), JayJuanGee (1)
 #1077

Bob shouldn't publish the first transaction in which he owns the entire 10 BTC, because Alice knows that commitment transaction's revocation key and can gain the RSMC output before the HTLC spending receives 144 confirmations?

It's actually Alice who owned 10 BTC at the beginning but you get the idea. The first commitment transaction contains only one (RSMC) output. If Alice published it and it got confirmed, Bob could safely publish a penalty transaction within 144 blocks. I am not sure why you mentioned the HTLC here.

What's an unsettled payment?

An unsettled payment is an HTLC which still hasn't been claimed using a payment preimage.

What's HTLC-timeout transaction?

HTLC-timeout transaction is a transaction which allows the person who offered the HTLC to claim it back once the absolute timelock expires. We need HTLC-success/HTLC-timeout transactions to handle the dispute if something goes wrong while a payment is being routed (see "Broken channel" section of this article).

So, to simplify; there are two ways to timelock. One is to sign after which block a transaction is considered valid and the other a specific amount of blocks that need to be mined after it's included in a block for its outputs to be spendable.

Sounds good.

Sorry if I've been tiring in this thread. I just have this symptom where I HAVE to understand every detail of the system that I'm using. You've used some terms that are unknown to me, but, hopefully, they won't be.

No worries. Feel free to ask more questions or let me know if something is still not clear. It's a little bit late here so I will answer the question about revocation keys tomorrow.
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1736
Merit: 8449


Fiatheist


View Profile WWW
October 20, 2021, 08:37:22 PM
Merited by JayJuanGee (1)
 #1078

If Alice published it and it got confirmed, Bob could safely publish a penalty transaction within 144 blocks.
But, it wouldn't be (acknowledged and) revoked. How would Bob have gained access to the very first commitment transaction's revocation key? Don't they both publish penalties only if the transaction they're publishing is not the newest commitment transaction (that hasn't been revoked yet)?

I am not sure why you mentioned the HTLC here.
Because I've probably confused its meaning. Isn't HTLC a hashed timelock contract? Doesn't that mean that it's an “agreement”? A condition where both exchange commitment transactions?

No worries. Feel free to ask more questions or let me know if something is still not clear. It's a little bit late here so I will answer the question about revocation keys tomorrow.
I think the way revocation keys work is the only serious thing left for me. I'm reading the lnbook of Andreas Antonopoulos, Olaoluwa Osuntokun and Rene Pickhardt, which is perfect for newbies in this field like me.  Roll Eyes

I haven't fully acknowledged the way they work so I said why not asking my questions here?

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Rath_ (OP)
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3139



View Profile
October 26, 2021, 08:21:00 AM
Last edit: October 26, 2021, 08:31:31 AM by Rath_
Merited by BlackHatCoiner (4), JayJuanGee (2), ABCbits (2)
 #1079

Sorry for a late reply. I have been slightly busy lately.

What's the relation between Bob's revocation key and Alice's revocation key? [...] Is there some sort of public-key cryptography involved in the ack_and_revoke?

This explanation should help you understand it. Here you can find the formulas which are used to calculate revocation public and private keys

revoke_and_ack message looks like this:

Code: (https://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md#completing-the-transition-to-the-updated-state-revoke_and_ack)
    type: 133 (revoke_and_ack)
    data:
        [channel_id:channel_id]
        [32*byte:per_commitment_secret]
        [point:next_per_commitment_point]

Your node must provide per_commitment_secret associated with the next_per_commitment_point which you sent previously in either funding_locked or revoke_and ack message.

Because I've probably confused its meaning. Isn't HTLC a hashed timelock contract? Doesn't that mean that it's an “agreement”? A condition where both exchange commitment transactions?

An HTLC is basically an additional output of a commitment transaction with a specific locking script. If an HTLC is below the dust limit then it is added to the transaction fee (only when the payment has not been settled yet). There is no real incentive for the other party to cheat in this particular case. If you are not comfortable with that, you can always refuse to route payments below the dust limit.

I am still not sure why you mentioned it. If Alice broadcast the first commitment transaction (the one which refunds her 10 BTC), Bob could simply publish a penalty transaction because Alice revealed the secret needed to derive the revocation key for her outdated commitment.

It wouldn't make sense for Bob to broadcast the second commitment transaction if Alice broadcast the first one because: A) It would be rejected by most nodes due to double-spend B) It would probably be more expensive

But, it wouldn't be (acknowledged and) revoked. How would Bob have gained access to the very first commitment transaction's revocation key? Don't they both publish penalties only if the transaction they're publishing is not the newest commitment transaction (that hasn't been revoked yet)?

You're right. I assumed that they managed to sign the second commitment transaction successfully. If we assume that they failed to sign it, there is no need to worry about that HTLC. If Alice refuses to revoke her previous commitment and sign Bob's new transaction, Bob should not reveal the payment preimage needed to claim that HTLC.
cygan
Legendary
*
Offline Offline

Activity: 3374
Merit: 9019


icarus-cards.eu


View Profile WWW
October 29, 2021, 07:42:21 PM
Merited by JayJuanGee (1)
 #1080

wanted to share with everyone here another interesting article about the lightning network, which was published today by the Kraken exchange


Quote
The Lightning Network is a scalability solution built on top of #Bitcoin.

Read our article to learn about:
Benefits of the Lightning Network
History of the network
How Lightning Network works
https://www.kraken.com/learn/lightning-network

███████████▄
████████▄▄██
█████████▀█
███████████▄███████▄
█████▄█▄██████████████
████▄█▀▄░█████▄████████
████▄███░████████████▀
████░█████░█████▀▄▄▄▄▄
█████░█
██░█████████▀▀
░▄█▀
███░░▀▀▀██████
▀███████▄█▀▀▀██████▀
░░████▄▀░▀▀▀▀████▀
 

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

█████████████████████████
████████▀▀░░░░░▀▀████████
██████░░▄██▄░▄██▄░░██████
█████░░████▀░▀████░░█████
████░░░░▀▀░░░░░▀▀░░░░████
████░░▄██░░░░░░░██▄░░████
████░░████░░░░░████░░████
█████░░▀▀░▄███▄░▀▀░░████
██████░░░░▀███▀░░░░██████
████████▄▄░░░░░▄▄████████
█████████████████████████
.
...SOL.....USDT...
...FAST PAYOUTS...
...BTC...
...TON...
Pages: « 1 ... 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 [54] 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 »
  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!