WIP: qt: refactor QML frontend onto owned models

bitcoin-core/gui-qml: PR #1142

Provider refusals

write_verifier: Provider declined the request because of a cybersecurity restriction. Experiments remain incomplete; static verification can continue.

1 major finding · 5 minor findings

Earlier concerns neither republished nor resolved: 1 major finding · 7 minor findings · 10 suggestions. See the Run archive for their assessments.

Findings

Link

[major] · A predictable /tmp intent directory lets another local user prevent GUI startup

On Unix with a shared sticky /tmp, another local user can pre-create /tmp/qml-intent-<victim uid> and prevent subsequent GUI launches until the directory is removed.

Location: qml/desktopintenttransport.cpp:364 (head).

Details and suggested fix

initialize() ignores failure from mkdir(..., 0700), then returns Rejected if the existing directory belongs to another user. Both existing-instance discovery and normal startup treat that rejection as fatal, even without a payment request. An attacker only needs to create the predictable directory before the victim does. The sticky bit then prevents the victim from removing it, so retries and a different data directory do not recover. This introduces a startup dependency absent from base; the Windows variant is not assessed here. Put the endpoint beneath an already protected per-user runtime directory or the data directory, rather than a predictable child of shared /tmp. Keep the ownership checks, but consider allowing a transport-disabled launch for this failure detected before any handoff.


Link

[minor] · A pre-commit signer exception traps Speed Up in Uncertain

A signer exception before commit now leaves Speed Up unusable until the wallet is reopened, whereas base let the exception escape.

Location: qml/walletbump.cpp:213 (head).

Details and suggested fix

For an external-signer wallet, pinned Core's fee-bump signing reaches ExternalSigner::Enumerate, which throws for an error entry or malformed fingerprint. walletbump::Execute catches this as Error::Uncertain before setting commit_attempted. The per-wallet bump model then refuses reset and re-preparation, while canRecheckOutcome is false because no commit was attempted. Consequently, even after the signer recovers, the overlay's status-check action remains disabled and other transactions cannot use Speed Up in that wallet opening. Classify exceptions occurring before a commit attempt as retryable failures, while preserving any relock error. Reserve submission uncertainty for operations that may actually have committed.


Link

[minor] · A known fee-bump refusal permanently locks the bump model

If the original confirms or gains descendants immediately before Core's final check, a normal refusal blocks Speed Up for the wallet opening; this race was not observed in production.

Location: qml/models/bumptransactionmodel.cpp:337 (head).

Details and suggested fix

walletbump::Execute maps a false commitBumpTransaction return to Error::Commit, which publishCommit classifies as Uncertain. Under the pinned Core contract, every normal false return occurs before wallet.CommitTransaction; even failure to mark the original replaced after committing returns true. The narrow race is after the application's scope and policy checks but before Core's final precondition check. Head refuses reset and further preparation, and a status recheck only changes reporting, never the state. Thus one refused replacement blocks Speed Up for every transaction until the wallet is reopened. Base instead entered Failed and allowed recovery. Treat the normal false return as Failed or NeedsRevalidation, retaining Uncertain for genuinely unknown commit outcomes.


Link

[minor] · An additive cluster check overrides testmempoolaccept for imported replacements

At the configured cluster limit, an imported replacement PSBT can lose Broadcast even when testmempoolaccept accepts it, because the preliminary check counts the original too; no production occurrence was observed.

Location: qml/psbtpolicy.cpp:98 (head).

Details and suggested fix

ReadNode calls checkChainLimits, whose pinned implementation stages only the candidate's addition. If the replacement shares an unconfirmed parent with its original, that temporary cluster contains both transactions. Actual replacement admission removes conflicts before checking cluster limits. Nevertheless, Evaluate returns Blocked for the additive failure before considering Admission::Allowed. This disables can_broadcast and also refuses the broadcast action. Base submitted the extracted transaction directly. The regression concerns imported PSBTs; wallet construction already used the additive helper under -walletrejectlongchains. When exact-transaction admission is allowed, do not let this construction-oriented cluster check override it.


Link

[minor] · Receive keeps supported types hidden after descriptor imports

A receive type that Core refused once stays hidden for the whole wallet opening, even after the user imports an active descriptor supporting it.

Location: qml/walletopening.cpp:398 (head).

Details and suggested fix

markReceiveTypeUnavailable only inserts into the session's negative cache. The handleCanGetAddressesChanged handler schedules an ordinary metadata refresh, which republishes the same cache, and availableReceiveAddressTypes continues excluding its entries. Pinned Core activates descriptor managers at runtime and emits this notification, so importing support through importdescriptors does not restore the picker entry until the wallet is unloaded and reloaded. Invalidate or re-probe the negative cache when address-generation capabilities change. Add a regression that first records a refusal and then imports a supporting active descriptor without reopening the wallet.


Link

[minor] · The backup confirmation can outgrow the window without scrolling

With a sufficiently long destination or short window, WalletBackupConfirmation can place approval buttons outside the visible area; the overflow has not been rendered or measured.

Location: qml/components/WalletBackupConfirmation.qml:19 (head).

Details and suggested fix

implicitHeight includes the entire Text.WrapAnywhere destination above the button row, and the popup centers that unrestricted height in the overlay. There is no height cap or scrolling region. Wallet settings disables native overwrite confirmation and routes the resolved destination here, while path inspection accepts inputs up to 32,768 bytes. When the wrapped content exceeds the window height, users can lose visible access to Save or Replace. Escape still cancels and no write occurs without approval. Cap the popup to the overlay height, scroll the path content, and keep the action row visible.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.

Background

Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.

Documented decisions

Settings migration and reset are recovery workflows: retaining the source or original backup until replacement is durable preserves the user's ability to retry with the same configuration.

Issue #1073 documents the rationale concretely. A failed migration could remove the legacy proxy before settings.json was written, and a later onboarding step could replace the original reset backup with already-cleared settings. Its stated requirements were to write the replacement before deleting the source and preserve the pre-reset backup through onboarding. Together with #981's separation of onboarding previews from live startup configuration, this explains why the settings/startup extraction needs explicit physical outcomes rather than treating navigation completion as persistence completion.

Source 1 · Source 2

RPC request display and recallable history are security-sensitive outputs even when a command fails; clearing visible output does not necessarily retire secrets.

Issue #1078 documented that createwallet and migratewallet passphrases and addhdkey private-key arguments remained visible and recallable after unsuccessful submissions. It also explained that QML maintained its own history filter, so fixes to the Widgets console did not automatically cross that boundary. This is the historical reason for the refactor's transient command-plan and secret-ownership work: backend rejection does not make request rendering or retention harmless.

Source 1

Unresolved disagreements

The inspected upstream discussion does not resolve whether immediate commit-time rejection feedback is the right abstraction, or whether construction-time checks and asynchronous status feedback should carry most of that responsibility.

In Core PR #36597, maflcko argued that permanently invalid wallet-created transactions should be fixed at construction, low-fee choices should be warned about before confirmation, and acceptance can later turn into eviction anyway. The author responded that imported PSBTs bypass wallet construction checks and can legitimately fail at commit, making an immediate reason useful. That distinction matters to the refactor's separate wallet-created and imported workflows and its cautious submission reporting. The captured exchange does not establish a final resolution, and one response was truncated.

Source 1 · Source 2 · Source 3