lightningdevkit / rust-lightning

A highly modular Bitcoin Lightning library written in Rust. It's rust-lightning, not Rusty's Lightning!
Other
1.15k stars 363 forks source link

Rename `payment_parameters_from_zero_amount_invoice` to imply amount-less, not 0-amount #2879

Open TheBlueMatt opened 7 months ago

TheBlueMatt commented 7 months ago

lightning-invoice treats missing amount differently from set amounts, but the whole zero-amount thing is about...zero amounts. Do we actually support zero amounts properly or only invoices with no amount (which presumably other lightning nodes can't create)? Should we be refusing to deserialize invoices with no amount at all?

jkczyz commented 6 months ago

Hmm... do you have more background on this issue? I always thought "zero-amount" was synonymous with "amount-less" but that the latter was the accurate term.

jkczyz commented 6 months ago

Here are old issues from other implementations for amount-less invoices:

TheBlueMatt commented 6 months ago

Oh, okay, nevermind. I managed to completely confuse myself based on the "0 amount" name. We should probably rename the references to it so that its less confusing for others.

tnull commented 6 months ago

FWIW, in LDK Node we use a "variable amount" naming pattern, but mention "zero-amount" in the docs as users might try to find the functionality by this (confusing) name.

srikanth-iyengar commented 6 months ago

I would like to work on this issue, is this up for grabs ?

mubarak23 commented 5 days ago

@TheBlueMatt can i work on this