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

Limit outbound gossip buffer by size, rather than length

Public commit record

What the developer wrote

Authored by Matt Corallo

85/100 · Strong
Limit outbound gossip buffer by size, rather than length

In 686a586c96aae6901d533646fc135379f825eb0d we stopped punishing
peers for slowly draining the gossip forwarding buffer, delaying
responding to our ping message. While that change was nice on its
own, it also now allows us to be a bit more flexible with what
enters the `gossip_broadcast_buffer`.

Because we now do not count pending messages in
`gossip_broadcast_buffer` against the peer's ping-response timer,
there's no reason to continue to limit it based on
`messages_sent_since_pong`. Thus, we drop that restriction here.

However, in practice, the reason for the vast majority of gossip
forwarding drops on my node is the 24-message total queue limit,
rather than the `messages_sent_since_pong` limit. This limit was
set to bend over backwards trying to avoid counting message buffer
sizes while keeping peer message buffers small.

In practice, there is really no reason to do that - summing the
capacity of tens of buffers is negligible cost and allows us to be
much more flexible with how many messages we queue.

Here we do so, limiting the total outbound message buffer size
before gossip forwards are dropped to 128 KiB per peer, rather than
24 messages. In practice, this appears to almost entirely remove
gossip forward drops on my node.
✓ Specific, 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 changes how a Lightning node decides when to stop forwarding gossip messages to a peer. Previously, the node dropped gossip if a peer's outbound message queue reached 24 messages or if too many messages had been sent since the last ping reply. Now it drops gossip only when the total buffered data for that peer exceeds 128 KiB. The change is described by the authors as a performance/flexibility improvement to reduce unnecessary gossip drops, not as a security fix. There is no direct evidence in the commit or supplied references that this resolves an exploitable vulnerability.

Recommended action

Treat as a routine protocol/performance improvement. Review whether the new 128 KiB per-peer limit is appropriate for your node's memory and DoS constraints, and verify that the removal of the `msgs_sent_since_pong` throttle does not reintroduce ping-timeout pressure in high-gossip scenarios. No immediate security patch action is indicated by the supplied materials.

Security signals we found

01

Removes a message-count throttle tied to ping-response state (`msgs_sent_since_pong`)

02

Introduces a byte-capacity limit (128 KiB) for per-peer outbound gossip buffers

03

Changes resource-management policy for gossip broadcast/backfill/onion relay buffers

04

No mention of CVE, security bug, vulnerability, or exploit in commit message or diff

Risk score

Why this scored 28/100

Our methodology →
Potential impact 5/30
Exploitability 3/25
Stealth signal 4/15
Affected reach 6/15
Confidence 7/10
Evidence quality 3/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.