File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -870,7 +870,13 @@ pub(crate) const MAX_LOCAL_BREAKDOWN_TIMEOUT: u16 = 2 * 6 * 24 * 7;
870
870
// the HTLC via a full update_fail_htlc/commitment_signed dance before we hit the
871
871
// CLTV_CLAIM_BUFFER point (we static assert that it's at least 3 blocks more).
872
872
pub const MIN_CLTV_EXPIRY_DELTA : u16 = 6 * 7 ;
873
- pub ( super ) const CLTV_FAR_FAR_AWAY : u32 = 6 * 24 * 7 ; //TODO?
873
+ // This should be long enough to allow a payment path drawn across multiple routing hops with substantial
874
+ // `cltv_expiry_delta`. Indeed, the length of those values is the reaction delay offered to a routing node
875
+ // in case of HTLC on-chain settlement. While appearing less competitive, a node operator could decide to
876
+ // scale them up to suit its security policy. At the network-level, we shouldn't constrain them too much,
877
+ // while avoiding to introduce a DoS vector. Further, a low CTLV_FAR_FAR_AWAY could be a source of
878
+ // routing failure for any HTLC sender picking up an LDK node among the first hops.
879
+ pub ( super ) const CLTV_FAR_FAR_AWAY : u32 = 14 * 24 * 6 ;
874
880
875
881
/// Minimum CLTV difference between the current block height and received inbound payments.
876
882
/// Invoices generated for payment to us must set their `min_final_cltv_expiry` field to at least
You can’t perform that action at this time.
0 commit comments