Repository navigation
Description
Report
- This GUI issue applies to this repository.
- Existing issues were searched; no matching encryption-responsiveness issue was found.
Encrypting an existing populated testnet wallet makes qbit-qt appear frozen while the operation runs. During the September 23 inspection, the maintainer estimated roughly 20 seconds of apparent locking before the operation cleared. Encryption completed successfully and the wallet ended encrypted and locked. No persistent deadlock or data loss was observed.
This gives users no useful feedback during a sensitive wallet operation and can make a successful encryption look like a hung application.
Environment and reproduction
- Source:
1.x.xatc4b254e2d39f3a430b8b4a85798dd03ed47c3d98; the build still reports v1.0.0. - Native Apple Silicon macOS 26.4, RelWithDebInfo, GUI and wallet enabled; testnet4.
- Existing populated descriptor wallet, initially unencrypted, with the default 1,000-entry receive/change keypools. Use disposable test data for reproductions.
- Open the unencrypted wallet and let key validation finish.
- Choose Settings → Encrypt Wallet….
- Enter the new passphrase twice, click OK, then Continue in the encryption confirmation.
- Observe the interface until the encryption result appears.
Expected: The interface continues to repaint and displays that encryption is in progress; success or failure is clearly reported.
Observed: The interface appeared stuck until encryption finished. Subsequent getwalletinfo responded promptly with unlocked_until: 0, no pending/failed plaintext-key validation, and 1,000 entries in each active keypool.
Source evidence
The existing-wallet GUI path calls encryption synchronously:
AskPassphraseDialog::acceptcallsWalletModel::setWalletEncryptedfrom the dialog.WalletModel::setWalletEncryptedcalls the wallet interface, whoseencryptWalletdirectly invokesCWallet::EncryptWallet.CWallet::EncryptWalletencrypts existing keys, generates new descriptors/keypools, and rewrites the database before returning. The existing-wallet default isuse_create_keypool_warmup=false.
Live observation showed about one CPU core in use and progress through receive/change descriptor activation. A process sample was captured after the expensive operation cleared, so it is not evidence of the active hot stack. Source inspection establishes the synchronous GUI call path. The deferred unlock work in #143 is a different path.
Proposed scope and acceptance
Move the long operation off the GUI event loop or otherwise keep that loop responsive, with a visible progress state and clear completion/error handling. Preserve encryption atomicity and key/counter semantics.
- A GUI regression test keeps the encryption operation in progress and proves event-loop activity continues; it fails with the current synchronous implementation.
- Repeated clicks cannot start a second encryption, and incompatible wallet actions cannot race the active operation.
- Wallet unload, window close, and application shutdown safely wait for or complete the operation without accessing destroyed models. Do not introduce cancellation after an irreversible commit unless it has explicit safe semantics.
- Success leaves the wallet encrypted and locked; its history, receive addresses, and signing counters remain usable after backup/reopen and an unlock/send/relock check.
- Existing failure paths report errors, release temporary state appropriately, and do not weaken database transaction guarantees.
- Manually encrypt a populated testnet wallet and record the result, elapsed time, and responsiveness. Preserve current wallet state when testing recovery; do not restore stale signing counters.
Consensus/wire-format changes and permanent wallet decryption are outside this issue. This is a release-quality responsiveness fix; the observed encryption itself succeeded.
Release tracking
Tracked by #174 — v1.0.1 release readiness.
Activity
qt: defer transaction-table updates during wallet encryption
qt: take the wallet lock inside the address-book counting helper
qt: keep Encrypt Wallet responsive during existing-wallet encryption (#…
kiwidream commentedon Sep 25, 2026
Fixed by #178, merged into
1.x.xas a32081e. Merging into1.x.xdoesn't close issues automatically because it isn't the default branch.Acceptance, as covered by #178:
Remaining: the manual run of encrypting a populated testnet wallet, recording elapsed time and responsiveness. It moves to the #174 packaged-RC smoke checks. Follow-ups: #179 (
EncryptWalletraces that predate this change) and #180 (a transaction-list repaint during encryption can still block).qt: keep Encrypt Wallet responsive during existing-wallet encryption (#…