talaia-labs / rust-teos

The Eye of Satoshi - Lightning Watchtower
https://talaia.watch
MIT License
128 stars 62 forks source link

Interface for viewing watchtowers #228

Open orbitalturtle opened 11 months ago

orbitalturtle commented 11 months ago

This is an idea I've had for a while. Not sure if this is necessarily the best place to put this, since it isn't teos-specific, but figured I'd jot it down here for discussion or to see if anyone is interested.

It'd be really nice to have a simple website where watchtowers are listed. For now, there are lists like this, which are very helpful. https://github.com/talaia-labs/rust-teos/discussions/158 But it might be nice to have an easy website to click to, and to be able to see other information about each watchtower.

One very important factor that comes to mind is having a running idea of whether the tower is actually up or down. The runner of this website could set up a cron job that pings all the towers every so often (using the ping api endpoint if that seems sufficient?) to make sure they're still up and the interface could show each tower's current status. Along these lines, it could track what percentage of the time the tower is actually running. It could show estimates of how often towers go down. This information would be quite nice for users to have: If a tower is up 99% of the time, seems better to connect to that than one that's only up 50% of the time.

Perhaps anyone could post their tower to this website. Maybe they'd just have to authenticate with an LSAT (or something) to prevent spam.

Side note: This could definitely include lnd watchtowers as well! Not sure if there are any other implementations.

sr-gi commented 11 months ago

I think this is a great idea. I hope someone with good front-end skills picks it up, otherwise, I may suggest it as a SoB project for the next edition.

lujakob commented 10 months ago

@orbitalturtle I have been studying the https://doc.rust-lang.org/stable/book for the last couple of days and need some pet project. I will give this a try. I will build the backend/API in Rust and frontend in React.

lujakob commented 10 months ago

@sr-gi do you know how can I ping one of those watchtowers, e.g. yours in https://github.com/talaia-labs/rust-teos/discussions/158#discussion-4599480 - could you post me the curl request please?

mariocynicys commented 10 months ago

@lujakob curl -i towerurl.tld:9814/ping

Also for tor, you can use this: curl -is --socks5-hostname 127.0.0.1:9050 toweronionaddress.onion:9814/ping assuming you have a tor proxy daemon running on localhost:9050

lujakob commented 10 months ago

@lujakob curl -i towerurl.tld:9814/ping

Also for tor, you can use this: curl -is --socks5-hostname 127.0.0.1:9050 toweronionaddress.onion:9814/ping assuming you have a tor proxy daemon running on localhost:9050

I tried curl -i 03b0a47228c8b36477002d745cf578a4db2b7c2ba2e2aee2c65419053e4375a1dd@satseye.slicksparks.ky:9814/ping and get

HTTP/1.1 405 Method Not Allowed
content-type: text/plain; charset=utf-8
content-length: 23
date: Thu, 17 Aug 2023 15:27:44 GMT

HTTP method not allowed%
mariocynicys commented 10 months ago

I tried curl -i 03b0a47228c8b36477002d745cf578a4db2b7c2ba2e2aee2c65419053e4375a1dd@satseye.slicksparks.ky:9814/ping and get

You don't need the tower pubkey included to ping it. Also curl wouldn't interpret it the as intended anyways.

The tower you are pinging probably doesn't have the /ping endpoint yet (because it was introduced recently in #200)

This tower curl -i teos.mariocynicys.cf:9814/ping should return 200 OK since it applies the /ping patch.

orbitalturtle commented 10 months ago

@lujakob hellz yes