fix: improve error message for exhausted blinded path route hints#4398
fix: improve error message for exhausted blinded path route hints#4398okekefrancis112 wants to merge 1 commit intolightningdevkit:mainfrom
Conversation
|
👋 I see @valentinewallace was un-assigned. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
||
| // Step (5). | ||
| if payment_paths.len() == 0 { | ||
| if matches!(payment_params.payee, Payee::Blinded { .. }) { |
There was a problem hiding this comment.
Huh? #4308 has nothing to do with blinded paths but rather with when we've tried every last-hop. Also this is the wrong check - at this point in the code we simply failed to find a path, you can't say anything about why.
There was a problem hiding this comment.
Huh? #4308 has nothing to do with blinded paths but rather with when we've tried every last-hop. Also this is the wrong check - at this point in the code we simply failed to find a path, you can't say anything about why.
Thanks for the review! (@TheBlueMatt) I understand the two issues:
- This should also cover Payee::Clear with route hints, not just Payee::Blinded
- At this point in the code we only know pathfinding failed, not why
For (2), would the right approach be to track inside add_entry! when route hint candidates (both blinded and private hop) are specifically rejected due to exhausted liquidity via used_liquidities, and only emit the specific error when that was the reason all hints failed? Or were you thinking of something simpler/different?
There was a problem hiding this comment.
We can probably detect it by looking at the route params which keeps track of previously-failed last-hops.
This PR improves the routing error returned when attempting to pay a blinded (private) recipient and no route can be found. For
Payee::Blinded, there is no public node ID or public graph path to the destination, meaning blinded path route hints are the only way to reach the payee. Previously, exhausting all provided blinded path hints resulted in the generic error “Failed to find a path to the given destination,” which is misleading. This change returns a more specific error indicating that all blinded path route hints were exhausted, while leaving behavior unchanged forPayee::Clear, where routing may still succeed via the public network graph even if route hints fail.Closes: #4308