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.
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 – 2019-09-28T04:36:40.047
1A private channel does not need to exist on chain. It is not even possible to prove that a private channel's
short_channel_idpoints 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 theshort_channel_idis indeed owned by the recipient and the forwarding node specified in the BOLT11 invoice. It is best to assume that theshort_channel_idspecified in an invoice is just some arbitrary identifier which tells the last hop how to forward the payment. – Mark H – 2019-09-28T06:11:22.220@MarkH that's a very valid point. – Ugam Kamat – 2019-09-28T06:45:32.290