1

(1) Is there any tool by which we can know the current number of nodes (participants as payer/payee) and number of channels in Lightning Network with an accurate estimation?

(2) As a more advanced query, is it also possible to know the topology of this graph? (vertices as participants and edges as channels)

1

You can try recksplorer at https://rompert.com/recksplorer/ to get a node count, or drill down on individual nodes:

Recksplorer

Source is at: https://github.com/chemicstry/recksplorer

2

As for (1) yes you can use tools like the recksplorer as suggested by JBaczuk but you can also query the gossip store of your lightning node directly. Each node has to know the entire topology of the network for source based routing. C-Lightning provides a command line interface to retrieve this data.

However nodes can have private channels or be even private themselves. So with the Recksplorer which utilizes the Gossipstore and with the Gossip store you will only get a fraction of the Lightning Network. People Using Bitcoin Lightning Wallet or Eclaire mobile Wallet will currently not be public.

As for (2) I have created an autopilot for c-lightning with the python client library which analyzed the graph with the networkx module of python. you can check out the code at this pull request: https://github.com/ElementsProject/lightning/pull/1888 This should give you a starting point for doing more statistics about the topology.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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