Skip to content

Commit 65b70d8

Browse files
committed
router: Don't disable central hops in found paths
The original motivation for the block was to ensure MPPs vary their paths a bit by disabling the 'central' hop in any found paths. However, we are disabling this block, as it: 1) causes MPP routing failures if there is only one path from payer -> payee 2) forces MPPs to be routed across less optimal paths Issue: lightningdevkit#3685 The one possible privacy concern is that any hops which forward multiple shards of the same MPP can link those shards together, as each shard uses the same payment hash (since LDK implements Simplified Multipath Payments, not Atomic Multipath Payments). But this concern seems moot, as sending the payment over a single shard leaks almost the same information anyway. As far as I (and SOTA AI models) can tell, disabling this block doesn't violate any correctness constraints or security concerns in surrounding code. License: PolyForm Noncommercial License 1.0.0
1 parent e3bd553 commit 65b70d8

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

lightning/src/routing/router.rs

+22
Original file line numberDiff line numberDiff line change
@@ -3167,6 +3167,27 @@ where L::Target: Logger {
31673167
}
31683168
debug_assert!(*used_liquidity_msat <= hop_max_msat);
31693169
}
3170+
3171+
// NOTE: The original motivation for the block was to ensure MPPs vary their paths a
3172+
// bit by disabling the 'central' hop in any found paths. However, we are disabling
3173+
// this block, as it:
3174+
//
3175+
// 1) causes MPP routing failures if there is only one path from payer -> payee
3176+
// 2) forces MPPs to be routed across multiple paths; the additional paths are
3177+
// usually more expensive and less reliable (less liquidity).
3178+
//
3179+
// Issue: https://github.com/lightningdevkit/rust-lightning/issues/3685
3180+
//
3181+
// The one possible privacy concern is that any hops which forward multiple shards
3182+
// of the same MPP can link those shards together, as each shard uses the same
3183+
// payment hash (since LDK implements Simplified Multipath Payments, not Atomic
3184+
// Multipath Payments). But this concern seems moot, as sending the payment over a
3185+
// single shard leaks almost the same information anyway.
3186+
//
3187+
// As far as I (and SOTA AI models) can tell, disabling this block doesn't violate
3188+
// any correctness constraints or security concerns in surrounding code.
3189+
let _ = prevented_redundant_path_selection;
3190+
/*
31703191
if !prevented_redundant_path_selection {
31713192
// If we weren't capped by hitting a liquidity limit on a channel in the path,
31723193
// we'll probably end up picking the same path again on the next iteration.
@@ -3181,6 +3202,7 @@ where L::Target: Logger {
31813202
*used_liquidities.entry(CandidateHopId::Clear((scid, true))).or_default() = exhausted;
31823203
}
31833204
}
3205+
*/
31843206

31853207
// Track the total amount all our collected paths allow to send so that we know
31863208
// when to stop looking for more paths

0 commit comments

Comments
 (0)