2

I know it's possible to get number of public Lightning channels from Lightning Network gossip and some implementations offer network graph and it can be queried. But it's not possible to see private non-routing channels there.
Can channel opening transactions be identified checking the blockchain? if not, what's the best way to estimate?
This is more of a theoretical query to understand the structure of messages used in lightning network channel opening bitcoin transactions.

marked as duplicate by Rene Pickhardt, chytrik, Pieter Wuille, Andrew Chow Oct 16 at 22:00

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

They can only be detected when force closed and there are still pending htlcs otherwise they look like a spend from a 2-2 multisig wallet. I've been told some people try to do chain analysis and machine learning to predict private channels. I highly doubt that this is reasonably possible.

Although there is one thing to consider. If a node has public and private channels the funds get mixed. Implementations currently do not do separate bookkeeping of those outputs which is a privacy issue and an attack vector for what you want. However if a new ln node is set up and it only has private channels it will be hard to detect those on chain (unless the Chanel partners later reuses / mixes the outputs with some fire public channels.

  • can't companies do some analysis based on lightning invoices which contain a path to the private channel? Just to give you an example, let us say I own a node with provider A and you provide me an invoice which contains the private channel info I would need to include in the onion. My provider detects that and uses it to enhance the data of the known private channels. – Ugam Kamat Sep 28 at 4:36
  • 1
    A private channel does not need to exist on chain. It is not even possible to prove that a private channel's short_channel_id points to a correct channel because you don't have access to the funding public keys in order to recreate the redeem script, and there are no signatures to prove that the transaction referred to by the short_channel_id is indeed owned by the recipient and the forwarding node specified in the BOLT11 invoice. It is best to assume that the short_channel_id specified in an invoice is just some arbitrary identifier which tells the last hop how to forward the payment. – Mark H Sep 28 at 6:11
  • @MarkH that's a very valid point. – Ugam Kamat Sep 28 at 6:45
0

I'd argue it is possible to get some estimate, when doing a time series analyses of 2-to-2 multisig spendings. Number of occurrences (or gowth rate) likely changed, when lightning got live. Question is how accurate such an estimate can be.

Not the answer you're looking for? Browse other questions tagged or ask your own question.