-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BOLT 4: don't allow a "fee" for the final node. #711
BOLT 4: don't allow a "fee" for the final node. #711
Conversation
I recently made a cut & paste bug with the protocol tests, and paid an HTLC of amount 100M msat, but with only a 1M msat `amt_to_forward` in the hop_data. To my surprise, it was accepted. This is because we allow overpaying the routing fee (considered 0 for the final hop). This doesn't make sense for the final hop: anything but exact equality implies a bug, or that the previous node took the wrong amount from the payment. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
We're also currently using Nothing blocking on our side to merge this change, ACK |
ACK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK, turns out lnd already implements it this way :)
Given all three acks, and the meeting comment that this is a "no-brainer", I'm merging now. |
* Final recipient should not collect a fee: see lightning/bolts#711 * Fix Sphinx small privacy leak: see lightning/bolts#697
Update a requirement that was missed in lightning#711
Update a requirement that was missed in lightning#711
I recently made a cut & paste bug with the protocol tests, and
paid an HTLC of amount 100M msat, but with only a 1M msat
amt_to_forward
in the hop_data. To my surprise, it was accepted.
This is because we allow overpaying the routing fee (considered 0
for the final hop). This doesn't make sense for the final hop: anything
but exact equality implies a bug, or that the previous node took the
wrong amount from the payment.
Signed-off-by: Rusty Russell rusty@rustcorp.com.au