AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 35 Bitcoin

Default to requiring `payment_metadata` when building BOLT 11s

Public commit record

What the developer wrote

Authored by Matt Corallo

73/100 · Adequate
Default to requiring `payment_metadata` when building BOLT 11s

Now that we commit to payment metadata fields and require them
implicitly as a part of payments, we should match that in
`lightning-invoice` - instead marking them as required by default.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit changes how Lightning invoices are built in the LDK library. Previously, payment metadata was optional by default, and developers had to explicitly call a method to require it. Now, payment metadata is required by default, with an opt-out method for legacy compatibility. This is a defensive change to align invoice behavior with LDK's internal payment handling, reducing the risk of payment failures or ambiguity when metadata is omitted.

Recommended action

Review downstream usage of `payment_metadata` and `require_payment_metadata` in dependent projects. Update code that relied on optional-by-default behavior to explicitly call `optional_payment_metadata` if legacy sender support is needed. No immediate security patch is required; this is a hardening/API-alignment change.

Security signals we found

01

Default behavior changed from optional to required for payment metadata in BOLT 11 invoices

02

Old `require_payment_metadata` method removed; new `optional_payment_metadata` opt-out added

03

LDK internally commits to payment metadata via payment secret, so defaulting to required improves consistency

04

Potential compatibility impact for legacy senders that do not support payment metadata

Risk score

Why this scored 35/100

Our methodology →
Potential impact 8/30
Exploitability 5/25
Stealth signal 4/15
Affected reach 7/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.