EL
← All projectsElectrum

Electrum

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

BitcoinSoftware walletsNormal
Repository coverage

1153 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.

92security candidates261second-pass queue1007AI analyses
127commits · 30 days
262commits · 60 days
545commits · 180 days
1002commits · 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.

66/100 average clarity
220Strong · 80–100
549Adequate · 60–79
340Thin · 40–59
44Opaque · 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.
ThomasV137891162
SomberNight39330362063
f321x40325387070
Sander van Grieken10910101057
ghost4342517069
Felix25410072
user323062
ekzyis222053
accumulator613071
Roman Zeyde515053
Sasha Zykov515075
Aaron Fiore414068
Analysis record

Published AI watches

Last scanned 1 hour, 2 minutes ago

Low 29 AI analysisMessage 58 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10992 from f321x/dedup_is_seed_wizard

This commit simplifies the seed-validation logic in Electrum's Qt wallet wizard by replacing a local copy of the rules with a call to an existing shared validation method. The change appears to be a code-cleanup refactor that removes dupli…

Refactor of seed-validation logic in wallet creation wizardRemoval of duplicated seed-type checks in favor of centralized validationAdded assertion constraining seed type to 'electrum'
554daca6by ghost43+2−81 file
No security note in commit
Low 29 AI analysisMessage 73 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10982 from spesmilo/wizard_2fa_seed_redirect

This commit changes Electrum's wallet creation wizard so that if a user tries to restore a normal 'standard' wallet but pastes a seed phrase that actually belongs to a two-factor authentication (2FA) wallet, the wizard automatically redire…

UX-level safety fix preventing wallet-type/seed mismatchState mutation: wizard_data['wallet_type'] changed from 'standard' to '2fa' based on seed typeNo cryptographic, network, or privilege changes
310c9dd0by Felix+102−133 files
No security note in commit
Informational 12 AI analysisMessage 68 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

qt: wizard: dedup seed validation rules

This commit is a small code cleanup in Electrum's wallet setup wizard. It removes a duplicate copy of the rules used to check whether a recovery seed is valid and instead reuses an existing method. There is no indication this fixes a secur…

89d0de06by f321x+2−81 file
No security note in commit
Informational 15 AI analysisMessage 70 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

tests: wizard: cover standard -> 2fa redirection

This commit only adds and reorganizes automated test code for Electrum's wallet creation wizard. It does not change any production wallet logic, cryptography, or network handling. The tests verify that when a user tries to restore a 'stand…

70b4d27cby f321x+68−91 file
No security note in commit
Informational 15 AI analysisMessage 78 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10988 from f321x/update_security_review_ci_model

This commit updates Electrum's internal CI (continuous integration) script that runs an automated security review using Anthropic's Claude Code tool. It changes the AI model version used for reviews from 'claude-opus-5' to 'claude-opus-5-5…

CI hardening: detects and reports AI model downgrades during automated security reviewNo changes to application code, cryptography, network protocol, or build artifactsNo privilege escalation, injection, or data-exfiltration vectors introduced by the diff
638fbba8by Felix+75−111 file
No security note in commit
Informational 12 AI analysisMessage 90 · Strong
EL ElectrumElectrum BitcoinSoftware wallets

ci: security review: warn if the model got downgraded

This commit updates Electrum's own CI security-review script. It adds detection and warnings when the automated code reviewer (Claude Code) silently falls back to a different AI model, for example after a content-policy refusal. It does no…

CI-only changeNo modification of wallet, crypto, networking, or build artifactsAdds detection for AI model fallback/downgrade in automated security review
ace2ca7aby f321x+74−101 file
No security note in commit
Low 44 AI analysisMessage 68 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10987 from spesmilo/fix_10986

This commit fixes a bug where Electrum failed to recognize certain already-signed Bitcoin transactions as complete. Specifically, for native SegWit inputs, Bitcoin Core can produce a finalized PSBT with a valid witness but an empty scriptS…

Logic error in transaction completeness detectionNative SegWit witness handling edge casePSBT interoperability issue with Bitcoin Core
bef80421by ghost43+11−02 files
No security note in commit
Low 35 AI analysisMessage 81 · Strong
EL ElectrumElectrum BitcoinSoftware wallets

transaction: treat native segwit input with non-empty witness as complete

This commit fixes a bug where Electrum incorrectly treated finalized Bitcoin transactions as incomplete. Some wallet software (like Bitcoin Core and Sparrow) creates native SegWit transactions that omit an empty placeholder field Electrum …

Logic error in transaction completeness detectionPotential denial of service / user funds stuck due to refusal to broadcast valid finalized transactionInteroperability failure with Bitcoin Core and Sparrow PSBT output
e9bb42e6by ThomasV+11−02 files
No security note in commit
Moderate 68 AI analysisMessage 73 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10981 from spesmilo/do_not_sign_txin_with_witness

This change prevents Electrum from re-signing Bitcoin transaction inputs that already contain a witness (the data proving the input was authorized). The patch fixes a bug where Electrum could incorrectly sign a non-SegWit input as if it we…

Incorrect signature algorithm selection for non-SegWit inputs when witness data is presentPSBT handling edge case where pre-existing witness data influences signing pathPotential invalid signature production during transaction signing
9da4c342by ThomasV+10−21 file
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10974 from SomberNight/202609_nostr_psbt_xpub

This commit only adds a long code comment explaining a design choice in Electrum's PSBT-over-Nostr plugin. It does not change any program behavior. The comment documents that the plugin derives each cosigner's Nostr secret key from their B…

Documentation-only changeExplicit design tradeoff disclosure: cosigners can derive each other's Nostr secret keys from shared xpubsNo functional code change
46408a78by ThomasV+13−01 file
No security note in commit
Low 42 AI analysisMessage 73 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10980 from spesmilo/add_input_from_network_do_not_ignore_exceptions

This is a one-line bugfix in Electrum's transaction handling. Previously, the code accidentally swallowed (hid) almost all exceptions when fetching extra transaction data from the network, only re-raising errors that were both network-rela…

Exception swallowing bug fixedNetwork/transaction input enrichment logic changedSilent failure mode removed
bb9d3280by ghost43+1−11 file
No security note in commit
Moderate 60 AI analysisMessage 58 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10970 from f321x/fix_bolt11_bugs_2

This commit fixes several bugs in Electrum's handling of BOLT11 Lightning invoices. The most user-visible fixes are: stricter validation of invoice amounts (rejecting zero, negative, sub-millisatoshi, and leading-zero amounts), correct pad…

Stricter BOLT11 amount validation prevents acceptance of zero, negative, sub-millisatoshi, and leading-zero amountsFixed int_to_data5 padding bug that corrupted small timestamp values during invoice round-tripMalformed 'r' routing tags now raise exceptions instead of being silently skipped
4b92c0f2by ghost43+82−939 files
No security note in commit
Moderate 61 AI analysisMessage 80 · Strong
EL ElectrumElectrum BitcoinSoftware wallets

add_info_from_network: do not swallow exceptions

Electrum's transaction builder had a bug where it would ignore certain consistency errors when fetching extra transaction data from the network. A malicious or misbehaving server could supply a wrong input amount, and Electrum would silent…

Swallowed exception leading to use of attacker-controlled input valuePSBT input consistency check bypassedPotential malicious Electrum server influence on transaction signing
3f67b21bby ThomasV+1−11 file
Vendor flagged security relevance
Informational 15 AI analysisMessage 60 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

bolt11: remove tag arg from get_routing_info

This is a small code cleanup change. A function that reads routing hints from Lightning invoices no longer takes a tag argument because only one type of routing hint ('r') is now supported. All callers are updated accordingly. There is no …

e78fba28by f321x+12−127 files
No security note in commit
Moderate 62 AI analysisMessage 73 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10940 from accumulator/fix_10937

This commit tightens how Electrum parses Bitcoin payment requests (BOLT11 lightning invoices and BIP21 URIs). It turns previously uncaught internal errors into proper validation failures, rejects malformed invoice fields that used to be si…

Stricter input validation for externally supplied BOLT11 invoices and BIP21 URIsPreviously uncaught exceptions (ValueError, UnicodeDecodeError, ecc errors) are now wrapped in domain-specific decode exceptionsMalformed fallback addresses are skipped rather than aborting or crashing
a57ef6e7by Felix+707−9610 files
No security note in commit
Low 40 AI analysisMessage 36 · Opaque
EL ElectrumElectrum BitcoinSoftware wallets

bolt11: followup #10940

This commit tightens how Electrum parses BOLT11 Lightning invoices. It now rejects duplicate 'n' (node pubkey) tags instead of silently keeping only the first one, and it rejects invoice timestamps that are negative or too far in the futur…

Stricter validation of invoice timestamp boundsDuplicate 'n' tag now raises an exception instead of being silently droppedFollow-up to prior PR #10940, indicating a recent area of security-sensitive review
3026fbdbby f321x+14−232 files
No security note in commit
Low 32 AI analysisMessage 73 · Adequate
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10737 from sashazykov/hw-close-wallet-thread-leak

This commit fixes a shutdown bug in Electrum's hardware wallet support. Previously, if disconnecting from a hardware wallet failed, the cleanup thread could keep running, which could crash the application when closing. The fix stops the th…

Process abort/crash at shutdown due to leaked QThreadException during cleanup not handled, potentially causing abnormal terminationHardware wallet client close made best-effort with error logging
5b77ca46by Felix+9−22 files
No security note in commit
Informational 23 AI analysisMessage 58 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10958 from SomberNight/202609_deps

This commit is a routine dependency update for the Electrum Bitcoin wallet. It bumps versions of Python, OpenSSL, secp256k1, and various Python packages used in builds and runtime. The commit itself does not fix any known security bug in E…

Dependency version bumps for cryptographic libraries (OpenSSL, libsecp256k1, electrum-ecc)Routine maintenance commit with no explicit security claimHash-only changes in deterministic requirements files
8bd8c3fbby ghost43+57−5612 files
No security note in commit
Informational 21 AI analysisMessage 58 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

Merge pull request #10965 from SomberNight/202609_header_checkpoints

This commit only adds new Bitcoin block header checkpoints to Electrum's built-in chain data files. Checkpoints are hardcoded reference points that help the wallet verify it is following the real blockchain and not a fake one. Updating the…

Hardcoded blockchain checkpoints extended for all supported networksNo executable code or cryptographic logic changedNo bug fix, privilege change, or input validation change present
9e0b7e64by ghost43+276−04 files
No security note in commit
Informational 15 AI analysisMessage 58 · Thin
EL ElectrumElectrum BitcoinSoftware wallets

update block header checkpoints

This commit simply refreshes Electrum's built-in list of Bitcoin blockchain checkpoints. Checkpoints are known-good block hashes that help the wallet verify it is following the real chain. The update adds newer checkpoints for mainnet, sig…

e11c579bby SomberNight+276−04 files
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-priorityREADME: tests: add note about pytest-xdistby SomberNight · 166aa50a · Dec 15, 2025 · 1 fileMessage 55 · ThinInformational 15Details
Commit message · SomberNight

README: tests: add note about pytest-xdist

55/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only adds a helpful note to the README explaining that the test suite can be run faster in parallel using a pytest plugin called pytest-xdist. It does not change any program code, fix any bug, or alter any security-related behavior.

Lower-prioritylnsweep: lnwatcher needs to keep_watching if htlc in dont_settle_htlcsby SomberNight · 7e1fd008 · Dec 15, 2025 · 3 filesMessage 73 · AdequateModerate 59Details
Commit message · SomberNight

lnsweep: lnwatcher needs to keep_watching if htlc in dont_settle_htlcs

If RHASH is in lnworker.dont_settle_htlcs, we should not reveal
the preimage. But also, we should not disregard the htlc either.

E.g. during a JIT channel open, payment going A->B->C,
C would release the preimage to B (lsp) to cover the costs of the
JIT channel-open. If the upstream A->B channel gets force-closed, B should
only pull the HTLC's funds if he is sure he can forward them to C.

lnwatcher needs to keep watching (i.e. wait) until the RHASH gets removed from
lnworker.dont_settle_htlcs, or until the CLTV of the HTLC expires.

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

This commit fixes a logic bug in Electrum's Lightning channel-sweeping code. Previously, if a payment hash was in a special 'do not settle yet' list used during JIT (just-in-time) channel opens, the wallet would simply ignore the related HTLC output instead of continuing to watch it. That could let an attacker or a forced channel close steal funds because the wallet might stop monitoring before it was safe to claim the money. The fix makes the watcher keep watching those outputs until either the condition clears or the HTLC's deadline expires.

Lower-priorityplugin: timelock recovery: more i18nby f321x · 095debcd · Dec 15, 2025 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · f321x

plugin: timelock recovery: more i18n

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

This commit only wraps existing English user-interface text strings in Electrum's internationalization (i18n) function so they can be translated into other languages. It does not change program logic, security checks, wallet behavior, or transaction handling. There is no security relevance.

Lower-prioritytests: rm TestPeerDirect::test_dont_settle_htlcsby f321x · e0b835ee · Dec 15, 2025 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · f321x

tests: rm TestPeerDirect::test_dont_settle_htlcs

The new test
TestPeerForwarding::test_dont_settle_htlcs_receiver_and_forwarder covers
the receiver as well as the forwarder. So this unittest becomes obsolete
as it only tests the receiver.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit simply removes an automated test that had become redundant because a newer test covers the same behavior more thoroughly. It does not change any production code, user-facing behavior, or security mechanism.

Lower-prioritytests: lnpeer: test_dont_settle_htlc_receiver_and_forwarderby f321x · cd1157ec · Dec 15, 2025 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · f321x

tests: lnpeer: test_dont_settle_htlc_receiver_and_forwarder

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Mentions testing or verification! No meaningful explanatory body
AI analysis · Informational 15/100

This commit only adds a new automated test to Electrum's Lightning networking code. It checks that a node configured not to settle certain HTLCs (payment promises) actually refrains from releasing the payment preimage, both as the final receiver and as a forwarding node. There is no change to production code, no bug fix, and no security patch in the diff itself.

Lower-prioritylnpeer: dont remove from dont_settle_htlcs when failingby f321x · 060cbff8 · Dec 15, 2025 · 1 fileMessage 73 · AdequateModerate 57Details
Commit message · f321x

lnpeer: dont remove from dont_settle_htlcs when failing

Don't remove a payment hash from LNWallet.dont_settle_htlcs and
dont_expire_htlcs if we are failing it.
We might see another htlc with the same payment hash and
should still not settle or expire it.

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

This change fixes a bug in Electrum's Lightning Network code. Previously, when the wallet decided to reject (fail) an incoming multi-part payment, it would remove the payment hash from two internal safety lists. Those lists are meant to prevent the wallet from prematurely settling or letting the payment expire while it is still waiting for all parts. Removing the hash during a failure could cause a later part of the same payment to be settled or expired incorrectly, potentially leading to loss of funds or routing problems. The patch simply stops removing the hash when failing.

Lower-prioritylnpeer: forwarding: dont release preimage if dont_settle_htlcby f321x · 9906eb42 · Dec 12, 2025 · 1 fileMessage 65 · AdequateModerate 58Details
Commit message · f321x

lnpeer: forwarding: dont release preimage if dont_settle_htlc

If a payment hash is in LNWallet.dont_settle_htlcs the preimage
shouldn't be released even when just forwarding.

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

This commit fixes a bug in Electrum's Lightning Network payment forwarding. Normally, Electrum can mark certain payment hashes as 'do not settle' (dont_settle_htlcs), meaning it should not reveal the secret preimage that unlocks a payment. However, the old code would reveal that secret anyway when the payment was being forwarded through the node, not just when the node was the final recipient. The fix checks the 'do not settle' list before releasing the preimage, even during forwarding.

Lower-prioritylnworker: prevent creation of PaymentInfo with 0 expby f321x · 2f2340d6 · Dec 12, 2025 · 1 fileMessage 93 · StrongLow 32Details
Commit message · f321x

lnworker: prevent creation of PaymentInfo with 0 exp

In some parts of the application 0 (sec) == no expiry, however we
use `LN_EXPIRY_NEVER` (100 years) instead of 0 for lightning invoices.

This replaces a 0 second expiry with `LN_EXPIRY_NEVER` in
`LNWallet.create_payment_info()` to prevent htlcs for no-expiry invoices
from getting failed incorrectly (which the assert prevented)
and fix the assertion error in #10350.

Fixes #10350.

# Conflicts:
# electrum/lnworker.py

93/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
AI analysis · Low 32/100

This commit fixes a bug in Electrum's Lightning invoice handling where an invoice with no expiry date could be stored with an expiry of 0 seconds. In Electrum, 0 seconds means 'no expiry' in some places, but the Lightning code expects a special 'never expire' value (100 years) instead. The bug caused an internal assertion to fail, which could crash the wallet or make incoming Lightning payments fail unexpectedly. The fix replaces 0 with the proper 'never expire' value when creating payment information.

Lower-priorityqt: make ElectrumWindow.lightning_button widerby f321x · 7ccf1187 · Dec 12, 2025 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · f321x

qt: make ElectrumWindow.lightning_button wider

Qt was showing the lightning_button percentage string while syncing gossip
as `...` instead of the percentage as the minimum width of the button
seemed too small. Increasing this a bit fixes the issue.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit is a tiny user-interface tweak: it makes a Lightning Network status button slightly wider so that its percentage text (shown while syncing network gossip) is not cut off and displayed as '...'. There is no security issue here.

Lower-priorityandroid: add run-time patch to make pycryptodomex workby SomberNight · 5b67f21b · Dec 11, 2025 · 1 fileMessage 93 · StrongInformational 16Details
Commit message · SomberNight

android: add run-time patch to make pycryptodomex work

to work around https://github.com/kivy/python-for-android/issues/1866 :

> PyCryptodome >=3.6.0 crashes at runtime (since commit https://github.com/Legrandin/pycryptodome/commit/f5aa2c1618e97b6d773172fdd07794a0a6f05905). So actually the currently pinned version in the recipe does not work:
> https://github.com/kivy/python-for-android/blob/80e4f059c1ee0da48a7c85167087dfe5928ac395/pythonforandroid/recipes/pycryptodome/__init__.py#L5
>
> The issue at runtime is with ctypes.
>
>
> Say I have a main script that just does the following (https://github.com/Legrandin/pycryptodome/blob/95ccce7ae82d3a36f1a8652dd2c645222d0128dd/lib/Crypto/Util/_raw_api.py#L200):
> ```
> import ctypes
> ctypes.pythonapi.PyObject_GetBuffer
> ```
>
> This works with cpython on my laptop, but with the p4a-compiled python on Android it fails:
>
> ```
> 06-14 19:06:27.053 15246 15274 I python : Android kivy bootstrap done. __name__ is __main__
> 06-14 19:06:27.053 15246 15274 I python : AND: Ran string
> 06-14 19:06:27.053 15246 15274 I python : Run user program, change dir and execute entrypoint
> 06-14 19:06:27.092 15246 15274 I python : Traceback (most recent call last):
> 06-14 19:06:27.092 15246 15274 I python : File "/home/user/wspace/electrum/.buildozer/android/app/main.py", line 84, in <module>
> 06-14 19:06:27.093 15246 15274 I python : File "/home/user/wspace/electrum/.buildozer/android/platform/build/build/other_builds/python3-libffi-openssl-sqlite3/armeabi-v7a__ndk_target_21/python3/Lib/ctypes/__init__.py", line 369, in __getattr__
> 06-14 19:06:27.093 15246 15274 I python : File "/home/user/wspace/electrum/.buildozer/android/platform/build/build/other_builds/python3-libffi-openssl-sqlite3/armeabi-v7a__ndk_target_21/python3/Lib/ctypes/__init__.py", line 374, in __getitem__
> 06-14 19:06:27.094 15246 15274 I python : AttributeError: undefined symbol: PyObject_GetBuffer
> ```
>
> I have also tried to access some other attributes of `ctypes.pythonapi`, such as `Py_IncRef`, which raises the same exception.

---

Unclear if the issue still affects newer p4a: upstream seems to think it's fixed, but there multiple comments in the thread saying otherwise. Anyway, rebasing p4a has other blockers atm.

93/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
AI analysis · Informational 16/100

This commit adds a small Android-only workaround so that a cryptography library (pycryptodomex) can load correctly inside the Electrum mobile app. It replaces the way Python finds its own C API with an explicit path to the Python shared library. There is no direct security vulnerability here; it is a compatibility patch for a packaging/toolchain issue. However, it is a 'hack' that touches low-level Python internals, so it could in theory affect app stability or future updates.

Security candidateandroid build: switch from "cryptography" to "pycryptodomex"by SomberNight · cfa052bc · Dec 11, 2025 · 2 filesMessage 73 · AdequateInformational 17Details
Commit message · SomberNight

android build: switch from "cryptography" to "pycryptodomex"

We had been using an ancient version of "cryptography" so far in our p4a fork,
however it is not compatible with OpenSSL 3.0. (Previously we were building it with OpenSSL 1.1)

Bumping "cryptography" is difficult, as building new versions of it from source requires a full rust toolchain.

Instead, this commit switches to "pycryptodomex", as a replacement, which is much easier to build from source.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
cryptography-sensitive path
AI analysis · Informational 17/100

This commit changes the Android build recipe for the Electrum Bitcoin wallet. It swaps one cryptographic library (cryptography) for another (pycryptodomex) because the old library could not be built with newer OpenSSL and the newer version is hard to compile. There is no direct evidence in the commit that this fixes a security vulnerability; it appears to be a build-maintenance change.

Lower-priorityandroid build: bump openssl (1.1.1w -> 3.0.18)by SomberNight · 2d4d4dbd · Dec 11, 2025 · 2 filesMessage 45 · ThinLow 47Details
Commit message · SomberNight

android build: bump openssl (1.1.1w -> 3.0.18)

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

This commit updates the version of OpenSSL used to build the Electrum Android app from an older 1.1.1 series to the newer 3.0.18 series. OpenSSL is the widely used encryption library that secures network connections. The older 1.1.1 branch reached its official end-of-life in September 2023, meaning it no longer receives security fixes. Moving to a supported 3.0.x release is a routine maintenance step that reduces long-term security risk, but the commit itself does not claim to fix any specific known vulnerability.

Lower-prioritybuild: bump electrum-aionostr to 0.1.0by SomberNight · e188102e · Dec 11, 2025 · 2 filesMessage 57 · ThinInformational 7Details
Commit message · SomberNight

build: bump electrum-aionostr to 0.1.0

57/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope! No meaningful explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 7/100

This commit simply updates a required library version from 0.0.11 to 0.1.0 in Electrum's dependency files. There is no code change shown, and no information is provided about why the library was updated or whether the new version fixes any security issue. On its own, this commit is just a routine build/dependency bump.

Security candidatetransaction: tx_from_any: rm all whitespaces from str, none from bytesby SomberNight · 37db6ea7 · Dec 11, 2025 · 3 filesMessage 73 · AdequateLow 44Details
Commit message · SomberNight

transaction: tx_from_any: rm all whitespaces from str, none from bytes

- whitespaces are safe to remove from strings, and is convenient if we do this for users
- bytes-like inputs should be left alone: individual bytes that look like whitespaces can appear in them anywhere
- even stripping the leading/trailing whitespaces is not safe to do: the first byte of the nVersion or the last byte of the nLocktime might look like whitespace too!
- instead, leading/trailing whitespaces can be stripped closer to where they are input, e.g. in the GUI
- e.g. ".txn" files that we ourselves create contain a complete tx as a hex string, with a trailing final newline in the file
- instead of reading that as bytes, we can read it as text
- ".psbt" files OTOH are binary

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 44/100

This commit fixes a bug in how Electrum reads transaction files. Previously, the program would strip whitespace from both text and raw binary transaction data. For binary data, this is dangerous because a byte that looks like a space or newline can legitimately appear in a transaction. The fix reads text files as text (and strips whitespace) and binary files as raw bytes (without altering them). This prevents certain unusual but valid transactions from being corrupted when loaded from a file.

AI review queuedtransaction: tx_from_any: follow-up: only rm whitespaces from stringsby SomberNight · 16363cc3 · Dec 11, 2025 · 2 filesMessage 50 · ThinLow 37Details
Commit message · SomberNight

transaction: tx_from_any: follow-up: only rm whitespaces from strings

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 · Low 37/100

This commit tightens how Electrum cleans up transaction data before parsing. Previously, when given raw transaction bytes, the code would strip out any byte that looked like whitespace (such as tab or newline bytes). That is risky because a real Bitcoin transaction can legitimately contain bytes like 0x0a (which looks like a newline). The fix only removes whitespace from text strings, and only trims leading/trailing whitespace from byte inputs. It also improves an error message so raw bytes are shown safely. This is a defensive hardening change that prevents possible transaction misparsing or crashes, but the commit itself does not claim a specific exploit.

Security candidatetransaction: psbt.from_raw_psbt: clarify hex input must be strby SomberNight · 9af0195f · Dec 11, 2025 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · SomberNight

transaction: psbt.from_raw_psbt: clarify hex input must be str

no functional change (besides incorrect input now raising a different exception)

```
>>> bytes.fromhex(b"deadbeef")
TypeError: fromhex() argument must be str, not bytes
```

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet path
AI analysis · Informational 15/100

This is a tiny code cleanup in Electrum's transaction handling. The change removes a check that accepted bytes for a hex-encoded PSBT, because Python's bytes.fromhex() only accepts strings anyway. The commit message explicitly says there is no functional change except that bad input now raises a slightly different error. There is no security issue here.

Lower-prioritytest: lnpeer: add test_decode_short_idsby f321x · b4fc39ca · Dec 11, 2025 · 1 fileMessage 57 · ThinInformational 15Details
Commit message · f321x

test: lnpeer: add test_decode_short_ids

57/100 · ThinMessage clarity
✓ Descriptive subject✓ Uses a recognizable type or scope✓ Mentions testing or verification! No meaningful explanatory body
AI analysis · Informational 15/100

This commit only adds a new automated test for an existing function called decode_short_ids in Electrum's Lightning network code. It does not change any production code, fix a bug, or introduce new behavior. There is no security issue here.

Lower-prioritylnpeer: decode_short_ids: check length of short idsby f321x · 1ebb937d · Dec 11, 2025 · 1 fileMessage 81 · StrongModerate 50Details
Commit message · f321x

lnpeer: decode_short_ids: check length of short ids

- if `encoded_short_ids` does not decode into a whole number of `short_channel_id`:
- MAY send a `warning`.
- MAY close the connection.
https://github.com/lightning/bolts/blob/0cf21511a781c295b9374aeaef37cf9c4d193502/07-routing-gossip.md?plain=1#L674

# Conflicts:
# electrum/lnpeer.py

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
AI analysis · Moderate 50/100

This commit adds a length check to a function that decodes Lightning network channel identifiers from peer messages. Previously, if a peer sent a malformed list whose byte count was not a multiple of 8, the function would silently produce partial or misaligned identifiers. The change now rejects such inputs and may warn or disconnect the peer, following the Lightning protocol spec.

Lower-prioritylnpeer: remove support for zlib compressionby f321x · 380d7ede · Dec 11, 2025 · 1 fileMessage 76 · AdequateLow 33Details
Commit message · f321x

lnpeer: remove support for zlib compression

Must not be used anymore according to bolt 7:
https://github.com/lightning/bolts/blob/0cf21511a781c295b9374aeaef37cf9c4d193502/07-routing-gossip.md?plain=1#L600

76/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
AI analysis · Low 33/100

This commit removes the ability of Electrum's Lightning peer code to decompress routing data using zlib. The change follows an updated Lightning protocol rule (BOLT 7) that says uncompressed routing data must be used. Keeping zlib support could, in theory, allow a malicious peer to send a specially crafted compressed payload that causes crashes, excessive memory use, or other unexpected behavior. The patch is straightforward and defensive, but it is a partial removal: it only stops accepting compressed data and does not add broader input-size checks.

AI review queuedtx: replace whitespace chars in raw tx stringby f321x · 7d307048 · Dec 11, 2025 · 2 filesMessage 68 · AdequateInformational 23Details
Commit message · f321x

tx: replace whitespace chars in raw tx string

Removes all whitespace characters from a raw transaction string.
This is useful for example when loading raw transactions from text input
as it happens that there are some newline characters in the text.
I noticed this when copying-pasting from a timelock recovery pdf.

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 · Informational 23/100

This commit changes how Electrum cleans up raw Bitcoin transaction text that users paste into the wallet. Previously it only trimmed whitespace from the beginning and end. Now it removes all whitespace characters (including newlines and spaces) anywhere inside the string. This is a usability fix for copy-pasting transactions from documents such as a timelock recovery PDF. It is not a security patch, but it slightly reduces the chance that a malformed or trick pasted transaction could behave unexpectedly.

AI review queuedwizard: handle UserFacingException in WCWalletPasswordHardwareby f321x · 47124179 · Dec 10, 2025 · 1 fileMessage 73 · AdequateLow 29Details
Commit message · f321x

wizard: handle UserFacingException in WCWalletPasswordHardware

Handles `UserFacingException` in the `WCWalletPasswordHardware` step of
the hardware wallet wizard flow. This fixes the previous FIXME and
prevents the crash reporter from getting triggered if the the user e.g.
disconnects his hardware wallet during the wallet encryption step.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: broader security terminologysecond-pass: security-sensitive path
AI analysis · Low 29/100

This commit fixes a bug in Electrum's wallet setup wizard where unplugging a hardware wallet during the encryption step could crash the application by opening an error-report dialog. The fix catches the expected error gracefully, shows a friendly message, and lets the user retry instead of triggering the crash reporter.

Lower-prioritylnworker/lnpeer: don't use lnworker.channels.get(chan_id)by SomberNight · c465f7c3 · Dec 10, 2025 · 3 filesMessage 85 · StrongLow 32Details
Commit message · SomberNight

lnworker/lnpeer: don't use lnworker.channels.get(chan_id)

- lnworker.channels takes a copy of the whole dict, to make it thread-safe
- in LNWallet class, can just use self._channels.get(chan_id)
- otherwise there is lnworker.get_channel_by_id
- same for lnpeer.channels.get and lnpeer.get_channel_by_id

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Low 32/100

This commit is a code-quality and performance fix in Electrum's Lightning Network code. It replaces calls to `lnworker.channels` and `lnpeer.channels`—which make full thread-safe copies of the channel dictionary—with direct lookups using existing helper methods or the internal `_channels` dictionary. The stated goal is to avoid unnecessary copying. There is no direct evidence in the commit that this fixes an exploitable security vulnerability, but it reduces the risk of race conditions or inconsistent state that could theoretically affect Lightning payment handling.

AI review queuedwallet_db: convert_version_66: trivial simplificationby SomberNight · 745318d1 · Dec 10, 2025 · 1 fileMessage 40 · ThinInformational 15Details
Commit message · SomberNight

wallet_db: convert_version_66: trivial simplification

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

This is a one-line code cleanup that changes how a constant number is written. The value 147712 is rewritten as 0x24100, which is the exact same number in hexadecimal notation. A comment is also slightly reordered. There is no functional change and no security relevance.

AI review queuedledger: throw UserFacingException for OSErrorby f321x · aa47a960 · Dec 10, 2025 · 1 fileMessage 80 · StrongInformational 18Details
Commit message · f321x

ledger: throw UserFacingException for OSError

Throws UserFacingException if the communication with the ledger fails
due to an OSError. This happens e.g. if the Bitcoin app has been closed.
We shouldn't get crash reports for errors due to disconnection.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
second-pass: broader security terminology
AI analysis · Informational 18/100

This is a small user-experience fix for Electrum's Ledger hardware wallet plugin. When the Ledger device disconnects or its Bitcoin app is closed during use, the software previously generated an internal crash report. Now it shows a friendly on-screen message instead. There is no indication this change fixes a security vulnerability or introduces one.

Lower-prioritylnchannel: allow deleting unfunded incoming channelsby f321x · c34efce9 · Dec 10, 2025 · 4 filesMessage 73 · AdequateLow 28Details
Commit message · f321x

lnchannel: allow deleting unfunded incoming channels

We tried to delete incoming channels that didn't get funded after
lnutil.CHANNEL_OPENING_TIMEOUT, however an assert prevented this:

```
3.63 | E | lnwatcher.LNWatcher.[default_wallet-LNW] | Exception in check_onchain_situation: AssertionError()
Traceback (most recent call last):
File "/home/user/code/electrum-fork/electrum/util.py", line 1233, in wrapper
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/code/electrum-fork/electrum/lnwatcher.py", line 117, in check_onchain_situation
await self.update_channel_state(
...<5 lines>...
keep_watching=keep_watching)
File "/home/user/code/electrum-fork/electrum/lnwatcher.py", line 135, in update_channel_state
chan.update_onchain_state(
~~~~~~~~~~~~~~~~~~~~~~~~~^
funding_txid=funding_txid,
^^^^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
closing_height=closing_height,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
keep_watching=keep_watching)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/code/electrum-fork/electrum/lnchannel.py", line 341, in update_onchain_state
self.update_unfunded_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/user/code/electrum-fork/electrum/lnchannel.py", line 382, in update_unfunded_state
self.lnworker.remove_channel(self.channel_id)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/home/user/code/electrum-fork/electrum/lnworker.py", line 3244, in remove_channel
assert chan.can_be_deleted()
~~~~~~~~~~~~~~~~~~~^^
AssertionError
```

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

This commit fixes a bug where Electrum could not clean up incoming Lightning channels that never received their on-chain funding transaction. Previously, an internal safety check (assert) blocked deletion, causing repeated crashes in the background watcher. The patch adds proper timeout logic so these stale, unfunded channels can be removed safely. It is a reliability/DoS fix rather than a direct theft-of-funds vulnerability.