BOLT4: don't allow a "fee" for the final node(failure messages)#718
Conversation
> For the final node, this value MUST be exactly equal to the incoming htlc amount, otherwise the HTLC should be rejected.
| the final node's HTLC: | ||
| - MUST return `final_incorrect_cltv_expiry` error. | ||
| - if the `amt_to_forward` is greater than the `incoming_htlc_amt` from the | ||
| - if the `amt_to_forward` does NOT correspond with the `incoming_htlc_amt` from the |
There was a problem hiding this comment.
what's the rationale for having these match? as long as it the amt_to_forward does not exceed the incoming_htlc_amt there's no problem.
i'm not 100% sure about this, but i believe a few use cases currently take advantage of this to allow for paying nodes via fees rather than invoice amounts.
There was a problem hiding this comment.
Thank you for your comment.
I read the following sentence in BOLT4:
For the final node, this value MUST be exactly equal to the incoming htlc amount, otherwise the HTLC should be rejected.
and understood as follow:
non final node:
incoming_htlc_amt - fee >= amt_to_forward
final node:
incoming_htlc_amt == amt_to_forward
There was a problem hiding this comment.
I understood it like you @nayuta-ueno, IIUC the change you propose should have been made at the same time as #711 but was overlooked?
There was a problem hiding this comment.
oh i see the context now. thanks.
There was a problem hiding this comment.
Oh I missed the link to #711, thanks for the clarification.
| the final node's HTLC: | ||
| - MUST return `final_incorrect_cltv_expiry` error. | ||
| - if the `amt_to_forward` is greater than the `incoming_htlc_amt` from the | ||
| - if the `amt_to_forward` does NOT correspond with the `incoming_htlc_amt` from the |
There was a problem hiding this comment.
I understood it like you @nayuta-ueno, IIUC the change you propose should have been made at the same time as #711 but was overlooked?
|
ACK 83f77bf |
Update a requirement that was missed in lightning#711
Update a requirement that was missed in lightning#711
#711