Published on: 2021-04-24T05:57:46+00:00
In a recent discussion, Joost Jager corrected a statement made by Rusty about the lightning network payment process. Rusty had mentioned that one needs to know the node_id of the next node for the payment, but Joost pointed out that this is not entirely true. According to the specification, if the node_id is incorrect, one should send an `update_fail_malformed_htlc` message with a failure code of invalid_onion_hmac. Node N then converts this into its own failure message. Rusty suggested that it could be converted to `unknown_next_peer` instead.Rusty also acknowledged that this error is not common on modern networks and that onion implementations have been solid. However, Joost's comment sparked a discussion on Twitter, where he explained that knowing the node_id of the next node can still be important in certain scenarios. For example, if someone offers you an invoice, they can probe the rest of the network to find all unannounced channels. In such cases, implementations could choose to return `update_fail_malformed_htlc` with a failure code of invalid_onion_hmac for anything that comes through an unannounced channel but is not a successful payment.The discussion further delved into the topic of probing for a channel ID attached to node N by sending an HTLC and observing the error reply. It was concluded that using blinded paths instead of this method is the more appropriate approach. Cycryptr shared a Twitter thread that explores this topic in more detail.Overall, while the need to know the node_id of the next node may not be universally applicable, there are specific scenarios where it can still be relevant. The lightning network has seen reliable onion implementations, making errors like invalid_onion_hmac uncommon. However, caution should be exercised if your node id has been revealed in other ways, as probing the network for unannounced channels can still occur.
Updated on: 2023-07-31T23:27:16.974980+00:00