2 major findings · 13 minor findings · 3 suggestions
Earlier concerns neither republished nor resolved: 3 minor findings. See the Run archive for their assessments.
Findings
[major] · CoinControl IPC conversion excludes confirmed coins from automatic sends
The multiprocess GUI's default coin-control range becomes [0, 0] across IPC, so automatic sends cannot select confirmed coins.
Location: src/ipc/capnp/wallet.cpp:196 (head).
Details and suggested fix
The writer passes m_min_depth to setMaxDepth, and the reader assigns getMinDepth() to m_max_depth. The default range [0, 9999999] therefore becomes [0, 0]. In the multiprocess GUI, the cached balance check can still pass, but createTransaction forwards this coin control to wallet selection, where AvailableCoins excludes every confirmed output. A confirmed-only wallet consequently cannot complete an automatic send. Manually selected inputs use a separate path and can hide the problem. Write m_max_depth with setMaxDepth and read it with getMaxDepth. This conversion also omits the presence flags required to preserve locktime, version and maximum weight; set those flags when writing the corresponding values. Add a round-trip test with unequal depth bounds and nondefault fields, plus a confirmed-only automatic-send case.
[major] · Destination IPC conversion fails for PayToAnchor and WitnessUnknown
A wallet transaction containing either destination type cannot cross IPC, preventing the multiprocess GUI from loading that wallet's history.
Location: src/ipc/capnp/wallet.cpp:137 (head).
Details and suggested fix
PayToAnchor is a separate CTxDestination alternative, so std::get_if<WitnessUnknown> does not match it and serialization reaches the logic_error fallback. Conversely, the WitnessUnknown reader calls std::get<WitnessUnknown> on a newly constructed destination that holds CNoDestination, throwing bad_variant_access before decoding. MakeWalletTx extracts destinations from every output, including unowned outputs. A third party can therefore trigger history-transfer failure by paying the wallet in a transaction with an additional P2A or unknown-witness output. The failure persists while that transaction remains in the wallet; the exact GUI exception presentation has not been traced. Other destination-bearing calls, including recipient and address-book operations, share these failures. Add a lossless PayToAnchor representation and decode WitnessUnknown into a temporary before assigning it to the variant. Round-trip tests should cover every alternative starting from a default-constructed destination.
[minor] · Attaching a wallet-enabled GUI to a -disablewallet node aborts the node
The attached GUI uses its local wallet setting and requests a wallet loader that the separately configured node may not have.
Location: src/qt/bitcoin.cpp:349 (head).
Details and suggested fix
Start bitcoin-node -ipcbind=unix -disablewallet, with -disablewallet supplied only on that command line, then start a default wallet-enabled bitcoin-gui. Auto-attachment skips baseInitialize, but initializeResult constructs WalletController according to the GUI's local wallet setting. Its constructor calls walletLoader() over IPC. On the node, WalletInit::Construct returned without creating a loader, so NodeImpl::walletLoader reaches Assert(m_context->wallet_loader) and aborts the running node. Query wallet availability from the node before constructing wallet objects, and report an unavailable loader instead of asserting.
[minor] · Attaching during node startup can abort the node
The IPC listener opens before chainman exists, but an attached GUI immediately calls Node accessors that assert its presence.
Location: src/qt/bitcoin.cpp:347 (head).
Details and suggested fix
AppInitMain starts the -ipcbind listener before its later call to InitAndLoadChainstate creates the chainstate manager. A GUI that auto-attaches in this window goes directly through initializeResult, BitcoinGUI::setClientModel and setNumBlocks to ClientModel::getBlockSource. That calls isLoadingBlocks(), whose node implementation dereferences Assert(m_context->chainman), aborting the node. The same initialization routine also resets chainman when retrying a reindex. The startup window's duration has not been measured. Make attachment wait for node readiness before issuing these status calls, rather than treating a successful socket connection as completed initialization.
[minor] · Wallet scheduler can outlive its WalletContext during teardown
Proxy teardown destroys WalletLoaderImpl before stopping the scheduler, allowing its repeating callback to access a freed WalletContext.
Location: src/ipc/capnp/wallet.cpp:88 (head).
Details and suggested fix
The custom start implementation owns SchedulerThread through a proxy cleanup function. StartWallets schedules MaybeResendWalletTxs(context) every minute with a reference capture. Both invokeDestroy and asynchronous proxy destruction reset the implementation before running cleanups. ~WalletLoaderImpl unloads wallets but does not stop this scheduler, so a due callback can start after the loader and its WalletContext have been destroyed and then access the context's mutex through GetWallets. This requires a narrow interleaving during local shutdown or connection teardown. Stop and join the scheduler before destroying the loader, for example by making the loader own and stop it before releasing its context.
[minor] · IPC trace logging records wallet passphrases
Enabling -debug=ipc -loglevel=ipc:trace records secret-bearing wallet request payloads in process debug logs.
Location: src/ipc/capnp/wallet.capnp:23 (head).
Details and suggested fix
The new encryptWallet, unlock and changeWalletPassphrase requests carry passphrases as ordinary Data fields. clientInvoke logs request.toString() and serverInvoke logs params.toString() at trace level, exposing these fields in the logs of processes with IPC trace enabled. Escaping and truncation do not reliably conceal a typical short passphrase. WalletLoader passphrases and forwarded wallet RPC parameters use the same payload logging. Ordinary debug-level logging does not include these payloads. Redact secret-bearing requests or fields before formatting them, and add a regression check that a distinctive passphrase never appears in IPC trace logs.
[minor] · Successful restore without loading aborts the GUI's Result reader
Restore and Migrate returns a successful null wallet capability, but the IPC Result reader asserts that the value field is present.
Location: src/ipc/capnp/common-types.h:370 (head).
Details and suggested fix
MigrateWalletActivity::restore_and_migrate calls restoreWallet with load_after_restore=false. Successful restoration copies the backup into place without creating a wallet object, and WalletLoaderImpl returns that null pointer as a successful util::Result. The capability serializer leaves null pointers unset, so the Result reader reaches assert(result.hasValue()) and aborts the GUI before migration starts. The restored file remains on disk. Read the success value through a nullable field accessor, constructing an empty unique_ptr when absent instead of asserting presence. Add an IPC regression case for successful restoration without loading.
[minor] · setAddressBook changes an omitted purpose to RECEIVE
Relabeling an existing sending address through the multiprocess GUI can persistently reclassify it as a receiving address.
Location: src/ipc/capnp/wallet.capnp:34 (head).
Details and suggested fix
WalletModel::sendCoins passes an empty optional purpose when an existing recipient's label changes, meaning to preserve its purpose. The IPC request has only purpose :Int32, without hasPurpose. The writer leaves an empty optional unset, but the non-optional scalar accessor reports presence, so the server engages the optional with the default zero value, AddressPurpose::RECEIVE. SetAddressBookWithDB then stores that purpose, and the GUI classifies the external address as receiving after restart as well. Add hasPurpose :Bool to preserve absence and test relabeling an existing sending address over IPC.
[minor] · Failed IPC connections abort bitcoin-gui instead of reporting an error
Required-connection failures escape createNode outside every GUI exception handler and reach std::terminate.
Location: src/qt/bitcoin.cpp:295 (head).
Details and suggested fix
-ipcconnect=unix with no listening node, or an invalid explicit address, makes connectAddress propagate system_error or invalid_argument. Auto mode also propagates errors such as EACCES rather than falling back. GuiMain calls app.createNode(*init) before its try block, and the outer entry point simply returns GuiMain, so these ordinary startup failures abort the process without an initialization-error dialog. Catch failures around the connect, spawn and makeNode steps, display the initialization error, and return EXIT_FAILURE.
[minor] · Attached GUI initializes sync status from a -1 tip snapshot
Attaching to an already synced node can show the wallet as out of sync until another block-tip notification arrives.
Location: src/qt/bitcoin.cpp:348 (head).
Details and suggested fix
The external initialization branch supplies a default BlockAndHeaderTipInfo, whose height, time and progress fields are all -1. BitcoinGUI::setClientModel passes these values directly to the initial block display. The resulting old block timestamp selects the catching-up branch and enables the wallet's out-of-sync warning. ClientModel periodically polls mempool and byte counters, not block tips, so a quiet or offline node can leave this display wrong indefinitely. Once the node is ready, populate the snapshot from its current block and header status without rerunning AppInitMain. Test attachment at nonzero height without generating another block.
[minor] · Node settings calls can deadlock the IPC event loop
A GUI settings call can block the event loop on cs_args while a wallet setting update holds that lock waiting for an IPC callback.
Location: src/ipc/capnp/node.capnp:30 (head).
Details and suggested fix
isSettingIgnored, getPersistentSetting, updateRwSetting, forceSetting and resetSettings lack Proxy.Context, so their locking operations run synchronously on the node's shared event loop. Concurrently, wallet loading or unloading with a load-on-start update calls ChainImpl::updateRwSetting, which invokes the wallet's remote update callback while holding LockSettings. If a GUI settings request blocks the event loop on that lock before the callback completes, the worker cannot finish its callback and release the lock. The wallet operation and subsequent IPC then stall. Add context :Proxy.Context to these Node methods so they run on worker threads and leave the event loop available.
[minor] · Default auto-attach silently ignores GUI-supplied node options
Options such as -proxy, -onlynet and -walletbroadcast can silently have no effect when bitcoin-gui finds a listening node.
Location: src/qt/bitcoin.cpp:294 (head).
Details and suggested fix
createNode defaults to -ipcconnect=auto. A successful connection sets m_node_external, causing GuiMain to skip baseInitialize, the path that transfers the GUI's GlobalArgs to a newly spawned node. Node-scope command-line options are therefore accepted but not applied when a node is already listening. For example, bitcoin-gui -proxy=... -onlynet=onion cannot constrain that node's existing clearnet configuration, and wallet sends use the node's settings. Whether users rely on these GUI-supplied privacy options is unconfirmed, but silently ignoring explicit configuration is avoidable. Refuse automatic attachment when node-scope options were supplied, leaving -ipcconnect=unix as an explicit attachment choice.
[minor] · Wallet RPC metadata disappears across IPC
Wallet RPCs remain callable but disappear from OpenRPC discovery when their commands cross the Chain wrapper without metadata_fn.
Location: src/ipc/capnp/chain.cpp:185 (head).
Details and suggested fix
WalletLoaderImpl::registerRpcs preserves each command's metadata_fn before calling handleRpc. The IPC server reconstructs that command using only category, name, actor, argument names and unique ID, leaving its metadata callback null. CRPCTable::buildOpenRPCDoc skips commands without metadata, so wallet-enabled multiprocess bitcoin-node omits the separately hosted wallet methods from getopenrpcinfo and rpc.discover, although their actors remain callable. Transfer the metadata through the wrapper, for example through a remote metadata callback, and check that discovery includes wallet methods in both process modes.
[minor] · IPC passphrase copies have no explicit cleansing owner
The SecureString hooks delegate message-buffer cleansing, but interface callers cannot access those buffers and the invocation paths do not erase them.
Location: src/ipc/capnp/common-types.h:197 (head).
Details and suggested fix
The build hook copies passphrases into Cap'n Proto storage and says the caller must cleanse the output after sending; the read hook makes the same delegation for input storage. Those messages belong to clientInvoke and serverInvoke, while WalletModel and other interface callers only pass a SecureString and never receive the message buffers. The copies therefore sit outside SecureString's locked, cleansed allocator without an explicit transport erasure hook. Whether Cap'n Proto clears them before reuse, swap or a core dump is unconfirmed. Give the transport responsibility for erasing secret-bearing buffers after send and read, including error paths, rather than relying on interface callers.
[minor] · combine_logs omits child-process logs outside regtest
Tests using detected chain directories such as signet or testnet4 silently lose wallet and GUI logs from the combined diagnostics.
Location: test/functional/combine_logs.py:104 (head).
Details and suggested fix
read_logs determines chain from node0's debug-log location and uses it when opening each node log. The new wallet and GUI paths instead contain a literal regtest, and os.path.isfile silently skips those files when the actual chain directory differs. This omits debug.log.wallet and debug.log.gui from the combined test output. Use the detected chain in both child-process paths.
Optional improvements
[suggestion] · Attached clients receive lifecycle methods without server-side state checks
Lifecycle safety depends on trusted clients honoring the GUI's external-node guards rather than on the server rejecting invalid transitions.
Location: src/ipc/capnp/node.capnp:25 (head).
Details and suggested fix
Listener clients receive baseInitialize(globalArgs), appInitMain and appShutdown on the same Node interface used by an owning parent. Repeating baseInitialize replaces warnings, kernel and ECC objects even though live components can retain references, including KernelNotifications' warnings reference. GlobalArgs decoding also replaces node settings before initialization runs. The current GUI avoids these calls with nodeExternal() checks, and no current caller was identified that invokes them on an already-running node. Expose a narrower attach capability to listener clients while retaining full lifecycle control for the owning parent. This makes invalid lifecycle calls a server-enforced constraint rather than a client convention.
[suggestion] · Wallet scheduler launch policy permits deferred execution
The default std::async policy does not guarantee a background worker, so scheduled wallet rebroadcast work may remain unserviced.
Location: src/ipc/capnp/wallet.cpp:54 (head).
Details and suggested fix
std::async(lambda) permits both asynchronous and deferred execution despite the class promising to create a worker thread. If the implementation chooses deferred execution, serviceQueue() runs only when the destructor calls m_result.get(), after stopping the scheduler. The per-minute MaybeResendWalletTxs task consequently never runs during normal operation, without a worker-creation error being reported. Whether this occurs depends on the standard library and available thread resources. Pass std::launch::async so the worker starts asynchronously or its creation failure becomes visible.
[suggestion] · IPC connection help names the wrong default socket directory
The GUI and wallet help advertise sockets/node.sock, but default connections use node.sock directly in the network datadir.
Location: src/init.cpp:749 (head).
Details and suggested fix
Auto mode resolves to unix and calls the shared address parser with gArgs.GetDataDirNet() and bitcoin-node. That parser constructs <network datadir>/node.sock, with no sockets component, matching the existing -ipcbind help. A user binding at the newly documented path would create a different socket that auto-attach does not discover. Correct both new help strings to name node.sock in the network datadir, and remove the GUI string's "the an" typo.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [minor]: Auto-connect does not fall back after IPC setup fails
- [minor]: Splash-screen shutdown can stop an external node
- [minor]: Define network identity for custom IPC connections