Support multi-hop blinded paths for `ReleaseHeldHtlc`
In #4045, as part of supporting sending payments as an often-offline sender to an often-offline recipient, we began including blinded paths in the sender's LSP's RAA message for use as reply paths to the sender's held_htlc_available messages.
Because we hold the per-peer lock corresponding to the Channel while creating this RAA, we can't use our typical approach of calling ChannelManager::get_peers_for_blinded_path to create these blinded paths. The ::get_peers method takes each peer's lock in turn in order to check for usable channels/onion message feature support, and it's not permitted to hold multiple peer state locks at the same time due to the potential for deadlocks (see the debug_sync module).
To avoid taking other peer state locks while holding a particular Channel's peer state lock, here we cache the set of peers in the OffersMessageFlow, which is the struct that ultimately creates the blinded paths for the RAA.
For consistency, we also stop passing in peers to every other OffersMessageFlow method.
Based on ~#4045~, ~#4046~
👋 I see @tankyleo was un-assigned. If you'd like another reviewer assignment, please click here.
Codecov Report
:x: Patch coverage is 91.30435% with 12 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 88.53%. Comparing base (c2e3ae0) to head (0721c9e).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| lightning/src/offers/flow.rs | 83.67% | 4 Missing and 4 partials :warning: |
| lightning/src/ln/channelmanager.rs | 80.95% | 1 Missing and 3 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #4066 +/- ##
==========================================
- Coverage 88.70% 88.53% -0.18%
==========================================
Files 176 175 -1
Lines 132859 132779 -80
Branches 132859 132779 -80
==========================================
- Hits 117854 117555 -299
- Misses 12309 12621 +312
+ Partials 2696 2603 -93
| Flag | Coverage Δ | |
|---|---|---|
| fuzzing | ? |
|
| tests | 88.53% <91.30%> (-0.02%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
I'd hold off on this because it doesn't seem a strict requirement for initial deployment.
Needs rebase now :tada:
🔔 1st Reminder
Hey @tankyleo! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 2nd Reminder
Hey @tankyleo! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 3rd Reminder
Hey @tankyleo! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 4th Reminder
Hey @tankyleo! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 5th Reminder
Hey @tankyleo! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 6th Reminder
Hey @tankyleo! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 7th Reminder
Hey @tankyleo! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 8th Reminder
Hey @tankyleo! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 9th Reminder
Hey @tankyleo! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 10th Reminder
Hey @tankyleo! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 11th Reminder
Hey @tankyleo! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 12th Reminder
Hey @tankyleo! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 13th Reminder
Hey @tankyleo! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 14th Reminder
Hey @tankyleo! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 15th Reminder
Hey @tankyleo! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 16th Reminder
Hey @tankyleo! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
🔔 17th Reminder
Hey @tankyleo! This PR has been waiting for your review. Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.
Needs rebase @valentinewallace