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

Track invoice_slot in ServeStaticInvoice context

Public commit record

What the developer wrote

Authored by Valentine Wallace

80/100 · Strong
Track invoice_slot in ServeStaticInvoice context

In the initially-merged version of the static invoice server protocol, the
static invoice server would sometimes have to find a specific static invoice
based on (recipient_id, invoice_slot) and sometime based on (recipient_id,
invoice_id). This made the API harder to use in terms of how the server would
index into the KVStore.

We'd like to transition to the server always finding a specific invoice based on
(recipient_id, invoice_slot) and get rid of the invoice_id concept.

As part of this series of commits, include the invoice_slot in the
ServeStaticInvoice blinded path context that the server creates when sending an
offer_paths message. This is possible due to a previous commit including the
invoice_slot in the initial offer_paths_request from the recipient, and lays
the groundwork for removing the invoice_id field from this blinded path
context.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit is a small internal cleanup in the code that handles static Lightning invoices. It makes the software remember an 'invoice_slot' number earlier in the process so that later, when serving a stored invoice, the server can look it up by slot number instead of relying only on an 'invoice_id'. The change adds a new field to a protocol data structure and threads it through the request/response flow. There is no indication this fixes a security bug; it appears to be a design/API simplification.

Recommended action

No immediate security action required. Treat as a normal protocol/API refactor. If deploying, note the new required TLV field means stored or in-flight blinded path contexts serialized with the old format may fail to load; verify compatibility with persisted data and peer versions.

Security signals we found

01

No security-relevant language in commit title or message

02

No bounds checks or input validation changes beyond existing expiry checks

03

New required TLV field changes wire format; old serialized data without the field would fail deserialization

04

No memory safety, cryptographic, or authorization changes visible

Risk score

Why this scored 18/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 2/15
Confidence 8/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.