Bitcoin Forum
May 29, 2024, 08:05:48 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin lightning OPEN/CLOSE transactions  (Read 162 times)
thom88 (OP)
Member
**
Offline Offline

Activity: 75
Merit: 48


View Profile
October 12, 2021, 04:04:58 PM
 #1

I have been trying to find more details about "how lightning channels" are opened but I wasn't able to find much.
The question is only related to the bitcoin blockchain and not layer2 transactions once the channels are opened. So what does a transaction do, in order to open and close a channel and how can they be distinguished from other transactions if this is even possible.

As far as I know, you need to

a) open a channel
b) close a channel (if you wish so)

Those transactions are done ON CHAIN and I wonder if there is examples that someone could/would share.

hugeblack
Legendary
*
Offline Offline

Activity: 2520
Merit: 3714


View Profile WWW
October 13, 2021, 04:30:16 PM
 #2

Bitcoin lightning off-chain (layer2) so that Bitcoin transactions are not recorded (not need to be mined and those fast TPS.)
layer2 lightning is just nodes that run lightning software
you can open a Lightning channel by depositing bitcoin in multi-sig address so that this transaction is recorded on blockchain.
after that you get bidirectional payment channel or you can Routing your payment Over Lightning.
when you close your channel that balance of that multi-sig address change with your last balance update/
thom88 (OP)
Member
**
Offline Offline

Activity: 75
Merit: 48


View Profile
October 13, 2021, 06:44:31 PM
 #3

Bitcoin lightning off-chain (layer2) so that Bitcoin transactions are not recorded (not need to be mined and those fast TPS.)
layer2 lightning is just nodes that run lightning software
you can open a Lightning channel by depositing bitcoin in multi-sig address so that this transaction is recorded on blockchain.
after that you get bidirectional payment channel or you can Routing your payment Over Lightning.
when you close your channel that balance of that multi-sig address change with your last balance update/

Do you happen to know (even if just testnet) examples of such opening and closing/settle transactions?
Isn't there any special bitcoin script placed in those transactions? So its a simple 2of2 output?
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1540
Merit: 7455


Farewell, Leo


View Profile
October 13, 2021, 07:00:35 PM
 #4

Do you happen to know (even if just testnet) examples of such opening and closing/settle transactions?
Here's mine in testnet where I'm depositing 0.15 tBTC to a lightning node: e8cbe013f7f5f4087aaf729b9b7eae79f5aabddb188ce4cc562cdb2a591251f8.

Isn't there any special bitcoin script placed in those transactions? So its a simple 2of2 output?
AFAIK, each settle transaction has an OP_RETURN sign.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
DaveF
Legendary
*
Online Online

Activity: 3486
Merit: 6316


Crypto Swap Exchange


View Profile WWW
October 13, 2021, 08:31:53 PM
Merited by hugeblack (2)
 #5

These are 2 unrelated transactions but here is a channel open (just now):
https://mempool.space/tx/44cb233d50dd5280fca4fdf50e261fc21bc6f9ffd2b1d074c3e3fdac66bef8a5

And here is a channel close (a month ago):
https://mempool.space/tx/2517f03a02574db8c38152b48104596002c4fcbefb43b1c9a508ef9764ea4358

But what happens for routing on the lightning network itself you really can't see.
There is a long thread here: https://bitcointalk.org/index.php?topic=5158920.0 that you can read and ask questions in.
For 'deep dive' technical stuff you also might want to also take a look here: https://docs.lightning.engineering/community-resources/resource-list at the Wikis, Guides & Resources section

-Dave

█▀▀▀











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











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

Activity: 1876
Merit: 3132



View Profile
October 24, 2021, 10:21:04 PM
Merited by BlackHatCoiner (3)
 #6

Do you happen to know (even if just testnet) examples of such opening and closing/settle transactions?

Take a look at this blog entry. There are multiple ways of settling the balance of a channel on-chain. Here's an example of a dual-funded channel opening transaction.

Isn't there any special bitcoin script placed in those transactions? So its a simple 2of2 output?

The funding transaction output is locked with a simple 2 of 2 multisignature script. Before that transaction is broadcast by the funder, both parties sign the first commitment transaction which spends that output. Commitment transactions contain more sophisticated scripts, especially when there are unsettled HTLCs.

AFAIK, each settle transaction has an OP_RETURN sign.

OP_RETURN would make the coins unspendable. There is no reason why Lightning would use it.
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!