#19460 multiprocess: Add bitcoin-wallet -ipcconnect option
| Reviewability | Reviews | Agreement | Size | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| #19460 multiprocess: Add bitcoin-wallet -ipcconnect option | Review #10102 first | 0 | Blocked | 4,183 + 197 tests | |||||||||||||||
|
|
|
| ||||||||||||||||
Reviewability: ReadyStalePaused Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs. Size: lines added or modified outside tests, then in tests; greener = smaller. | |||||||||||||||||||
Goal
Adds an `-ipcconnect` option to `bitcoin-wallet` and an `-ipcbind` option to `bitcoin-node` for multiprocess builds. When configured, `bitcoin-node` listens on a domain socket and `bitcoin-wallet` connects to it on startup before running wallet commands, falling back to offline operation if configured with `-ipcconnect=auto`.
Problem: The `bitcoin-wallet` standalone utility operates only offline and cannot query chain state, sync balances, or trigger wallet RPC operations directly against a running node.
Evidence of importance:
- PR description: 'The idea is that `bitcoin-wallet` can be extended in the future to have some online functionality. For example, there could be a `bitcoin-wallet sync` command that will update balances and sync latest transactions to an unloaded wallet, or a `bitcoin-wallet serve` subcommand that loads a wallet and serves RPC requests...'
- PR description: 'This PR is small and doesn't do much. The only visible change is that `bitcoin-wallet` now checks whether a node socket exists on startup and prints "Connected to IPC address" if it can connect it it.'
Scope: The diff includes a large subtree update of `src/ipc/libmultiprocess` and commits from base PRs #10102 and #29409; the PR-specific change is isolated to a single commit (37e143e39c) adding IPC connection handling to `bitcoin-wallet`.
Risk of a mistake: low (wallet, tooling, build). Only affects optional multiprocess builds and adds IPC connection startup logic to the offline wallet tool without altering consensus or wallet disk formats.
Changed since the previous assessment: Rebased onto newer versions of base branches including Cap'n Proto IPC interface updates, subtree updates for libmultiprocess, and minor signal handling improvements.
Reviewability
Ready · Review #10102 first
Stacked on #10102; the base PR's changes are included in this diff.
Waiting on (from the thread read):
- author: response to ajtowns' objection to combining CLI and daemon behavior 2026-04-27
Agreement
Blocked
objection that needs a change, nobody has replied (ajtowns)
Thread notes: c:2738025949 was updated with further rebases on top of base PR #10102, but does not address ajtowns' objection.
Objections, suggestions, and questions:
| Reviewer | Type | Harm, request, or question | Status | Must be | Author replied | Quote |
|---|---|---|---|---|---|---|
| jonasschnelli (contributor) | objection, approach | compromising bitcoin-wallet's role as a strictly offline tool | answered · author clarified that offline functionality remains guaranteed and node is optional | answered | yes | 2020-12-18: 'My understanding is/was that `bitcoin-wallet` is an offline wallet exploring and manipulation tool without the requirement of a node or online connectivity.' Status from: 2020-12-18: ryanofsky: 'This PR gives `bitcoin-wallet` tool ability to do online things as well as offline things. It doesn't require a node or ' |
| maflcko (member) | question, maintenance | whether the next rebase would have to revert #33459 | answered · author confirmed and incorporated into base PR | answered | yes | 2025-09-27: 'I guess on the next rebase, this would have to revert https://github.com/bitcoin/bitcoin/pull/33459 ?' Status from: 2025-09-30: ryanofsky: 'Thanks! I incorporated this into next #10102 update' |
| ajtowns (member) | objection, approach | combining CLI tool and daemon behavior into one binary creates extra work and is a potential footgun for users | open | changed | no | 2026-04-27: 'Combining the two just seems like more work and a potential footgun for users to me.' |
Participants:
- jonasschnelli (contributor, objection, 1 statements 2020-12-18 to 2020-12-18): questioned mixing online node connectivity into bitcoin-wallet
- RonSherfey (none, neutral, 3 statements 2021-04-11 to 2021-08-22): approved without rationale; account has no project history
- Korosiua1206 (none, neutral, 1 statements 2024-05-09 to 2024-05-09): empty approval review; account has no project history
- maflcko (member, question, 1 statements 2025-09-27 to 2025-09-27): asked whether a rebase would need to revert #33459
- ajtowns (member, objection, 1 statements 2026-04-27 to 2026-04-27): objected that overloading daemon behavior onto bitcoin-wallet creates extra work and is a potential footgun
Dependencies
Files
236 lines under test/bench/ci.
- src/ipc/capnp/wallet.capnp +305/-0
- src/ipc/capnp/wallet.cpp +251/-0
- src/ipc/capnp/common-types.h +248/-2
- src/ipc/libmultiprocess/src/mp/util.cpp +216/-31
- src/ipc/capnp/chain.cpp +226/-0
- src/ipc/capnp/node.capnp +214/-0
- src/ipc/libmultiprocess/test/mp/test/test.cpp +208/-6
- src/ipc/libmultiprocess/test/mp/test/connect_tests.cpp +212/-0
- src/ipc/capnp/chain.capnp +207/-0
- src/ipc/libmultiprocess/src/mp/proxy.cpp +106/-47
- src/ipc/capnp/chain-types.h +128/-0
- src/ipc/libmultiprocess/test/mp/test/listen_tests.cpp +48/-77
- src/ipc/libmultiprocess/include/mp/proxy-io.h +79/-42
- src/ipc/capnp/node-types.h +110/-0
- src/ipc/capnp/node.cpp +97/-0
- src/ipc/libmultiprocess/src/mp/gen.cpp +48/-45
- src/init/bitcoin-wallet-ipc.cpp +85/-0
- src/ipc/libmultiprocess/test/mp/test/unixlistener.h +84/-0
- src/ipc/libmultiprocess/include/mp/util.h +63/-15
- src/util/btcsignals.h +65/-13
- src/test/btcsignals_tests.cpp +74/-0
- src/ipc/capnp/wallet-types.h +70/-0
- src/ipc/capnp/common.capnp +66/-0
- src/ipc/libmultiprocess/test/mp/test/foo.h +56/-1
- src/ipc/libmultiprocess/include/mp/proxy-types.h +40/-14
- src/ipc/libmultiprocess/include/mp/proxy.h +30/-23
- src/ipc/capnp/common.cpp +51/-0
- src/ipc/libmultiprocess/cmake/compat_config.cmake +0/-42
- src/ipc/capnp/init.cpp +40/-0
- src/ipc/capnp/node.h +40/-0
- src/ipc/libmultiprocess/include/mp/type-number.h +24/-15
- test/functional/test_framework/test_node.py +31/-8
- src/ipc/capnp/wallet.h +36/-0
- src/init/bitcoin-node.cpp +23/-12
- src/ipc/libmultiprocess/ci/scripts/ci.sh +34/-1
- src/ipc/libmultiprocess/.github/workflows/ci.yml +19/-14
- src/ipc/libmultiprocess/CMakeLists.txt +24/-9
- src/ipc/libmultiprocess/test/mp/test/spawn_tests.cpp +28/-5
- test/functional/interface_ipc.py +32/-0
- src/init/bitcoin-gui.cpp +8/-20
- src/ipc/CMakeLists.txt +28/-0
- src/ipc/libmultiprocess/test/mp/test/foo.capnp +28/-0
- src/ipc/capnp/common.h +27/-0
- src/ipc/libmultiprocess/include/mp/type-chrono.h +25/-2
- src/ipc/libmultiprocess/test/mp/test/common.h +27/-0
- src/ipc/capnp/init-types.h +25/-0
- src/ipc/libmultiprocess/include/mp/type-struct.h +12/-12
- src/bitcoin-wallet.cpp +19/-3
- src/ipc/libmultiprocess/cmake/iwyu-wrapper.sh +22/-0
- src/qt/bitcoin.cpp +18/-3
- src/ipc/libmultiprocess/include/mp/type-interface.h +10/-10
- src/ipc/libmultiprocess/shell.nix +13/-6
- src/ipc/libmultiprocess/include/mp/type-context.h +15/-3
- src/ipc/capnp/handler.capnp +17/-0
- CMakeLists.txt +14/-0
- src/ipc/capnp/context.h +14/-0
- src/ipc/libmultiprocess/.clang-tidy +12/-2
- src/node/interfaces.cpp +10/-4
- src/ipc/capnp/init.capnp +13/-0
- src/ipc/libmultiprocess/.github/workflows/bitcoin-core-ci.yml +8/-5
- src/ipc/libmultiprocess/example/calculator.cpp +4/-9
- src/ipc/libmultiprocess/example/printer.cpp +4/-9
- src/CMakeLists.txt +9/-3
- src/ipc/libmultiprocess/example/example.cpp +7/-5
- src/ipc/libmultiprocess/include/mp/type-char.h +9/-3
- test/functional/combine_logs.py +12/-0
- test/functional/feature_block.py +10/-2
- test/functional/wallet_multiwallet.py +6/-6
- src/wallet/wallettool.cpp +5/-6
- src/ipc/capnp/handler-types.h +10/-0
- src/ipc/interfaces.cpp +6/-4
- src/ipc/libmultiprocess/ci/scripts/run.sh +6/-4
- src/ipc/libmultiprocess/doc/versions.md +8/-2
- src/ipc/libmultiprocess/include/mp/type-map.h +6/-4
- src/interfaces/chain.h +5/-4
- src/ipc/libmultiprocess/ci/configs/netbsd.bash +1/-7
- src/ipc/libmultiprocess/cmake/pthread_checks.cmake +8/-0
- src/ipc/libmultiprocess/include/mp/type-set.h +4/-4
- src/ipc/libmultiprocess/include/mp/type-threadmap.h +4/-4
- src/ipc/libmultiprocess/include/mp/type-unordered-set.h +4/-4
- src/ipc/libmultiprocess/include/mp/type-vector.h +4/-4
- src/wallet/init.cpp +8/-0
- test/functional/wallet_fast_rescan.py +4/-4
- test/functional/wallet_resendwallettransactions.py +4/-4
- src/ipc/libmultiprocess/ci/configs/olddeps.bash +5/-2
- src/ipc/libmultiprocess/test/mp/test/foo-types.h +7/-0
- doc/multiprocess.md +6/-0
- src/init/basic.cpp +3/-3
- src/ipc/libmultiprocess/ci/configs/newdeps.bash +6/-0
- src/ipc/libmultiprocess/doc/design.md +3/-3
- src/ipc/libmultiprocess/doc/usage.md +6/-0
- src/qt/test/apptests.h +5/-1
- src/util/result.h +5/-1
- src/wallet/imports.h +5/-1
- src/wallet/wallettool.h +5/-1
- test/functional/wallet_groups.py +3/-3
- src/interfaces/init.h +4/-1
- src/interfaces/ipc.h +4/-1
- src/ipc/context.h +5/-0
- src/ipc/libmultiprocess/include/mp/type-data.h +2/-3
- src/wallet/types.h +5/-0
- src/bitcoind.cpp +3/-1
- src/init.cpp +2/-2
- src/interfaces/wallet.h +3/-1
- src/ipc/libmultiprocess/ci/configs/sanitize.bash +2/-2
- src/ipc/libmultiprocess/ci/scripts/config.sh +2/-2
- src/ipc/libmultiprocess/include/mp/type-string.h +3/-1
- src/qt/test/apptests.cpp +2/-2
- src/qt/walletcontroller.cpp +2/-2
- src/init/common.cpp +2/-1
- src/net.h +3/-0
- src/net_processing.h +3/-0
- src/wallet/coincontrol.h +3/-0
- test/lint/git-subtree-check.sh +2/-1
- contrib/devtools/circular-dependencies.py +1/-1
- doc/design/libraries.md +1/-1
- src/bitcoin-cli.cpp +1/-1
- src/init.h +1/-1
- src/init/common.h +1/-1
- src/ipc/libmultiprocess/ci/configs/default.bash +1/-1
- src/ipc/libmultiprocess/ci/configs/freebsd.bash +1/-1
- src/ipc/libmultiprocess/ci/configs/gnu32.bash +1/-1
- src/ipc/libmultiprocess/ci/configs/llvm.bash +1/-1
- src/ipc/libmultiprocess/ci/configs/macos.bash +1/-1
- src/ipc/libmultiprocess/ci/configs/openbsd.bash +1/-1
- src/ipc/libmultiprocess/cmake/TargetCapnpSources.cmake +1/-1
- src/ipc/libmultiprocess/doc/install.md +1/-1
- src/ipc/libmultiprocess/include/mp/type-function.h +1/-1
- src/ipc/libmultiprocess/include/mp/version.h +1/-1
- src/ipc/stub.cpp +1/-1
- src/netbase.h +2/-0
- src/qt/bitcoin.h +1/-1
- src/rpc/request.h +2/-0
- src/test/util/setup_common.cpp +1/-1
- src/wallet/interfaces.cpp +1/-1
- src/wallet/wallet.h +2/-0
- test/functional/wallet_createwallet.py +1/-1
- test/functional/wallet_descriptor.py +1/-1
- test/functional/wallet_encryption.py +1/-1
- test/functional/wallet_importdescriptors.py +1/-1
- test/functional/wallet_reorgsrestore.py +1/-1
- test/functional/wallet_startup.py +1/-1
- src/ipc/libmultiprocess/ci/README.md +1/-0
- src/ipc/libmultiprocess/include/mp/config.h.in +1/-0
- src/ipc/libmultiprocess/test/CMakeLists.txt +1/-0
- test/functional/feature_config_args.py +1/-0
- test/functional/feature_taproot.py +1/-0
- test/functional/test_framework/ipc_util.py +1/-0
- test/functional/wallet_transactiontime_rescan.py +1/-0
Card
The short text the ranking pass compares across PRs.
Adds an -ipcconnect option to bitcoin-wallet and -ipcbind to bitcoin-node for multiprocess builds, establishing an IPC connection over a local socket to a running node. The bitcoin-wallet utility is currently offline-only and cannot sync or interact with an active node. This change provides the underlying IPC connection scaffold needed for future online commands like wallet sync and RPC serving. It depends on #10102 and #29409 and unblocks #19461.
Data
thread read through 2026-04-27 (11 statements), head 37e143e39c
labels: Wallet, Build system, Utils/log/libs, Needs rebase · draft
Categories
Build and CI
P4 · cleanup
Build changes are incidental integration glue for the libmultiprocess subtree and IPC binaries. They do not address core build system issues, platform breakages, or Guix release reproducibility.
Membership: Carries the Build system label and includes CMakeLists.txt and subtree build configuration updates.
Factors: security/stability 0, bug 0, performance 0, user value 1, leverage 2
IPC / multiprocess
P2 · new feature
Advances the core multiprocess project by enabling separate wallet process communication with the node. Per the PR description, it introduces `-ipcconnect` and `-ipcbind` so `bitcoin-wallet` can connect to a running node over domain sockets, unblocking follow-up work in #19461.
Membership: Directly touches IPC infrastructure, including libmultiprocess, capnp interface definitions, and bitcoin-node/bitcoin-wallet IPC socket management.
Factors: security/stability 0, bug 0, performance 0, user value 1, leverage 2
Tools and scripts
P3 · new feature
Expands `bitcoin-wallet` options with `-ipcconnect` to allow connecting to a running daemon instead of only operating offline. The immediate change only verifies the socket connection on startup, but it lays the foundation for online subcommands.
Membership: Modifies the standalone `bitcoin-wallet` tool covered by this category.
Factors: security/stability 0, bug 0, performance 0, user value 1, leverage 2
Utilities (logging, arguments, libraries)
P4 · cleanup
Modifications under `src/util/` and `src/init/` serve the IPC connection glue rather than delivering general-purpose utility or logging improvements.
Membership: Carries the Utils/log/libs label and touches utility signal helpers and init files.
Factors: security/stability 0, bug 0, performance 0, user value 1, leverage 2
Wallet
P3 · new feature (ranking pass: Moved down: scaffolding only; the user-visible online-wallet features are deferred to later PRs.)
Enables the standalone wallet executable to connect to a node process, paving the way for online wallet operations like balance syncing. In this PR the change is limited to verifying node socket presence, leaving actual wallet feature integration to future work.
Membership: Carries the Wallet label and modifies wallet process initialization and startup interfaces.
Factors: security/stability 0, bug 0, performance 0, user value 1, leverage 2