Noice! I love to read about you digging in to understand this tech. 😁

Two comments:

1. There is a distinction between public (announced) channels and private (unannounced) channels. (They were poorly named, neither type of channel is private.) Routing nodes use announced channels so that others can route payments over them. Non-routing nodes typically don't announce their channels over the peer-to-peer network because they are not interested in the routing fees or in the headaches this causes (rebalancing channels, liveness requirements, etc.). In order to receive a payment over an unannounced channel you need to include a 'routing hint' in the invoices you create (this is why it's not private). Your node software will handle this for you, but its good to be aware of how it works. This is the cause of a lot of routing errors.

2. Invoices have an expiration. So even if you wanted to open a channel to pay a single invoice it would most likely take too long to get confirmed on chain. This is true for BOLT11 invoices, which are the original, most basic, kind of invoice that every lightning wallet and node understands. There is a new spec for BOLT12 invoices that don't time out that is slowly gaining adoption, so look out for those in the future they are super cool.

Reply to this note

Please Login to reply.

Discussion

This is the best starting place to go deep. https://github.com/lnbook/lnbook

TIL this book is free online. 🤯

Foss is the way :)

And its companion book for on-chain bitcoin. Both are freely available online. You don't have to read them in any particular order. https://github.com/bitcoinbook/bitcoinbook