Skip to main content
Share Your Experience: Take the 2024 Developer Survey
22 votes

How are paths found in Lightning Network?

Note: This answer was written in Spring 2016 and has since been overtaken by an actual spec and multiple implementations. I'm hoping to update this answer shortly. Summarizing mostly from r/bitcoin: ...
Murch's user avatar
  • 75.7k
17 votes
Accepted

Is centralization in the Lightning network inevitable? Why (not)?

“Centralization” is now a word constantly repeated but is one that, generally speaking, no one tries to define accurately. ---Alexis de Tocqueville, Democracy in America, Vol.1, Part 1, ch.5. ...
David A. Harding's user avatar
11 votes
Accepted

What criteria should be taken into account when selecting nodes to create new lightning channels with?

I agree with Alex Bosworth and I have pointed this out about one year ago when I have filed an issue about the strategy used by the LND autopilot which basically looks for nodes with a high channel ...
Rene Pickhardt's user avatar
9 votes
Accepted

Routing in Bitcoin Lightning Network

There's no document explaining step-by-step, because the routing decisions are not part of the protocol (the BOLTs). It is purely client-side decision making about how to find a route through the ...
Mark H's user avatar
  • 3,334
9 votes

What are the downsides of Hodl Invoices?

I didn't attend the conference but here is my take on Hodl invoices. In a normal Lightning payment, the sender pays an invoice which contains the payment hash and the payee releases the pre-image to ...
Ugam Kamat's user avatar
  • 7,407
9 votes

What does TLV stand for?

TLV stands for type-length-value. It's an encoding scheme used when protocols allow for optional elements in their messages. The type is a label telling you what field you're looking at, the length ...
Murch's user avatar
  • 75.7k
8 votes

Can someone please explain how Lightning paths are working and what effect large centralized hubs have?

If you want to route a lightning payment via your node, your channel(s) must hold at least a balance of the to-be-routed amount, right? If not, your node by definition cannot be chosen as a potential ...
Rene Pickhardt's user avatar
7 votes
Accepted

Is lightning network limited by the 'size' of channels?

In fact, it's worse: payment channels can only transfer the balance that belongs to the sender in it. So, if David and Rob each paid 25BTC into the channel, David can at most send 25 BTC to Rob.— ...
Murch's user avatar
  • 75.7k
7 votes
Accepted

Non-bidirection payment channels for lightning network

There's no fundamental reason why you couldn't use a non-bidirectional link. The onion routing protocol of lightning is ignorant of the channel between two nodes. Hypothetically, if two lightning ...
Nick ODell's user avatar
  • 29.4k
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
7 votes
Accepted

How many paths are tried on average before a payment succeeds in Lightning?

I don't think there is a Public dataset online with an answer to your question. This would also be extremely hard to create as the results could change a lot depending on which node is doing the ...
Rene Pickhardt's user avatar
6 votes

How are paths found in Lightning Network?

Everything is described in detailed in the corresponding BOLT specifications: https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md BOLT #7: P2P Node and Channel ...
mably's user avatar
  • 86
6 votes
Accepted

Make payments Lightning without Invoice?

With the current specification it is not possible to make a spontaneous payment to somebody on the network. However, this will likely change very soon, as it is one of the features on the roadmap and ...
cdecker's user avatar
  • 9,508
6 votes
Accepted

What happens if R is not revealed by one of Lightning Network nodes? (Payment cancelation)

The situation is less worse than you seem to assume. If node C disappears the channel A,B won't be affected. Also there is no direct need to affect the channel B, C and C, D. So most channels will ...
Rene Pickhardt's user avatar
6 votes
Accepted

What is the rationale for the Lightning network's path length limit (20 hops)?

The onion routing in Lightning is based on the Sphinx Mix Format described in this paper. The situation is different from Tor We don't have entry and exit nodes in Lightning as all nodes are inside ...
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,508
5 votes

How does LN solve the liquidity problem?

Whoever made that example doesn't seem to understand how the lightning network works. I think the creator of this scenario is confusing how the lightning network functions with how traditional ...
Jestin's user avatar
  • 8,812
5 votes
Accepted

Is it possible to design a hardware wallet that can allow operation of a routing Lightning node with the security level of a hardware wallet?

Yes, a hardware wallet could be designed for use on the Lighting Network, but no, there's no such thing as eliminating risk of theft. There is always risk of theft, no matter what you do. A hardware ...
Jestin's user avatar
  • 8,812
5 votes
Accepted

How do custodial lightning wallets work?

I am sorry to say but your understanding is wrong. When you send x btc to Bluewallet you don't open a channel. You just give them your Bitcoin. Bluewallet and other custodial wallets run one (or ...
Rene Pickhardt's user avatar
5 votes
Accepted

How scalable is the current routing implementation for lightning?

I am not sure if scale is the term you are looking for when discussing potential problems with routing. But I will try to focus on scaling when giving the answer. That being said my answer would ...
Rene Pickhardt's user avatar
5 votes
Accepted

Why do Lightning packets include channel ids if forwarding is non-strict?

I guess this has historical reasons. The short channel ids where there first in the onion format. C Lightning even today does not support multiple channels between 2 nodes. Lnd on the other hand does. ...
Rene Pickhardt'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,407
5 votes
Accepted

How does Lightning Network over TOR work?

Running lightning node over TOR is no different than running it over normal IP connection. Sending payment, fulfilling incoming payment, sending error messages etc. would happen in the exact same way ...
Ugam Kamat's user avatar
  • 7,407
5 votes
Accepted

Transaction size limit across a single path in a Lightning Network and fee earned

The maximum size for HTLC's are currently defined by max_htlc_value_in_flight_msat and is roughly 42mBTC. The max_concurrent_htlc that you mention seems to be the max_accepted_htlcs and states how ...
Rene Pickhardt'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 exactly are route hints?

Routehints are nothing complex. If you take a look at the code used to generate them routehints are pretty simple. The code simply grabs the first 20 (arbitrary limit) or so nodes with whom it has ...
arshbot's user avatar
  • 1,788
4 votes
Accepted

Do relay nodes need to have money in order to relay transactions?

No, there is no work around for this. If a channel's balance is completely allocated to one side, the channel can only be used to move funds in one direction. Additionally, a channel whose balance is ...
Murch's user avatar
  • 75.7k
4 votes

Do the channel balances get publicly announced in real-time on Lightning Network?

Channels do not publicly announce their balance for several obvious reasons It would be a huge privacy concern if balances could be viewed live on the network. People could monitor large parts of the ...
Mark H's user avatar
  • 3,334
4 votes

How is node capacity determined on 1ML.com?

Since 1ml is closed source I obviously cannot be 100% sure how it calculates the capacity of your node. But from my experience I can say that it does it in the same way as any other lightning node do ...
Rene Pickhardt's user avatar
4 votes

Removing "hub-and-spoke" property of Lightning Network?

No as this algorithm introduced in the paper is not very efficient. As far as I understood the paper when it came out basically everyone needs to be involved in finding the path for a single payment. ...
Rene Pickhardt's user avatar

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