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

Improve liquidity ads codec performance (#3344)

Public commit record

What the developer wrote

Authored by Bastien Teinturier

76/100 · Adequate
Improve liquidity ads codec performance (#3344)

* Improve liquidity ads codec

We improve the performance of the liquidity ads codec by ignoring
unknown payment types, and simply checking whether the payment types
we support are activated or not.

* Reject node_announcement with invalid liquidity TLV

If the liquidity ads TLVs is present but with empty fields, we fail to
correctly re-encode it. We must reject it immediately instead.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a bug in how Eclair handles 'liquidity ads' data embedded in Lightning node announcements. Previously, if a peer broadcast a node_announcement containing a liquidity-ads field with empty funding rates or empty payment types, the node could not re-encode the message correctly, which could cause it to relay or store invalid gossip. The patch now rejects such malformed announcements immediately. It also improves codec performance by storing the raw payment-type bitfield instead of eagerly decoding unknown payment types.

Recommended action

Treat as a hardening/bugfix patch. Operators should upgrade to avoid propagating malformed liquidity-ads gossip. Review whether the InvalidSignature gossip decision is the most appropriate error type for empty liquidity-ads fields, since the failure is not actually a signature validation issue.

Security signals we found

01

Malformed gossip TLV re-encoding failure mitigated by explicit rejection

02

Empty fundingRates/encodedPaymentTypes in node_announcement now treated as invalid

03

Codec change reduces attack surface from unknown payment-type bit manipulation

04

No explicit CVE, advisory, or security disclosure referenced in commit

Risk score

Why this scored 50/100

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