How do Lightning Explorers like 1ML register closed channels?

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?

gijswijs

Posted 2019-04-23T12:49:00.037

Reputation: 175

Answers

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.

Rene Pickhardt

Posted 2019-04-23T12:49:00.037

Reputation: 6 565

Thank you for this. This is how I understood it to work, but I wanted to be sure I didn't overlook something.gijswijs 2019-04-23T12:59:49.007