75 votes
Accepted

How does the Lightning network work in simple terms?

The Lightning Network is a collection of payment channels between pairs of nodes. To create a payment channel, two users commit funds to a UTXO under shared control. The shared funds allow the users ...
Murch's user avatar
  • 74.5k
12 votes
Accepted

Closing a channel in Lightning Network

The first three scenarios are indeed possible, the last one is identical to the second. This is called a collaborative close. It has the advantage of using a lower on-chain fee since the transactions ...
cdecker's user avatar
  • 9,418
11 votes

How does the Lightning network work in simple terms?

Lightning allows you to lock coins between two wallets, and then send special transactions between each wallet which only become "real" when they are added to the blockchain. But you don't do that, ...
Wouter Schut's user avatar
7 votes
Accepted

Can a channel be closed while the funding tx is still stuck in the mempool?

Technically you can double spend the output that was used for the funding TX with a higher fee. Then the channel will never be opened. Practically I don't think any of the lightning network ...
Rene Pickhardt's user avatar
7 votes
Accepted

Does eltoo require trusting watchtowers not to close channels?

I was intrigued by your question and tried to figure out whether any trustless solutions have been proposed. I found a [Lightning-dev] mailing list thread positing a rough idea by ZmnSCPxj. Z-man ...
Murch's user avatar
  • 74.5k
7 votes
Accepted

Eltoo: Does the relative locktime on the first UTXO set the lifetime of the channel?

Yes, you’re reading it right. The construction presented here has a limited lifetime since the Settle_0 transaction becomes valid at some point. However, later in the paper, the authors introduce an ...
Murch's user avatar
  • 74.5k
6 votes

How does the Lightning network work in simple terms?

Lightning Network is a layer on the top of the Bitcoin Blockchain. Le'me go in more detail. It is a technology that makes bitcoin work faster, scalable and improve bitcoin in such a way that Bitcoin ...
Rajesh Prajapati's user avatar
6 votes
Accepted

In a Lightning Network who commits to the blockchain the final transaction?

So let's imagine a Lightning Network made up of thousand of nodes. Transactions are routed until the moment comes where all the channels need to be closed and commited I presume. Which node actually ...
Ava Chow's user avatar
  • 70k
6 votes

Can a channel be closed while the funding tx is still stuck in the mempool?

I started out writing this answer while trying to do it myself, but then found out that we don't yet have tools to manually edit partially signed Bitcoin transactions (PSBTs) which is the very last ...
cdecker's user avatar
  • 9,418
5 votes
Accepted

Would it be possible for miners to discriminate Lightning Network transactions?

The most distinguishing feature of a LN channel-opening transaction would be an OP_OR in the scriptPubKey of the channel-funding UTXO, where one side of the OP_OR requires two signatures, and the ...
Jestin's user avatar
  • 8,812
5 votes
Accepted

Lightning close-channel transaction example?

The actual script implemented on Lightning Network is a little bit different from what you quoted. This is the script below and the specification is here OP_IF # Penalty transaction <...
ogw_yuya's user avatar
  • 635
4 votes

Does LN require an on-chain "emergency lane" to mitigate systemic risks?

As far as I understand this is not needed. Let us assume we have an congested mempool and someone publishes an old channel state. This transaction will not be mined directly as the mempool is ...
Rene Pickhardt's user avatar
4 votes

Can funds from a LN channel be recovered if both participants suffer data loss?

I don't know exactly how static channel backups are implemented in lnd and what is being saved there but I can give you some general thoughts and at least a partial answer. If A and B both lost ...
Rene Pickhardt's user avatar
4 votes
Accepted

How do I set the our_to_self_delay parameter?

In Lightning the to_self_delay parameter is influenced by your peer. When a node opens a channel to yours, they advertise the minimum they are going to accept. On Core-Lightning you can set the ...
Antoine Poinsot's user avatar
4 votes

Eltoo: Does the relative locktime on the first UTXO set the lifetime of the channel?

Thanks for the feedback! I replaced "Update: 0" with a "Funding: 0" which is put on-chain when the channel is opened and the channel parties have both signed the first off-chain &...
Richard Myers's user avatar
3 votes
Accepted

For how long has a channel been inactive?

You can look for "last_update" field in getchaninfo output. Below I also submitted https://github.com/edouardparis/lntop console screenshot which does the same thing.
Ilya Evdokimov's user avatar
3 votes
Accepted

Distinguishing Lightning channels on-chain

A lightning funding transaction is a P2WSH transaction, which appears on chain as paying to some random-looking script hash, but the redeemScript which can unlock and spend the money is not revealed ...
Mark H's user avatar
  • 3,334
3 votes

Lightning - Question about force-closures of channels and its impact on recovering funds

Sorry René, it seems you fell into a Bcasher trap here ;) OP phrased his question very vaguely and then proceeded to cry CENSORSHIP when you admitted there might be some truth contained in what he ...
stefanwouldgo's user avatar
3 votes
Accepted

Why is my LND node closing channels?

Many! If you look at the BOLTs ( lightning RFC) you will find many situations in which nodes must fail a channel (meaning a force close) if something happens in an unexpected way while communicating ...
Rene Pickhardt's user avatar
3 votes
Accepted

How does Lightning Node communicate with Bitcoin node?

Lightning Channels are just unbroadcast cached Bitcoin transactions. So yes, Lightning Nodes need to keep abreast of transactions on the Bitcoin blockchain to notice new channels getting opened, ...
Murch's user avatar
  • 74.5k
3 votes

Eltoo: Does the relative locktime on the first UTXO set the lifetime of the channel?

Current thinking is (I believe) just to have a funding utxo on chain ("Setup_0") which is always spent by some update transaction ("Update_1" etc; there is no "Settle_0") ...
Anthony Towns's user avatar
2 votes

How do Lightning channels interact with the blockchain?

Does opening a channel mean that a 2-to-2 multisig address (3xxxx) is created? Yes. But it's not always a 3... address. Such addresses must be segwit, and there are two types: nested (3... address) ...
Ava Chow's user avatar
  • 70k
2 votes

How is a doublespend prevented in the Lightning Network?

Alice and Bob open a channel with a fixed balance equal to the amount in the multi-sig address. The channel opens with a balance sheet which includes proof for both Alice and Bob’s balance. Every ...
D.Mistry's user avatar
2 votes

How is a doublespend prevented in the Lightning Network?

Based on your comments, I think one fundamental issue you're missing is that to pay with LN, the other party has to be online at the time. There's no question of "what happens if Bob is offline" ...
Meni Rosenfeld's user avatar
2 votes

How is a doublespend prevented in the Lightning Network?

Doublespends are not possible, because a payment on LN is only considered finalized once both payment channel owners have revoked the previous state of the payment channel by handing their partner a ...
Murch's user avatar
  • 74.5k
2 votes

When running a Lightning Network hub, who pays the fees when a transaction has to be broadcast to the blockchain?

It's possible that a node in the middle either either intentionally or unintentionally does not pay the next node down the line. The recourse is for the node that did not get paid to broadcast the ...
Murch's user avatar
  • 74.5k
2 votes

Lightning incentive for micro-cheating?

When the total capacity of the channel is less than it costs to close the channel, neither party has an incentive to close the channel. If broadcasting an outdated commitment transaction returns some ...
Murch's user avatar
  • 74.5k
2 votes
Accepted

How do I prevent lnd from participating in new channels?

You can set the option --maxpendingchannels=0 to disallow peers to open channels to your node.
guggero's user avatar
  • 238
2 votes
Accepted

How can a closing transaction in LN have more than 2 outputs?

There are 3 ways to close a channel. The good way: mutual close The bad way: force close The ugly way: revoked close with penalty transaction In the good case the closing tx should have 2 outputs as ...
Rene Pickhardt's user avatar
2 votes
Accepted

How and When are lightning channels disabled?

This is a tricky question as it tackles the difference between what the protocol supports and what implementations provider as an API. On a protocol level channels are enabled / disabled via an ...
Rene Pickhardt's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible