Receiving via unpublished channels



Summary:

In a recent Lightning-dev mailing list, ZmnSCPxj raised some issues regarding creating invoices with `r` fields. In order to receive via an unpublished channel, one needs to know the onLightning fees that the other side of that channel wants to charge. However, in case of an unpublished channel, we do not send channel_announcement, and in that case we do not send channel_update. To solve this issue, an idea was proposed to simply send `channel_update` as soon as the channel locks in. It is suggested to standardize this behavior regardless of published/unpublished state. It seems back-compatible: software which does not expect this behavior will simply drop the `channel_update` (as they do not follow a `channel_announcement`). ZmnSCPxj also had some questions regarding `channel_update`. He asked if `channel_update` sends only for `announce_channel == 0`(in `open_channel.channel_flags`) and whether `channel_update` sends every time after `funding_locked` sending(established and reconnection). C-lightning always sends `channel_update`, while for C-lightning, the temporary ones are sent after `funding_locked` has been sent by both sides, as well as reconnection (only if both sides have sent `funding_locked`). The only time they are not, is if the channel is shutting down (and so any fee updates would be pointless, as the channel will no longer be useable for forwarding, sending, or receiving) or the channel has already achieved the announcement depth. After announcement depth, "normal" `channel_update` should get sent after a `channel_announcement`, and not the temporary ones. The intended way to get the onLightning fee rates to put into invoice `r` fields for private routes was also discussed.


Updated on: 2023-05-24T23:38:25.963962+00:00