Skip to content

BOLT 12: clarify that offer_amount must be greater than zero#1316

Open
vincenzopalazzo wants to merge 1 commit intolightning:masterfrom
vincenzopalazzo:clarify-offer-amount-non-zero
Open

BOLT 12: clarify that offer_amount must be greater than zero#1316
vincenzopalazzo wants to merge 1 commit intolightning:masterfrom
vincenzopalazzo:clarify-offer-amount-non-zero

Conversation

@vincenzopalazzo
Copy link
Contributor

Add explicit requirements that:

  • Writers MUST set offer_amount greater than zero when present
  • Readers MUST NOT respond to offers where offer_amount is zero

This addresses ambiguity about whether offer_amount=0 is valid. Since omitting offer_amount indicates no minimum is required, a zero value when present would be semantically incorrect.

Fixes #1314

Add explicit requirements that:
- Writers MUST set offer_amount greater than zero when present
- Readers MUST NOT respond to offers where offer_amount is zero

This addresses ambiguity about whether offer_amount=0 is valid.
Since omitting offer_amount indicates no minimum is required,
a zero value when present would be semantically incorrect.

Fixes lightning#1314
Copy link
Collaborator

@t-bast t-bast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 8605772, this is obvious and I think it's a bit spammy to explicitly spell it out, but why not.

@rustyrussell WDYT?

@vincenzopalazzo
Copy link
Contributor Author

ACK 8605772, this is obvious and I think it's a bit spammy to explicitly spell it out, but why not.

I agree, but I think if we have this in the spec will be obvious what to do, for instance ldk was accepting it and causing some parsing crash with cln IIRC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify whether offer_amount can be zero

2 participants