Published on: 2022-12-13T20:36:02+00:00
In response to Ben's question, SomberNight explained that the scenario of forwarding an HTLC along a channel without sufficient funds is handled before the update_fail_htlc message. When the recipient node receives the update_add_htlc message, it performs sanity checks and if it detects that the payment cannot be supported, it will not commit it to the commitment transaction. In this case, the recipient has the option to simply close the transport connection, causing the update_add_htlc message to be forgotten and restoring the channel to a usable state.To further clarify, BOLT #2 specifies that when a node receives an amount_msat that it cannot afford at the current feerate_per_kw, while still maintaining its channel reserve and any to_local_anchor and to_remote_anchor costs, it should take appropriate action. This can involve sending a warning and closing the connection or sending an error and failing the channel. The context emphasizes that there is no need to wait for an invalid transaction to be received before sending an update_fail_htlc.Overall, the handling of update_fail_htlcs in the scenario described by Ben involves sanity checks performed by the recipient node upon receiving the update_add_htlc message. If the payment cannot be supported, the recipient node can choose to close the connection, leading to the update_add_htlc message being discarded and the channel returning to a usable state.
Updated on: 2023-08-01T00:56:43.738411+00:00