Uh oh!
There was an error while loading. Please reload this page.
Allow blinded path diversification by expanding create_blinded_paths - #3087
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@## main #3087 +/- ##
==========================================
- Coverage 89.80% 89.78% -0.02%
==========================================
Files 121 121 Lines 100045 100207 +162 Branches 100045 100207 +162 ==========================================
+ Hits 89845 89975 +130 - Misses 7533 7558 +25 - Partials 2667 2674 +7 ☔ View full report in Codecov by Sentry. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
shaavan
commented
Jun 3, 2024
Updated from pr3087.01 to pr3087.02 (diff): Changes:
|
f0c2e7d to
f32a93aCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
f32a93a to
c8e7993Compareshaavan
commented
Jun 6, 2024
Uh oh!
There was an error while loading. Please reload this page.
c8e7993 to
4032289Compareshaavan
commented
Jun 6, 2024
Updated from pr3087.03 to pr3087.04 (diff): Changes:
|
4032289 to
56013beCompareshaavan
commented
Jun 10, 2024
Updated from pr3087.04 to pr3087.05 (diff): Updates:
|
56013be to
b6e38c2Compareshaavan
commented
Jun 10, 2024
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
b6e38c2 to
4461115Compareshaavan
commented
Jun 12, 2024
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jbesraa
left a comment
There was a problem hiding this comment.
Looks good
Is it worth adding a test to cover the new code?
jkczyz
commented
Jun 20, 2024
Chatted with @shaavan earlier today about how to go about testing this. |
d672475 to
5d66998Compareshaavan
commented
Jun 24, 2024
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
5d66998 to
f541586Comparef541586 to
94354f3CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
94354f3 to
0354d8dCompareUh oh!
There was an error while loading. Please reload this page.
0354d8d to
43e821cCompare43e821c to
893f62dCompareshaavan
commented
Jul 5, 2024
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| fn extract_invoice<'a, 'b, 'c>(node: &Node<'a, 'b, 'c>, message: &OnionMessage) -> (Bolt12Invoice, Option<BlindedPath>) { | ||
| match node.onion_messenger.peel_onion_message(message) { | ||
| Ok(PeeledOnion::Receive(message, _, _)) => match message { | ||
| Ok(PeeledOnion::Receive(message, _, reply_path)) => match message { |
There was a problem hiding this comment.
As a follow-up PR, could you start including a reply path with invoices for offers? We should have the capability now, but we just haven't updated ChannelManager's implementation of OffersMessageHandler yet.
There was a problem hiding this comment.
Sure! Added it to the task list! 🚀
Uh oh!
There was an error while loading. Please reload this page.
893f62d to
212ade4Compare
jkczyz
left a comment
There was a problem hiding this comment.
The change looks good. I went through the tests and noted where we should remove checks that aren't relevant to the new behavior. There may be tests where we are asserting more than necessary, but might as well avoid doing that in newer tests.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…ication - Previously, the `create_blinded_path` function was limited to returning a single `BlindedPath`, which restricted the usage of `blinded_paths`. - This commit extends the `create_blinded_path` function to return the entire blinded path vector generated by the `MessageRouter`'s `create_blinded_paths`. - The updated functionality is integrated across the codebase, enabling the sending of Offers Response messages, such as `InvoiceRequest` (in `pay_for_offer`) and `Invoice` (in `request_refund_payment`), utilizing multiple reply paths.
- This will be utilised in the following commit for a test.
212ade4 to
f5aa883Compareshaavan
commented
Jul 11, 2024
0e16cdb to
e6bb965Compare
jkczyz
left a comment
There was a problem hiding this comment.
LGTM. Please squash the fixup.
e6bb965 to
a643112Comparea643112 to
957b337Compare
TheBlueMatt
left a comment
There was a problem hiding this comment.
LGTM. Diff since @jkczyz's "LGTM" is trivial, so landing:
$ git diff-tree -U2 e6bb965bcd3fede82b956c5abb17d6e501c8d9af 957b33712ad3d5a7aed624e4f565887817fd9944
diff --git a/lightning/src/ln/offers_tests.rs b/lightning/src/ln/offers_tests.rs
index 2eddb1991..cdd78d02c 100644
--- a/lightning/src/ln/offers_tests.rs+++ b/lightning/src/ln/offers_tests.rs@@ -1019,4 +1019,6 @@ fn send_invoice_for_refund_with_distinct_reply_path() {
expect_recent_payment!(alice, RecentPaymentDetails::AwaitingInvoice, payment_id);
+ let _expected_invoice = david.node.request_refund_payment(&refund).unwrap();+
connect_peers(david, bob);
$
blinded_pathsis limited becausecreate_blinded_pathonly returns a singleBlindedPath.create_blinded_pathby allowing it to return multipleBlindedPaths, as determined by the newcountparameter.InvoiceRequest(inpay_for_offer) andInvoice(inrequest_refund_payment), using multiple reply paths.create_blinded_pathsto 10, enabling the generation of more reply paths. It also increases the number ofblinded_pathsused in offer and refund builders and responders to 5, demonstrating the usage of multiple reply paths.