EL
← All projectsElectrum

Electrum

Long-running lightweight Bitcoin wallet for desktop and mobile platforms.

BitcoinSoftware walletsNormal
Repository coverage

935 commits in the local evidence base

Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.

67security candidates208second-pass queue929AI analyses
61commits · 30 days
115commits · 60 days
465commits · 180 days
931commits · 365 days
Backfill bands
Aug 5 → Feb 6470 seen11 candidatesComplete
Feb 6 → Jun 6346 seen10 candidatesComplete
Jun 6 → Jul 653 seen2 candidatesComplete
Jul 6 → Aug 554 seen3 candidatesComplete
Commit communication

Does the history explain itself?

Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.

65/100 average clarity
194Strong · 80–100
415Adequate · 60–79
287Thin · 40–59
39Opaque · 0–39
2security candidates with opaque commit messaging
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
ThomasV73272156
SomberNight35226350063
f321x37121371070
Sander van Grieken991098057
user323062
Roman Zeyde515053
Sasha Zykov414076
Aaron Fiore414068
ghost43312068
Róbert Nagy111098
Ferdinando Ametrano111096
Felix302074
Analysis record

Published AI watches

Last scanned 32 minutes ago

Informational 15 AI analysisMessage 63 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10816 from accumulator/qml_auth_log_improvement

This commit is a minor logging cleanup in the mobile/QML authentication helper. It changes the wording and placement of debug/error log messages so they reveal the function name only after safely retrieving it, and avoids logging a raw tup…

8dddae68by ghost43+4−41 file
No security note in commit
Moderate 51 AI analysisMessage 73 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10798 from SomberNight/202608_base43

This commit fixes a performance weakness in Electrum's handling of large Bitcoin transactions encoded in 'base43'. The base43 encoding and decoding functions run in quadratic time, meaning the work grows much faster than the input size. An…

Quadratic-time base43 encode/decode can be triggered on attacker-controlled inputDenial-of-service via CPU exhaustion / UI freeze on large transaction stringsInput-length cap added as a defensive guard, not a full algorithmic fix
0e9f1a0dby Felix+25−92 files
No security note in commit
Low 41 AI analysisMessage 73 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10799 from SomberNight/202608_android_secure_window

This update tightens a privacy feature on Electrum's Android app that prevents the screen from being captured while sensitive Bitcoin private keys or seed phrases are visible. Before, the protection could be accidentally turned off when mu…

Adds visibility-gated secureWindow bindings to protect WIF keys and seed phrasesPrevents secureWindow from being cleared when multiple sensitive dialogs are stackedTargets Android screenshot/recents-thumbnail protection surface
4622390cby accumulator+17−05 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 98 · Strong
EL ElectrumElectrum BitcoinSoftware wallets

docs: add Coldcard Mk3 seed-entropy security notice to plugin README (#10805)

This commit only adds a documentation warning to Electrum's Coldcard plugin README. It does not change any executable code, cryptographic logic, or wallet behavior. The warning tells users that Coldcard/Coinkite disclosed a firmware bug in…

Documentation-only changeReferences an external hardware-wallet firmware advisoryNo code, cryptography, or plugin behavior modified
2c2a40b6by Róbert Nagy+4−01 file
Vendor flagged security relevance
Low 48 AI analysisMessage 81 · Strong
EL ElectrumElectrum BitcoinSoftware wallets

qml/android: protect WIF keys from screenshots in more places

This commit tightens screen-shot protection for private Bitcoin wallet keys (WIF keys and seed phrases) in Electrum's Android/QML user interface. It also fixes a bug where one screen (AddressDetails) was leaving the 'secure window' flag pe…

Adds FLAG_SECURE-style screenshot protection to additional private-key dialogsFixes a bug where secureWindow was never unset in AddressDetailsUses QML Binding 'when' with restoreMode semantics to handle stacked secure dialogs safely
739cba5dby SomberNight+17−05 files
Vendor flagged security relevance
Moderate 60 AI analysisMessage 92 · Strong
EL ElectrumElectrum BitcoinSoftware wallets

lnpeer: chan_reest: ctn overflow: force-close instead of disconnect

This commit fixes a bug in Electrum's Lightning Network code. Previously, if a malicious or malfunctioning peer sent a channel re-establishment message with extremely large commitment numbers (over 2^48), the local program would hit an int…

Addition of explicit overflow check on untrusted peer-supplied commitment countersReplacement of assertion-failure/disconnect behavior with force-close on misbehaviorNew test cases for ctn overflow in both next_local_ctn and oldest_unrevoked_remote_ctn
b3e441f8by SomberNight+22−32 files
No security note in commit
Informational 18 AI analysisMessage 73 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10791 from SomberNight/202608_wallet_sign_message2

This change moves the trimming of leading/trailing spaces in message-signing fields from the user-interface code into the shared wallet code. For the graphical interfaces (Qt and QML), spaces are still stripped automatically for convenienc…

Behavior change in message signing/verification input handlingCLI now preserves whitespace, which could affect signature validity for messages that intentionally contain leading or trailing whitespaceNo memory-safety, cryptographic, or authentication flaw visible in the diff
b1aa52d7by ghost43+27−185 files
No security note in commit
Informational 19 AI analysisMessage 96 · Strong
EL ElectrumElectrum BitcoinSoftware wallets

wallet: sign_message: strip whitespaces in GUIs, do not strip in CLI

This commit tidies up how Electrum handles extra spaces around Bitcoin addresses, messages, and signatures when signing or verifying messages. Previously, different parts of the program (desktop GUI, mobile-style GUI, command line) behaved…

Behavior normalization across GUI and CLI interfacesNo cryptographic primitive changedNo privilege boundary crossed
4c3064f5by SomberNight+27−185 files
No security note in commit
Informational 22 AI analysisMessage 50 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

wallet: decrypt_message: nicer error msg if pubkey is unrelated

This commit improves the error handling in Electrum's message decryption feature. Previously, if a user tried to decrypt a message using a public key that did not belong to their wallet, the code could proceed and likely fail with a confus…

Input validation added for public key before cryptographic operationUser-facing exception replaces potential internal failureDefensive check prevents use of unrelated key material
92e938f4by SomberNight+5−01 file
No security note in commit
Informational 16 AI analysisMessage 83 · Strong
EL ElectrumElectrum BitcoinSoftware wallets

qt: main_window: use TaskThread for each of sign/verify/encrypt/decrypt

This commit moves four message-crypto operations (sign, verify, encrypt, decrypt) in Electrum's Qt wallet window onto a background worker thread so they all behave the same way. It also lets the background thread surface user-facing errors…

Moved blocking wallet crypto calls off the GUI thread, reducing UI freeze / DoS surfaceRemoved local exception swallowing for encrypt_message; errors now propagate through the window's on_error handlerAdded defensive RuntimeError guard for deleted Qt widget in async callback
4a9a199fby SomberNight+28−151 file
No security note in commit
Low 29 AI analysisMessage 35 · Opaque
EL ElectrumElectrum BitcoinSoftware wallets

wallet: sign_message: force kwargs

This commit changes how Electrum's message-signing function is called so that callers must explicitly name each argument (address, message, password) rather than passing them by position. The main practical effect is to prevent accidental …

API hardening: keyword-only arguments prevent positional argument swapNo explicit security bug fix or vulnerability disclosure in commit message or diffNo changes to cryptographic logic, password handling, or message parsing
e1eb2a34by SomberNight+9−44 files
No security note in commit
Low 39 AI analysisMessage 45 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

wallet: sign_message: consolidate checks from UIs

This commit moves input-validation checks for signing, verifying, encrypting, and decrypting messages out of the user-interface code and into the shared wallet logic. It also adds type checks so that non-text inputs are rejected earlier. T…

Input validation moved from UI controllers into core wallet logicType checks added at the CLI command entry points for message-crypto operationsUserFacingException used consistently for address, wallet, script-type, and key-format errors
48893760by SomberNight+89−396 files
No security note in commit
Low 27 AI analysisMessage 50 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

wallet: decrypt_message: consolidate checks from UIs

This commit moves input-validation and wallet-type checks for message decryption out of the user-interface and command-line layers and into the core wallet code. It also removes a faster, separate decryption path for imported wallets so al…

Input validation consolidated into a single core methodWatching-only wallet check moved from UI to wallet layerMultisig wallet unsupported-operation check moved from UI to wallet layer
9a0cc0d6by SomberNight+25−173 files
No security note in commit
Informational 15 AI analysisMessage 50 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

wallet: refactor: add encrypt_message method, consolidated from UIs

This commit is a simple code cleanup: it moves the message-encryption logic from two separate places (the command-line tool and the Qt graphical interface) into a single shared method on the wallet class. The actual encryption behavior is …

No change to cryptographic primitives or parametersNo change to trust boundaries or input sourcesPure refactor consolidating duplicate code
5e9c8df0by SomberNight+26−183 files
No security note in commit
Informational 13 AI analysisMessage 50 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

wallet: refactor: add verify_message method, consolidated from UIs

This commit is a routine code cleanup: it moves message-signature verification out of three user-interface files into a single shared helper method in the wallet module. There is no security-relevant behavior change visible in the diff. Th…

No security-relevant functional changeRefactoring only: code deduplicationException handling broadened safely (ValueError covers binascii.Error and unicode errors)
ff5bbb04by SomberNight+26−304 files
No security note in commit
Informational 15 AI analysisMessage 60 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

qt: main_window: add type hints to sign/verify, encrypt/decrypt

This commit only adds Python type hints and renames some function parameters for clarity in the Electrum desktop wallet's sign/verify and encrypt/decrypt message dialogs. It does not change what the code actually does, how it processes use…

0906fc20by SomberNight+45−181 file
No security note in commit
Informational 18 AI analysisMessage 50 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

coldcard: fix get_soft_device_id() discarding its return value

This is a tiny one-line bug fix in Electrum's Coldcard hardware wallet plugin. A helper method that is supposed to fetch a software-based device identifier was calling the parent implementation but accidentally throwing away the result ins…

Missing return value causes method to always return NoneAffects hardware wallet device identification onlyNo change to signing, encryption, or authentication code
d7500508by Felipe Micaroni Lalli+1−11 file
No security note in commit
Informational 19 AI analysisMessage 96 · Strong
EL ElectrumElectrum BitcoinSoftware wallets

qml: strip whitespace from message before signing, as in qt gui

This commit fixes a minor consistency bug in Electrum's newer QML (mobile-style) user interface. When signing a message, the app now removes accidental spaces at the start or end of the message and address, just like the older desktop Qt i…

Behavioral inconsistency between GUI implementations could cause user confusion or failed verificationNo cryptographic weakness introduced; change is input normalizationNo memory-unsafe code, no privilege changes, no network changes
72507328by Ferdinando Ametrano+3−01 file
No security note in commit
Low 48 AI analysisMessage 85 · Strong
EL ElectrumElectrum BitcoinSoftware wallets

config: don't save "hidden wallet" paths in CURRENT_WALLET cv

This commit fixes a privacy leak in the Electrum wallet app. Previously, if a user opened a 'hidden wallet' (one whose filename starts with a dot, like a secret file), Electrum would remember it as the last-used wallet and could reopen it …

Privacy leak: hidden wallet filename persisted in config and could be auto-reopenedInformation disclosure: hidden wallet path exposed in recently-opened listBehavioral fix: setter silently drops sensitive value rather than persisting it
c43cf8e4by SomberNight+14−23 files
No security note in commit
Low 28 AI analysisMessage 73 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

lnrouter: liquidity hints: add extra penalty if amt near cannot_send

This commit tweaks how Electrum's Lightning Network payment routing avoids channels where a previous payment attempt already failed. Previously, the router would treat a channel almost at its known failure limit almost the same as a channe…

Routing/liquidity-hint logic changed to penalize amounts close to a known cannot_send thresholdAdds defensive assertions on num_inflight_htlcs type and rangeSelf-described by author as a 'completely naive bandaid' / heuristic improvement
ee75ea31by SomberNight+12−21 file
No security note in commit
Repository ledger

Explore captured commits

Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.

Lower-priorityfastlane: revert full_description to plain textby SomberNight · 224c5fa6 · Oct 21, 2025 · 1 fileMessage 76 · AdequateInformational 15Details
Commit message · SomberNight

fastlane: revert full_description to plain text

Rich text does not work reliably.
This reverts to the old formatting, but keeps some of the reordering/text changes.
follow-up https://github.com/spesmilo/electrum/pull/9492

I compared looking at the description in:
- google play store app
- google play store website [1]
- fdroid app
- fdroid website [2]

notes:
- Links work on playstore website and fdroid website, but not in the apps.
In the apps, they are not even shown at all, they are just ignored.
- ul/li/b tags do not work on playstore website

[1] https://play.google.com/store/apps/details?id=org.electrum.electrum
[2] https://f-droid.org/en/packages/org.electrum.electrum/

76/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only changes the marketing description text shown for the Electrum app on Google Play and F-Droid. It switches from HTML-style formatting (like bold and bullet lists) back to plain text because the formatting did not display correctly on all platforms. There is no change to the actual wallet software or its security.

Lower-prioritylnworker: fix todo, collect failed htlcs in paymentby f321x · f5aa82d4 · Oct 21, 2025 · 1 fileMessage 53 · ThinInformational 23Details
Commit message · f321x

lnworker: fix todo, collect failed htlcs in payment

This makes `LNWallet.pay_to_node()` wait
`PaySession.TIMEOUT_WAIT_FOR_NEXT_RESOLVED_HTLC` (0.5 sec) for another
htlc to get resolved after receiving a htlc failure during a payment
attempt.
This seems to make payments more reliable in scenarios where we receive
multiple htlc failures closely after each other as
`create_route_for_payment` then has access to the failed routes/failure
information of all these htlcs when trying to re-split the outstanding
amount.

53/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context! Contains work-in-progress language
AI analysis · Informational 23/100

This change tweaks how Electrum's Lightning payment code reacts when one payment chunk (HTLC) fails. Instead of immediately trying a new route based on a single failure, it waits up to 0.5 seconds to collect any other failures that arrive almost at the same time. That gives the re-splitting logic more complete information, making multi-part payments more reliable. It is a reliability/robustness improvement, not a fix for a security vulnerability.

Lower-prioritytimelock_recovery: recovery destination checks for address is_mine or script outputby Sander van Grieken · dc417a4f · Oct 20, 2025 · 1 fileMessage 65 · AdequateLow 46Details
Commit message · Sander van Grieken

timelock_recovery: recovery destination checks for address is_mine or script output

note: validation in frontend should be added to backend code as well

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Low 46/100

This commit adds safety checks to a wallet recovery feature. It prevents users from accidentally setting a recovery transaction that sends funds back to the same wallet they are trying to recover, or to a non-address destination. The commit message notes that frontend validation should also exist in backend code, suggesting this is only a partial fix in the user interface layer.

Lower-prioritychore: fix comment for electrum/gui/qt/main_window.pyby dulanting · 08fd2de0 · Oct 13, 2025 · 1 fileMessage 77 · AdequateInformational 15Details
Commit message · dulanting

chore: fix comment for electrum/gui/qt/main_window.py

Signed-off-by: dulanting <dulanting@outlook.jp>

77/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit fixes a single typo in a code comment, changing 'treat is as' to 'treat it as'. It does not change any executable code or program behavior.

Lower-prioritytests: fix DeprecationWarnings for py3.14: asyncio.iscoroutinefunctionby SomberNight · dbacb503 · Oct 9, 2025 · 2 filesMessage 83 · StrongInformational 15Details
Commit message · SomberNight

tests: fix DeprecationWarnings for py3.14: asyncio.iscoroutinefunction

same as https://github.com/spesmilo/electrum/pull/10197

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
AI analysis · Informational 15/100

This commit only updates test helper code to stop using a Python function that will be removed in a future Python version. It does not change Electrum's wallet, networking, or cryptography code, and it does not fix any security bug.

Lower-priorityci: add task to also run unit tests with new python 3.14by SomberNight · 2dc9ca90 · Oct 9, 2025 · 1 fileMessage 72 · AdequateInformational 15Details
Commit message · SomberNight

ci: add task to also run unit tests with new python 3.14

72/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Mentions testing or verification! No meaningful explanatory body
AI analysis · Informational 15/100

This commit only updates the project's automated testing configuration to add Python 3.14 to the list of versions used during routine tests. It does not change any application code, user-facing behavior, or security-sensitive logic.

Lower-prioritylnworker: (trivial) add a few missing type-hintsby SomberNight · 6e45d6e6 · Oct 9, 2025 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · SomberNight

lnworker: (trivial) add a few missing type-hints

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 15/100

This commit only adds Python type-hints to three method signatures in Electrum's Lightning Network worker code. It does not change any runtime behavior, logic, or data handling. There is no security relevance.

AI review queuedfollow-up prev: add type-hints, etcby SomberNight · 3379e462 · Oct 9, 2025 · 2 filesMessage 45 · ThinInformational 15Details
Commit message · SomberNight

follow-up prev: add type-hints, etc

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is a minor code cleanup that adds Python type-hints and slightly refactors two helper methods. It does not change program behavior or fix any security issue.

AI review queuedtransaction: (move-only) move some methods from Tx to PartialTx clsby SomberNight · f1ad5bc2 · Oct 9, 2025 · 1 fileMessage 65 · AdequateInformational 15Details
Commit message · SomberNight

transaction: (move-only) move some methods from Tx to PartialTx cls

these were already assuming `isinstance(self, PartialTransaction)`

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is a pure code reorganization: four helper methods were moved from the base Transaction class to the more specific PartialTransaction subclass. The code itself is unchanged, and the commit message explicitly states it is 'move-only'. There is no security fix or behavior change visible in the diff.

Lower-priorityqt: main_window.confirm_tx_dialog: rm dead codeby SomberNight · f832c33d · Oct 9, 2025 · 1 fileMessage 45 · ThinInformational 12Details
Commit message · SomberNight

qt: main_window.confirm_tx_dialog: rm dead code

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 12/100

This commit removes unused code from Electrum's Qt graphical interface. The deleted block checked whether the wallet had enough funds before opening a transaction confirmation dialog, but it was already marked by the developers as likely broken ('FIXME this check looks broken?') and appears to be dead code. The change does not introduce new behavior; it only cleans up an unused code path and makes a function argument keyword-only.

AI review queuedwallet: (trivial) mark calc_unused_change_addresses as privateby SomberNight · 58676219 · Oct 7, 2025 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · SomberNight

wallet: (trivial) mark calc_unused_change_addresses as private

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit simply renames a wallet method by adding an underscore prefix, which is a Python convention for 'this is intended for internal use only.' No behavior, logic, or security properties of the code change. It is a cosmetic/private-API marking.

Lower-prioritylnworker: set OPTION_ONION_MESSAGE_OPT feature if we are forwarding.by ThomasV · f4e7ffd5 · Oct 7, 2025 · 1 fileMessage 50 · ThinInformational 19Details
Commit message · ThomasV

lnworker: set OPTION_ONION_MESSAGE_OPT feature if we are forwarding.

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 19/100

This commit changes how Electrum advertises its Lightning network features. When the wallet is configured to forward payments (including trampoline payments), it now tells other nodes it supports onion messages. This is a protocol-correctness fix: a node that forwards payments should advertise the feature it is actually using. It is not a fix for an active exploit, but it removes a minor inconsistency that could affect interoperability or routing.

Lower-prioritylnurlw: follow-up: adapt to recent lnworker.get_bolt11_invoice refactorby SomberNight · af671504 · Oct 3, 2025 · 2 filesMessage 50 · ThinInformational 15Details
Commit message · SomberNight

lnurlw: follow-up: adapt to recent lnworker.get_bolt11_invoice refactor

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 15/100

This is a routine code update that changes how two parts of Electrum's user interface call an internal Lightning invoice function. The old function signature was replaced with a newer one, so the code was adjusted to match. There is no indication this fixes or introduces a security issue.

Lower-prioritylnurlw: follow-up: fix android edge-to-edge layout paddingby SomberNight · ef8d53c4 · Oct 3, 2025 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · SomberNight

lnurlw: follow-up: fix android edge-to-edge layout padding

as per https://github.com/spesmilo/electrum/pull/9993#issuecomment-3228252596

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
AI analysis · Informational 15/100

This commit is a minor user-interface follow-up that adjusts Android edge-to-edge layout padding for a Lightning withdrawal dialog. It adds one line setting a padding flag to false so the dialog renders correctly on newer Android versions. There is no security relevance in the change itself.

AI review queuedcli: add command to export preimageby f321x · b57f867c · Sep 30, 2025 · 3 filesMessage 76 · AdequateInformational 21Details
Commit message · f321x

cli: add command to export preimage

..also export preimage in check_hold_invoice return value if available.

I intentionally did not return the preimage in the returned dict of
wallet.export_requests as this seems risky to do considering some users
of the cli might forward the response to a payer and the payserver
exposes it too.

Closes https://github.com/spesmilo/electrum/issues/10176

76/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 21/100

This commit adds a new command-line feature to export the secret 'preimage' for a settled Lightning invoice, and also includes the preimage in the result of checking a held invoice. The preimage is the cryptographic proof that a Lightning payment was received; anyone who knows it can claim the payment. The developers deliberately avoided exposing the preimage in some other command outputs because it could be accidentally shared with a payer or exposed via the payment server. The change itself is a feature addition, not a fix for an active vulnerability, but it touches sensitive secret material.

AI review queuedlnworker: enforce creation of PaymentInfo for b11by f321x · 286fc4b8 · Sep 30, 2025 · 9 filesMessage 68 · AdequateLow 46Details
Commit message · f321x

lnworker: enforce creation of PaymentInfo for b11

Enforce that the information used to create a bolt11 invoice using
`get_bolt11_invoice()` is similar to the related instance of PaymentInfo
by requiring a PaymentInfo as argument for `get_bolt11_invoice()`.
This way the invoice cannot differ from the created PaymentInfo.
This allows to use the information in PaymentInfo for validation of
incoming htlcs more reliably.

To cover all required information for the creation of a b11 invoice the
PaymentInfo class has to be extended with a expiry and
min_final_cltv_expiry. This requires a db upgrade.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Low 46/100

This commit tightens how Electrum creates Lightning invoices so the stored payment record and the generated invoice always match. Previously, callers passed invoice details separately, creating a risk that the invoice could differ from what Electrum later used to validate incoming payments. Now a single PaymentInfo object is required, and it stores extra fields (expiry and minimum locktime) so validation can rely on it. This is a defensive hardening change, not a fix for a known active exploit.

Lower-prioritylnpeer: move htlc forwarding funcs to lnworkerby f321x · d62b627a · Sep 30, 2025 · 3 filesMessage 60 · AdequateInformational 11Details
Commit message · f321x

lnpeer: move htlc forwarding funcs to lnworker

forwarding happens independent of the peer that received the htlc to
forward and fits better in lnworker.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 11/100

This commit is a straightforward code reorganization: it moves several Lightning Network HTLC (payment forwarding) helper functions from the peer-specific file (lnpeer.py) into the broader worker file (lnworker.py). The actual logic, checks, and behavior of the functions are preserved almost unchanged. There is no indication this change fixes or introduces a security vulnerability.

Lower-prioritylnonion: (trivial) make OnionPacket.__init__ kw-onlyby SomberNight · 3d27992f · Sep 29, 2025 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · SomberNight

lnonion: (trivial) make OnionPacket.__init__ kw-only

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 15/100

This is a tiny code-style change that forces callers to name each argument when creating an OnionPacket object. It does not change what the code does, only how callers must write their arguments. There is no security issue here.

Lower-prioritylnutil: rename RecvMPPResolution.ACCEPTEDby f321x · 32aa6ab2 · Sep 29, 2025 · 6 filesMessage 58 · ThinInformational 15Details
Commit message · f321x

lnutil: rename RecvMPPResolution.ACCEPTED

Renames RecvMPPResolution.ACCEPTED to .COMPLETE as .ACCEPTED is somewhat
misleading. Accepted could imply that the preimage for this set has been
revealed or that the set has been settled, however it only means that we
have received the full set (it is complete), but the set still can be
failed (e.g. through cltv timeout) and has not been claimed yet.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit is a simple renaming of an internal label from 'ACCEPTED' to 'COMPLETE' to make the code's meaning clearer. It does not change what the program actually does, only the names used inside the code. There is no security fix or vulnerability here.

Lower-prioritylnonion: check onion version in process_onion_packetby f321x · 6a4ad9e6 · Sep 29, 2025 · 1 fileMessage 73 · AdequateLow 42Details
Commit message · f321x

lnonion: check onion version in process_onion_packet

Adds checks for the onion version in process_onion_packet and fails it
back with the correct error instead of raising in the OnionPacket
constructor.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Low 42/100

This change tightens how Electrum's Lightning code handles onion-routed payment packets. Previously, an unsupported onion packet version would trigger a broad exception while the packet was being decoded. Now the version is stored and checked later in processing, allowing the code to send a proper Lightning protocol failure message back instead of crashing or misbehaving. It is a defensive correctness fix rather than a clear-cut vulnerability patch.

Lower-prioritylnpeer: only spawn htlc_switch for peers with LNWalletby f321x · 7d0a69a9 · Sep 29, 2025 · 1 fileMessage 65 · AdequateLow 33Details
Commit message · f321x

lnpeer: only spawn htlc_switch for peers with LNWallet

stop spawning htlc_switch for LNGossip peers, they don't handle any
htlcs

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Low 33/100

This commit stops a background task called htlc_switch from running for simple Lightning Network gossip-only peers. Previously, this task was started for all peers, including ones that only exchange network routing information and never handle actual payments. The change moves the task start so it only runs for full wallet peers. The commit message frames this as a cleanup because gossip peers don't handle HTLCs (payment channels), not as a security fix. There is no direct evidence in the commit of an exploitable vulnerability.

Lower-prioritylnworker: move RecvMPPResolution and status to lnutilby f321x · fcc37960 · Sep 29, 2025 · 3 filesMessage 73 · AdequateInformational 15Details
Commit message · f321x

lnworker: move RecvMPPResolution and status to lnutil

it is required both in lnpeer and lnworker, moving it to lnutil seems to
make more sense.

# Conflicts:
# electrum/lnworker.py

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit is a simple code cleanup: it moves two Lightning Network data structures (RecvMPPResolution and ReceivedMPPStatus) from one file to another shared utility file so both lnpeer.py and lnworker.py can use them without circular imports. There is no functional change and no security relevance.

Lower-prioritylightning: remove legacy payment secret derivationby f321x · 9db975f9 · Sep 29, 2025 · 3 filesMessage 65 · AdequateLow 26Details
Commit message · f321x

lightning: remove legacy payment secret derivation

This seems old and not very useful anymore.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Low 26/100

This commit removes an old fallback method Electrum used to check Lightning payment secrets. Previously, when receiving a Lightning payment, Electrum would accept either the current payment secret or a legacy one derived from the payment preimage. The commit drops the legacy fallback. This is a cleanup change that slightly tightens validation, but it is not a clear security fix and could theoretically break payments from very old wallets that still use the legacy secret.

Security candidatelnonion: make comparisons more constant timeby f321x · 0ae60d8b · Sep 29, 2025 · 1 fileMessage 68 · AdequateLow 49Details
Commit message · f321x

lnonion: make comparisons more constant time

makes hmac comparisons and onion error decoding more constant time
according to bolt 4. However things might still not be perfectly
constant time, however this seems out of scope for timing over network.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
constant-time or timing behavior
AI analysis · Low 49/100

This commit hardens Electrum's Lightning onion routing code against timing attacks. It replaces a normal HMAC comparison with a constant-time one, so an attacker can't learn secrets by measuring how quickly checks fail. It also changes how failed onion error messages are decoded so that the number of hops in a payment route is hidden, matching the Lightning network specification.

Lower-prioritylnutil: make UpdateAddHtlc dataclassby f321x · e6ea6dbf · Sep 29, 2025 · 3 filesMessage 50 · ThinInformational 15Details
Commit message · f321x

lnutil: make UpdateAddHtlc dataclass

it is straightforward to move UpdateAddHtlc away from attr
to a dataclass without requiring any db update.

50/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit is a routine internal refactoring: it converts a Lightning Network data structure called UpdateAddHtlc from using the third-party 'attr' library to Python's built-in 'dataclasses'. It also removes a legacy dictionary-to-object conversion path and adds validation checks when creating these objects. There is no security fix or vulnerability here.