0
In the Lightning Network, the intermediate hop between the sender and receiver checks for possible errors(like if it has enough balance). And if there is, it sends an HTLCFail message back to the sender.
I was wondering if the HTLCFail message is sent back to the sender via the path it comes from, or it's routed by some new random path as long as it can go back and let the sender know this path cannot route?
Payment relay (intermediate hop). H checks for possible errors (e.g., it checks whether it has enough balance to forward the payment). If there are errors, it sends an HTLCFail message back to S , failing the HTLC; otherwise, it sends an HTLCAdd message to R . (This step occurs multiple times in the general case of a payment going through multiple intermediate hops.)
alright thanks a lot. I saw this and wasn't so sure so just wanna check. Thanks again. – Danni – 2019-04-08T13:49:05.830
i got one more question: since each hop knows the previous and next hops, would that mean the intermediate node needs to record every payment's information on this hop? wouldn't that create large overhead? or the hopping information is not stored on the node. Thanks a lot! – Danni – 2019-04-08T14:10:59.040
Some information must be kept around because it is necessary to keep commitment transactions for all past channel states (in case other party broadcasts an old state), and the commitment and associated htlcs require the payment hash. The other session information for each payment forwarding only needs to be held for the duration that the HTLC is in flight. – Mark H – 2019-04-08T14:20:06.363