Skip to content

Commit

Permalink
Merge pull request #1086 from ariard/2023-06-specify-max-cltv-expiry-…
Browse files Browse the repository at this point in the history
…delta

BOLT4: Specify max HTLC nLocktime for expiry_too_far
  • Loading branch information
Roasbeef committed Oct 23, 2023
2 parents 7620072 + bccab9a commit 8a64c6a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion 04-onion-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ A node:
* [Returning Errors](#returning-errors)
* [Failure Messages](#failure-messages)
* [Receiving Failure Codes](#receiving-failure-codes)
* [`max_htlc_cltv` Selection](#max-htlc-cltv-selection)
* [Onion Messages](#onion-messages)
* [Test Vector](#test-vector)
* [Returning Errors](#returning-errors)
Expand Down Expand Up @@ -1333,7 +1334,7 @@ A _forwarding node_ MAY, but a _final node_ MUST NOT:
- if the `cltv_expiry` is unreasonably near the present:
- report the current channel setting for the outgoing channel.
- return an `expiry_too_soon` error.
- if the `cltv_expiry` is unreasonably far in the future:
- if the `cltv_expiry` is more than `max_htlc_cltv` in the future:
- return an `expiry_too_far` error.
- if the channel is disabled:
- report the current channel setting for the outgoing channel.
Expand Down Expand Up @@ -1580,6 +1581,10 @@ Onion messages don't explicitly require a channel, but for
spam-reduction a node may choose to ratelimit such peers, especially
messages it is asked to forward.

## `max_htlc_cltv` Selection

This `max_htlc_ctlv` value is defined as 2016 blocks, based on historical value
deployed by Lightning implementations.

# Test Vector

Expand Down

0 comments on commit 8a64c6a

Please sign in to comment.