You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Explore whether PaidBolt12Invoice should be moved to PaymentMetadataStore #816
In #733 we introduced a bolt12_invoice: Option<PaidBolt12Invoice> field to PaymentSuccessful.
While this works, it's a bit awkward to have a BOLT12-specific field on an event that is also used for other payment means. After #811 and #448 we should reconsider whether we should rather move storing the paid invoice to PaymentMetadata store, which might also allow to avoid the clone-on-persisting for the ffi version of the PaidBolt12Invoice.
After analyzing this issue, I consider that moving PaidBolt12Invoice into PaymentDetails (specifically into the Bolt12Offer / Bolt12Refund variants of PaymentKind has to be done.
I think that PaidBolt12Invoice belongs with durable payment metadata, not a transient event.
The PaidBolt12Invoice should be retrievable after the event is consumed
get rid of this TODO, which exists because the invoice is embedded in a Clone-required Event variant; moving it to PaymentKind removes that constrain
src/ffi/types.rs:857–862:implWriteableforPaidBolt12Invoice{fnwrite<W:Writer>(&self,w:&mutW) -> Result<(), lightning::io::Error>{// TODO: Find way to avoid cloning invoice data.let ldk_type:LdkPaidBolt12Invoice = self.clone().into();
ldk_type.write(w)}}
After analyzing this issue, I consider that moving PaidBolt12Invoice into PaymentDetails (specifically into the Bolt12Offer / Bolt12Refund variants of PaymentKind has to be done.
I think that PaidBolt12Invoice belongs with durable payment metadata, not a transient event.
The PaidBolt12Invoice should be retrievable after the event is consumed
get rid of this TODO, which exists because the invoice is embedded in a Clone-required Event variant; moving it to PaymentKind removes that constrain
src/ffi/types.rs:857–862:
impl Writeable for PaidBolt12Invoice {
fn write<W: Writer>(&self, w: &mut W) -> Result<(), lightning::io::Error> {
// TODO: Find way to avoid cloning invoice data.
let ldk_type: LdkPaidBolt12Invoice = self.clone().into();
ldk_type.write(w)
}
}
No, as mentioned above, if we want to do this, it would be blocked on #811.
Activity
f3r10 commentedon Mar 19, 2026
@tnull could I work on this issue?
After analyzing this issue, I consider that moving
PaidBolt12InvoiceintoPaymentDetails(specifically into theBolt12Offer/Bolt12Refundvariants ofPaymentKindhas to be done.tnull commentedon Mar 20, 2026
No, as mentioned above, if we want to do this, it would be blocked on #811.
f3r10 commentedon Mar 20, 2026
Got it. Would look into another issue. If you have any suggestion happy to work on it
tnull commentedon Aug 10, 2026
This will slip to v0.9 due to #425 slipping.