Skip to content

Commit dd0af11

Browse files
TheBlueMattcarlaKC
authored andcommitted
Correct final_cltv handling in blinded paths
When paying a blinded path, we don't have a CLTV delta at each hop available, but rather only a total CLTV delta for the entire blinded path. However, the onion format currently still requires that we specify an `outgoing_cltv_value` for the final hop. As the sender, we don't have a sensible value to put there, as we don't know which part of the total CLTV delta belongs to the recipient. The sender is instructed to use the values that are known to them when setting `outgoing_cltv_value` for the final hop: - The current block height. - Any additional delta added to account for block propagation and improve privacy. This change reflects the behavior of some implementations at the time of writing.
1 parent 8dec7fa commit dd0af11

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

04-onion-routing.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,10 @@ The writer of the TLV `payload`:
262262
- MUST include the `blinding_point` provided by the recipient in `current_blinding_point`
263263
- If it is the final node:
264264
- MUST include `amt_to_forward`, `outgoing_cltv_value` and `total_amount_msat`.
265+
- The value set for `outgoing_cltv_value`:
266+
- MUST use the current block height as a baseline value.
267+
- if a [random offset](07-routing-gossip.md#recommendations-for-routing) was added to improve privacy:
268+
- SHOULD add the offset to the baseline value.
265269
- MUST NOT include any other tlv field.
266270
- For every node outside of a blinded route:
267271
- MUST include `amt_to_forward` and `outgoing_cltv_value`.

0 commit comments

Comments
 (0)