From 22ea5053489f4a5fa82affbfc1cdf5d704136440 Mon Sep 17 00:00:00 2001 From: Jeffrey Czyz Date: Tue, 24 Jan 2023 23:43:14 -0600 Subject: [PATCH] Update docs regarding payment path privacy --- lightning/src/offers/invoice.rs | 6 ++++-- lightning/src/offers/invoice_request.rs | 4 +++- lightning/src/offers/refund.rs | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lightning/src/offers/invoice.rs b/lightning/src/offers/invoice.rs index 99a97368..f423677f 100644 --- a/lightning/src/offers/invoice.rs +++ b/lightning/src/offers/invoice.rs @@ -338,8 +338,10 @@ struct InvoiceFields { impl Invoice { /// Paths to the recipient originating from publicly reachable nodes, including information - /// needed for routing payments across them. Blinded paths provide recipient privacy by - /// obfuscating its node id. + /// needed for routing payments across them. + /// + /// Blinded paths provide recipient privacy by obfuscating its node id. Note, however, that this + /// privacy is lost if a public node id is used for [`Invoice::signing_pubkey`]. pub fn payment_paths(&self) -> &[(BlindedPath, BlindedPayInfo)] { &self.contents.fields().payment_paths[..] } diff --git a/lightning/src/offers/invoice_request.rs b/lightning/src/offers/invoice_request.rs index e34d9d9c..5b15704c 100644 --- a/lightning/src/offers/invoice_request.rs +++ b/lightning/src/offers/invoice_request.rs @@ -333,7 +333,9 @@ impl InvoiceRequest { /// for the invoice. /// /// The `payment_paths` parameter is useful for maintaining the payment recipient's privacy. It - /// must contain one or more elements. + /// must contain one or more elements ordered from most-preferred to least-preferred, if there's + /// a preference. Note, however, that any privacy is lost if a public node id was used for + /// [`Offer::signing_pubkey`]. /// /// Errors if the request contains unknown required features. /// diff --git a/lightning/src/offers/refund.rs b/lightning/src/offers/refund.rs index e022f127..fff33873 100644 --- a/lightning/src/offers/refund.rs +++ b/lightning/src/offers/refund.rs @@ -331,7 +331,9 @@ impl Refund { /// offer, which does have a `signing_pubkey`. /// /// The `payment_paths` parameter is useful for maintaining the payment recipient's privacy. It - /// must contain one or more elements. + /// must contain one or more elements ordered from most-preferred to least-preferred, if there's + /// a preference. Note, however, that any privacy is lost if a public node id is used for + /// `signing_pubkey`. /// /// Errors if the request contains unknown required features. /// -- 2.30.2