Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 04-onion-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ An _intermediate hop_ MUST NOT, but the _final node_:
- if the `outgoing_cltv_value` does NOT correspond with the `cltv_expiry` from
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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh i see the context now. thanks.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I missed the link to #711, thanks for the clarification.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@t-bast

the change you propose should have been made at the same time as #711 but was overlooked?

I think so too.

final node's HTLC:
- MUST return a `final_incorrect_htlc_amount` error.

Expand Down