AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Moderate 61 Monero

Merge pull request #1510 from cypherstack/electrum-client-per-wallet-refactor

Public commit record

What the developer wrote

Authored by Julian

58/100 · Thin
Merge pull request #1510 from cypherstack/electrum-client-per-wallet-refactor

Electrum client per wallet refactor
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
The short version

What changed, and why it matters

This is a large refactor of how the Stack Wallet app connects to Electrum servers. Previously, all wallets of the same coin shared one global Electrum connection, which could leak wallet activity across wallets and made it hard to cleanly close connections. The change gives each wallet its own Electrum client, adds per-request timeouts, improves failover logic, and introduces a way to pin a specific TLS certificate for a node instead of blindly trusting any certificate. It also fixes several lifecycle bugs where restore/cancel flows could leave connections open. The commit is defensive in nature and does not appear to introduce a new vulnerability, but because it is large and touches certificate handling, it warrants careful review.

Recommended action

Treat this as a security-relevant refactor rather than a vulnerability patch. Reviewers should focus on: (1) whether the new certificate pinning logic correctly rejects non-matching certificates on failover nodes, (2) whether DrainingElectrumClient retirement always completes and does not leak connections under exceptions, (3) whether _resetAdapter/closeAdapter races with in-flight requests, and (4) whether the trustedCertificatePem field is properly cleared when a node's endpoint changes. No immediate user action is required.

Security signals we found

01

Shared Electrum client manager removed; per-wallet client isolation added

02

TLS certificate pinning/trust-on-first-use support added for Electrum nodes

03

Per-request timeouts added instead of single global timeout

04

Failover and Tor-route-change handling refactored with draining connections

05

Restore/cancel lifecycle now closes temporary Electrum connections

06

Malformed trusted certificate PEMs dropped during backup restore

07

Notifications service no longer creates independent Electrum client per check

Risk score

Why this scored 61/100

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