Skip to content

Commit

Permalink
Merge pull request #1532 from ariard/2022-06-scaleup-far-away
Browse files Browse the repository at this point in the history
Scale up CLTV_FAR_FAR_AWAY to 2 weeks of blocks
  • Loading branch information
TheBlueMatt committed Jun 17, 2022
2 parents d2a7ee2 + c989ce1 commit abf6564
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lightning/src/ln/channelmanager.rs
Expand Up @@ -870,7 +870,13 @@ pub(crate) const MAX_LOCAL_BREAKDOWN_TIMEOUT: u16 = 2 * 6 * 24 * 7;
// the HTLC via a full update_fail_htlc/commitment_signed dance before we hit the
// CLTV_CLAIM_BUFFER point (we static assert that it's at least 3 blocks more).
pub const MIN_CLTV_EXPIRY_DELTA: u16 = 6*7;
pub(super) const CLTV_FAR_FAR_AWAY: u32 = 6 * 24 * 7; //TODO?
// This should be long enough to allow a payment path drawn across multiple routing hops with substantial
// `cltv_expiry_delta`. Indeed, the length of those values is the reaction delay offered to a routing node
// in case of HTLC on-chain settlement. While appearing less competitive, a node operator could decide to
// scale them up to suit its security policy. At the network-level, we shouldn't constrain them too much,
// while avoiding to introduce a DoS vector. Further, a low CTLV_FAR_FAR_AWAY could be a source of
// routing failure for any HTLC sender picking up an LDK node among the first hops.
pub(super) const CLTV_FAR_FAR_AWAY: u32 = 14 * 24 * 6;

/// Minimum CLTV difference between the current block height and received inbound payments.
/// Invoices generated for payment to us must set their `min_final_cltv_expiry` field to at least
Expand Down

0 comments on commit abf6564

Please sign in to comment.