lightningnetwork / lnd

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

rpc: add ability to send custom errors to peer #4731

Open Roasbeef opened 3 years ago

Roasbeef commented 3 years ago

Since we now store the last 5 or so errors for a given peer, we should add a new command to allow users to send errors to each other, but only if they have an active channel with the other peer ideally. This can be useful for debugging purposes, as it serves as an encrypted messaging mailbox between node operators. For example, if a peer has bad uptime, you can send them a message that you're about to close out the channel to them if they get their act together. The messages should target an individual channel ID, and we should make sure that it doesn't result in a connection hang up. This is also related to the idea of adding proper error codes int o the spec as well so we can possibly programmatically handle certain classes of these errors.

Roasbeef commented 3 years ago

Related to https://github.com/lightningnetwork/lnd/issues/5602