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

wallet_db: register onion_keys converter

Public commit record

What the developer wrote

Authored by f321x

58/100 · Thin
wallet_db: register onion_keys converter

`Channel.onion_keys` had no registered converter for hex -> bytes, causing
`pop_onion_key()` to return a hex str instead of bytes after the keys
got loaded from db following a restart.
✓ Descriptive subject✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a bug in Electrum's Lightning wallet database handling. After a wallet restart, a specific type of encryption key used in Lightning payments was being loaded as a text string instead of raw bytes. This mismatch could cause payment error decoding to fail or behave incorrectly, potentially leading to misleading error reports or degraded handling of failed Lightning transactions. The patch registers a proper converter so the keys are loaded as bytes, and adds a warning log when decoding fails.

Recommended action

Apply the patch. Users running Lightning nodes with Electrum should upgrade to a version containing this fix to ensure failed Lightning payment errors are decoded correctly after wallet restarts. Monitor for any related Lightning payment failures or onion error decoding issues.

Security signals we found

01

Type confusion between str and bytes in cryptographic key handling

02

Lightning payment error path affected after wallet restart

03

Missing data converter in wallet database layer

04

Exception swallowed silently before patch; now logged

Risk score

Why this scored 44/100

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