Bitcoin Forum
April 25, 2024, 02:18:36 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Closing a Lightning-Channel – Question  (Read 112 times)
.crypto (OP)
Member
**
Offline Offline

Activity: 134
Merit: 14


View Profile
January 24, 2021, 07:51:53 AM
 #1

There is something, I don‘t fully understand about closing a lightning-channel and I would like to ask you guys, for some help/clarification.

Lets assume the following situation: I open up a Lightning-Channel and load it with some Satoshi. After a while, I want to close that channel. Closing a LN channel requires an on-chain-transaction. Lets assume, exactly at that moment, there is a chain split. Two miners find a block at the same time. One miner adds my transaction to his block, the other doesn't. At this moment, I will see 1 confirmation of this transaction in my wallet, right? Lets assume, the other miner „wins“ at the end and the blockchain will be reorganized. This means, my transaction will go back to the mempool, right? So in my wallet, I will see this transaction as „unconfirmed“, I guess. Normally, my transaction will be included in one of the next blocks. But lets assume the TX fee was too low. I guess, then the TX will stay for a  certain time in the mempool but after some weeks will be wiped out. Does that mean the settlement transaction will be undone and the coins re-appear in my lightning channel? Can I always do a RBF (replace by fee) in this case?
1714011516
Hero Member
*
Offline Offline

Posts: 1714011516

View Profile Personal Message (Offline)

Ignore
1714011516
Reply with quote  #2

1714011516
Report to moderator
1714011516
Hero Member
*
Offline Offline

Posts: 1714011516

View Profile Personal Message (Offline)

Ignore
1714011516
Reply with quote  #2

1714011516
Report to moderator
1714011516
Hero Member
*
Offline Offline

Posts: 1714011516

View Profile Personal Message (Offline)

Ignore
1714011516
Reply with quote  #2

1714011516
Report to moderator
No Gods or Kings. Only Bitcoin
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714011516
Hero Member
*
Offline Offline

Posts: 1714011516

View Profile Personal Message (Offline)

Ignore
1714011516
Reply with quote  #2

1714011516
Report to moderator
1714011516
Hero Member
*
Offline Offline

Posts: 1714011516

View Profile Personal Message (Offline)

Ignore
1714011516
Reply with quote  #2

1714011516
Report to moderator
1714011516
Hero Member
*
Offline Offline

Posts: 1714011516

View Profile Personal Message (Offline)

Ignore
1714011516
Reply with quote  #2

1714011516
Report to moderator
vjudeu
Hero Member
*****
Offline Offline

Activity: 661
Merit: 1519



View Profile
January 25, 2021, 07:33:51 AM
Merited by xandry (2)
 #2

Quote
At this moment, I will see 1 confirmation of this transaction in my wallet, right?
It depends which chain you will see. If both, it depends on your wallet, but I suppose it is better to show less confirmations than more if there are possible chain reorganizations.

Quote
This means, my transaction will go back to the mempool, right?
Yes, in the same way as all other transactions from that block that were missing in the winning block, except coinbase of course.

Quote
So in my wallet, I will see this transaction as „unconfirmed“, I guess.
Yes.

Quote
Does that mean the settlement transaction will be undone and the coins re-appear in my lightning channel?
Yes, Lightning Network transactions behave exactly the same as any other on-chain transactions.

Quote
Can I always do a RBF (replace by fee) in this case?
It depends if that transaction was marked as RBF before. If so, then you can safely include more inputs and do RBF transaction by keeping previous inputs and outputs intact and adding new inputs and outputs to increase transaction fee. If no node remember previous transaction, the situation is the same as it would never be broadcasted, but it is difficult to be sure that every single node discarded it, so to be safe you should assume that some nodes still have it. You can also rebroadcast exactly the same transaction, especially if mempool is less congested than before.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
.crypto (OP)
Member
**
Offline Offline

Activity: 134
Merit: 14


View Profile
January 25, 2021, 09:01:52 AM
 #3

Thank you for your reply.

I think that I got it now, just one small remark to my initial post: In my post I wrote that the transaction will go back to the mempool after the chain that included my TX "lost".

I think this is not 100% correct, because for the "winning chain" it never left the mempool.

So in worst case for me it will look like it was send back to the mempool and in worst case "1 confirmation" will change to "unconfirmed" but in reality nothing changed, it was just not included into the next block.

I think I got it now  Smiley
Pages: [1]
  Print  
 
Jump to:  

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