7 votes
Accepted

Why is last channel's expiry different in Lightning Network Routes?

After some searching through the BOLT documents and talking with the lnd slack community, I found an answer: B->C. If B were to send 4,999,999 millisatoshi directly to C, it would neither charge ...
ranchalp's user avatar
  • 567
6 votes
Accepted

How would the gossip protocol announce channels from a channel factory?

Pretty much everything would stay the same. If you look at the relevant messages channel_announcement and channel_update we have the following formats: channel_announcement type: 256 (...
cdecker's user avatar
  • 9,319
6 votes

How exactly do I use Lightning Network? Does it even actually exist?

If you recommend "Mastering the Lightning Network" in chapter 2 you find a table of possible Lightning Network implementations: Application Device Lightning Node Bitcoin Node Keystore ...
Rene Pickhardt's user avatar
6 votes
Accepted

How do route hints affect pathfinding?

Generally speaking there are two use-cases that can be facilitated by route hints: Tell the sender about channels that they might not know about. Specifically, if the recipient doesn't announce it's ...
cdecker's user avatar
  • 9,319
6 votes

Why is the default LN channel limit set to 16777215 sats?

The goal was to limit the amount any individual adopter would lose due to bugs in the software. As explained by LN developer Rusty Russell in #bitcoin-lightning FAQ: Why the 0.042 bitcoin limit?: I ...
Vojtěch Strnad's user avatar
5 votes
Accepted

Why was the base_fee for the routing fee calculation of the Lightning Network included?

It was added as a compromise against more complicated ideas, actually. Base plus percentage is a pretty standard fee structure, so I went with it. If I'd been more familiar with the finance world, it ...
Rusty Russell's user avatar
5 votes
Accepted

What are atomic multi path payments (AMPs) and why/how is it being implemented in Lightning Network?

The Current Problem The major challenge in the current routing mechanism is finding channels with sufficient balance on one side of a node to forward an incoming payment. To be more descriptive, the ...
Ugam Kamat's user avatar
  • 7,348
4 votes
Accepted

Lightning Network `channel_update` message Flag clarification

The flags field (2 bytes) has been split into two different (1 byte) fields, the message_flags (most significant bits) and the channel_flags field (least significant bits). Hence the flags value ...
cdecker's user avatar
  • 9,319
4 votes

Is there a way to abort a stuck lightning network payment?

First of all: it is in fact not possible at this time to sort a stuck payment. The htlcs are a contract in which you agree to fulfill a payment if the routing node provides a preimage within a time ...
Rene Pickhardt's user avatar
4 votes
Accepted

How do I find the nodeid of the node issuing a lightning network invoice?

Lightning invoices are signed by the node issuing the invoice in order to verify the signature we need to know the node id. Thus it is included in the invoice. Lightning nodes provide an API to decode ...
Rene Pickhardt's user avatar
4 votes
Accepted

Lightning Network: How was the maximum allowed HTLCs in flight computed?

The rationale is given in the BOLT #3: for the commitment_signed to be under the maximum message size allowed by BOLT #8 (~65kb), and for the penalty transaction to be able to sweep all HTLCs in one ...
Antoine Poinsot's user avatar
3 votes
Accepted

How can I decode the feature string of a Lightning node with BOLT #9?

A bit is a binary digit with the two possible expressions 0 and 1. Binary data is often represented as hexadecimal in writing as that is more compact and human-readable. Hexadecimal (base 16) encodes ...
Murch's user avatar
  • 72.9k
3 votes

Possible race condition(double spend) on HTLC-Timeout in the lightning network?

First of all I think there seems to be a small confusion about the notation. One does not spend a transaction but transaction outputs. In the case of offered htlcs the output is only one (of ...
Rene Pickhardt's user avatar
3 votes
Accepted

Limits on lightning channels and payments

Stuff like this can usually be found in the lightning-rfc aka BOLT (basics of lightning technologies) which is the formal protocol specification. Currently channel capacity can't succeed 1/6 of a ...
Rene Pickhardt's user avatar
2 votes
Accepted

Are channel ids inherently linked to node ids in the Lightning protocol?

BOLT#7 outlines in the rules for receiving channel_announcement messages, that any previously known channel with differing node_ids, should result in the blacklisting of all associated nodes for both ...
Mark H's user avatar
  • 3,324
2 votes
Accepted

What is lnprototest exactly? Can it be used to test an individual Lightning implementation or just interoperability between implementations?

Rusty Russell discussed lnprototest (repo link) during the August 2020 Sydney Socratic Seminar. What is lnprototest exactly? It is a pure Python3 test system and some packages to interface with the ...
Michael Folkson's user avatar
2 votes

How can I accept Lightning channels with fewer confirmations in LDK?

According to the BOLT #2 specs, the non-funding counterparty indicates which confirmation depth it is willing to accept via the minimum_depth field in the accept_channel message. In LDK you can ...
tnull's user avatar
  • 101
2 votes
Accepted

Lightning: why don't balances add up to capacity?

But that still leaves about 330 sats unaccounted for You are probably missing the anchor output contained in the commitment transaction in your calculation. Its value is exactly 330 sats. Note: this ...
Antoine Poinsot's user avatar
2 votes

Alternative fee functions for the Lightning Network

I'm not familiar with any proposals to add new variables to the fee function. There have been discussions on HODL invoices which would (if enabled on the Lightning Network) require additional fees ...
Michael Folkson's user avatar
1 vote
Accepted

Does the Breach Remedy Tx hinge on the remote party's revocation secret exclusively?

You are right that in the BOLT3 Scripts the revocation path pays only to a single public key, the revocationpubkey. In order to keep the same restriction with a single pubkey, the revocationpubkey is ...
Antoine Poinsot's user avatar
1 vote

What would happen to a LN channel if one of the parties followed a minority fork of Bitcoin?

A LN channel (in its current form) is a 2-of-2 multisig UTXO coupled with pre-signed transactions each channel party holds onto, either to force-close the channel or to punish the other party for ...
Vojtěch Strnad's user avatar
1 vote

Delay of a revocable transaction in the Lightning Network

The to_self_delay is a parameter set by the funder of a channel when initiating its creation. The fundee may or may not like it and as a consequence accept or refuse the opening request. As currently ...
Antoine Poinsot's user avatar
1 vote

Does "fail the channel" mean unilateral close in BOLTS?

The meaning is defined in BOLT #5 Failing a Channel.
Scott Driscoll's user avatar
1 vote

Reuse of payment hash in Lightning Network

R cannot fail the payment once they have released the preimage. The commitment transactions which were agreed before R released the preimage contain a condition where the payment_hash is embedded in ...
Mark H's user avatar
  • 3,324
1 vote
Accepted

BOLT 11 - Why is the description field limited to 639 bytes?

Why is the description field limited to 639 bytes? Every field in lightning invoice is of the form: type (5 bits) data_length (10 bits, big-endian) data (data_length x 5 bits) The data_length ...
Ugam Kamat's user avatar
  • 7,348
1 vote
Accepted

BOLT #7: Can receiving node requirements in channel_update message give rise to malicious attacks?

According to my understanding the receiving node will first check the signature of related the dsha256 of the entire message before verifying the timestamp and not check the remainder of the message ...
Mark H's user avatar
  • 3,324
1 vote
Accepted

Does the `HTLC fail` routed back to sender using same path if intermediate node does not have enough capacity?

The failure message must go along the same route it came, because any intermediate step does not know where the payment was originally sent from. Every hop only knows the previous and next hops in the ...
Mark H's user avatar
  • 3,324
1 vote

Why is the obscured commitment number necessary in lightning commitment TX's?

Looking at the c-lightning code I find this call: txs[0] = commit_tx(ctx, &channel->funding_txid, channel->funding_txout, channel->funding_msat / 1000, ...
Rene Pickhardt's user avatar
1 vote

Are channel ids inherently linked to node ids in the Lightning protocol?

I think what you ask is not possible when we want to follow the protocol for the following reasoning: (sorry I am a bit weak on BOLT 07) If you look at BOLT 07 and the channel announcement messages ...
Rene Pickhardt's user avatar
1 vote

High level description of modern Lightning network (as per BOLT)

There is an article series on medium by rusty Russell (one of the main authors of the BOLTs) The first part can be found at https://medium.com/@rusty_lightning/the-bitcoin-lightning-spec-part-1-8-...
Rene Pickhardt's user avatar

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