lightningnetwork / lnd

Lightning Network Daemon ⚡️
MIT License
7.65k stars 2.07k forks source link

neutrino: add distinct Neutrino sub-server #5387

Open Roasbeef opened 3 years ago

Roasbeef commented 3 years ago

As is, when running a neutrino node, the only way a user can really keep track of what's going on is to check out the logs. Other than that, they aren't able to add new peers, fetch filters/headers manually, re-trigger a rescan, etc. In order to enhance the external facing capabilities of neutrino, we shoul dadd a new sub-server that's online all the time, but only "available" when the neutrino client mode is actually activated.

Steps To Completion

ErikEk commented 3 years ago

If no one else wants it, I will gladly do it.

ErikEk commented 3 years ago

Update: I have made some progress already. Done with:

Roasbeef commented 3 years ago

@ErikEk any updates/comments/concerns on the PR?

ErikEk commented 3 years ago

@Roasbeef I can release a work-in-progress right now. Still not happy with the handling of the re scanning mechanism I've built. Edit: Draft on the way...

arshbot commented 3 years ago

that's online all the time, but only "available" when the neutrino client mode is actually activated.

What is the reasoning behind keeping a subserver online but not available? This would make sense if one could activate neutrino client mode without restarting lnd

Roasbeef commented 3 years ago

What is the reasoning behind keeping a subserver online but not available? This would make sense if one could activate neutrino client mode without restarting lnd

If neutrino isn't active, then the sub-server wouldn't be able to do anything. We don't explicitly support switching from a full node backend to a neutrino one. It may work in most cases, but we haven't explicitly verified no internal state is incorrectly mutated during the process.

Roasbeef commented 2 years ago

Everything here but rescanning is implemented in: https://github.com/lightningnetwork/lnd/pull/5652