1

I want to do analytics on unilaterally and mutually closed channels. To do so I need to scan know when channels close. It seems to me there's no other way than to actively scan the network graph for closed channels.

But I'm not sure if that's the right approach. How do explorers like 1ML do this?

2

Every Chanel that us public is announced on the gossip protocol and in the channel announcement message linked to a funding transaction. What you can do (and what 1ml most likely does) is to save spent funding TX as close channels. As the gossip protocol will only forward channel announcement messages for open channels (those where the funding TX was not spent) it will be impossible to query your lightning node for closed channels from the past. You will only be able to collect this data for the future. Or you could crawl 1ml if their robots.txt allows this.

  • Thank you for this. This is how I understood it to work, but I wanted to be sure I didn't overlook something. – gijswijs Apr 23 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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