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

gossmap: reduce load times by 20%

Public commit record

What the developer wrote

Authored by Rusty Russell

68/100 · Adequate
gossmap: reduce load times by 20%

It's actually quite quick to load a cache-hot 308,874,377 byte
gossip_store (normal -Og build), but perf does show time spent
in siphash(), which is a bit overkill here, so drop that:

Before:
Time to load: 66718983-78037766(7.00553e+07+/-2.8e+06)nsec

After:
Time to load: 54510433-57991725(5.61457e+07+/-1e+06)nsec

We could save maybe 10% more by disabling checksums, but having
that assurance is nice.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit speeds up how Core Lightning loads its network map by replacing a strong hash function with a cheaper, simpler one. The change is framed as a performance optimization. The new hash for node IDs is weaker and uses a random byte offset, which could in theory allow a specially crafted node ID to collide with another in the hash table. However, the commit message argues that creating such collisions is expensive because it requires opening real Lightning channels. There is no direct evidence in the commit or supplied references that this is exploitable as a security bug.

Recommended action

Treat as a performance optimization rather than a vulnerability unless independent analysis demonstrates a practical collision attack against the new hash in the gossip map context. If concerned, review whether the weaker node_id hash could enable denial-of-service via hash collisions in pathfinding or gossip processing, and consider reintroducing a keyed hash if the threat model changes.

Security signals we found

01

Hash function deliberately weakened for performance

02

Commit message acknowledges collision resistance trade-off

03

Hash output derived from a small, contiguous slice of a public key at a random offset

04

No bounds issue: BUILD_ASSERT ensures offset + size fits within id.k

05

No explicit security claim or CVE reference in commit

Risk score

Why this scored 15/100

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