#19460 multiprocess: Add bitcoin-wallet -ipcconnect option

full analysis

https://github.com/bitcoin/bitcoin/pull/19460 · ryanofsky · +4008/-549 in 139 files, 25 commits · labels: Wallet, Build system, Utils/log/libs · draft

Goal

  • Allow the wallet tool to connect directly to a running node over IPC
  • Lays the transport foundation for future online wallet subcommands without HTTP RPC

Adds an -ipcconnect option to bitcoin-wallet and an -ipcbind option to bitcoin-node in multiprocess builds. When enabled, bitcoin-wallet checks for and connects to a running bitcoin-node over a unix socket on startup, printing a connection message if successful.

Problem: The bitcoin-wallet tool is currently restricted to offline wallet file inspection and manipulation. Adding IPC connectivity to bitcoin-node enables future subcommands like online resyncing or interactive RPC shells without running the full daemon.

Category: IPC / multiprocess (#11 of 20)

P3 · new feature

  • P3 because it enables external wallet binaries to connect to a node process over IPC
  • It serves primarily as transport infrastructure to unblock follow-up PR #19461

P3 because it makes tangible progress on the multiprocess roadmap by allowing the wallet tool to communicate with bitcoin-node over IPC, though no wallet commands make use of the connection yet.

Membership: Adds IPC connection capabilities to bitcoin-wallet and binding options to bitcoin-node, touching interfaces/ipc.h and src/init/bitcoin-wallet-ipc.cpp.

Factors: security/stability 0, bug 0, performance 0, user value 1, leverage 2

Category: Tools and scripts (#11 of 22)

P3 · new feature

  • P4 because it only verifies socket connectivity and adds no operational subcommands
  • The tool cannot yet perform node-backed user actions over the new connection option

P3 because it equips the bitcoin-wallet tool with node connection capabilities, laying ground for future online subcommands.

Membership: Modifies src/bitcoin-wallet.cpp to add command line arguments and startup logic for IPC connections.

Factors: security/stability 0, bug 0, performance 0, user value 1, leverage 1

Category: Wallet (#68 of 84)

P3 · new feature

  • P4 because it does not affect core wallet logic, fund safety, or descriptor management
  • It provides no immediate utility to wallet users until subcommands use the socket

P3 because it prepares wallet tooling to operate against a live node over IPC, but does not yet deliver end-user wallet operations like sync or transactions.

Membership: Modifies wallet tool interfaces and options to support connecting to node chainstate over IPC.

Factors: security/stability 0, bug 0, performance 0, user value 1, leverage 1

Reviewability: Paused: Waiting on author

  • Review #29409 first
  • Stacked on top of unmerged multiprocess prerequisite PRs #29409 and #10102

ajtowns raised a fundamental architectural objection on 2026-04-27 questioning whether online IPC behavior belongs in bitcoin-wallet or in a new binary, which has remained unanswered for over four months.

Author status: active with rebase pushes, but has not replied to ajtowns' objection since April 2026

Open concerns:

  • ajtowns objected to overloading daemon and online behavior onto the existing offline bitcoin-wallet CLI tool rather than introducing a separate binary (e.g. bitcoin-walletd or bitcoin-wallet-ipc), noting potential user confusion and extra work.

Resolved concerns:

  • jonasschnelli raised a conceptual concern that bitcoin-wallet should remain strictly an offline tool; ryanofsky clarified that offline operation remains fully intact and node connectivity is completely optional.

Agreement: Blocked

  • Unaddressed question whether adding IPC to an offline CLI tool creates user footguns (ajtowns)
  • Cautioned against conflating offline wallet tooling with online daemon features (jonasschnelli)
  • Author clarified that standard offline wallet usage remains intact and default

Blocked: ajtowns objects that overloading bitcoin-wallet with daemon behavior is a user footgun; author has not replied since April 2026

ajtowns raised a blocking approach objection on whether offline and daemon functionality should be merged into bitcoin-wallet rather than creating a dedicated binary, which the author has not addressed.

  • 2020-12-18 jonasschnelli asked whether bitcoin-wallet offline guarantees remain intact; ryanofsky confirmed they do
  • 2026-04-27 ajtowns questioned the approach of overloading bitcoin-wallet instead of introducing a separate binary; no author reply

Objections:

ReviewerKindHarmStatusBlockingAuthor repliedQuote
jonasschnelliapproachcompromising bitcoin-wallet's role as a strictly offline toolresolvednoyes2020-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.'
Settled: 2020-12-18: ryanofsky replied that offline functionality is preserved and node connectivity is optional; jonasschnelli did not push back.
ajtownsapproachcombining offline CLI tool and daemon behavior into one binary is more work and a potential user footgunopenyesno2026-04-27: 'Why is this overloading daemon behaviour on an existing cli tool, instead of introducing a new binary like bitcoin-node or bitcoin-gui did? ... Combining the two just seems like more work and a potential footgun for users to me.'

Support:

  • RonSherfey: approved changes after review in 2021 [not substantive]

Participants: jonasschnelli (objection), RonSherfey (support), Korosiua1206 (neutral), maflcko (question), ajtowns (objection)

State derived from the lists: blocking objection open with no author reply (ajtowns)

Review verdicts (DrahtBot): 0

Dependencies

Depends on: #29409, #10102

Enables:

Based on (shares commits with): #10102, #29409

Base for: #19461

Files

173 lines under test/bench/ci.

  • src/ipc/capnp/wallet.capnp +269/-0
  • src/ipc/capnp/common-types.h +251/-2
  • src/ipc/capnp/wallet.cpp +251/-0
  • src/ipc/libmultiprocess/src/mp/util.cpp +216/-31
  • src/ipc/capnp/node.capnp +213/-0
  • src/ipc/libmultiprocess/test/mp/test/connect_tests.cpp +212/-0
  • src/ipc/capnp/chain.cpp +208/-0
  • src/ipc/libmultiprocess/test/mp/test/test.cpp +190/-6
  • src/ipc/capnp/chain.capnp +189/-0
  • src/ipc/libmultiprocess/src/mp/proxy.cpp +94/-35
  • src/ipc/libmultiprocess/test/mp/test/listen_tests.cpp +47/-77
  • src/ipc/capnp/chain-types.h +112/-0
  • src/ipc/capnp/node-types.h +110/-0
  • src/ipc/libmultiprocess/include/mp/proxy-io.h +74/-28
  • src/ipc/capnp/node.cpp +97/-0
  • src/init/bitcoin-wallet-ipc.cpp +85/-0
  • src/ipc/capnp/common.capnp +84/-0
  • src/ipc/libmultiprocess/test/mp/test/unixlistener.h +84/-0
  • src/ipc/libmultiprocess/src/mp/gen.cpp +39/-41
  • src/ipc/libmultiprocess/include/mp/util.h +63/-15
  • src/util/btcsignals.h +69/-9
  • src/ipc/capnp/wallet-types.h +55/-0
  • src/ipc/capnp/common.cpp +51/-0
  • src/test/btcsignals_tests.cpp +46/-0
  • src/ipc/libmultiprocess/include/mp/proxy-types.h +31/-12
  • 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/test/mp/test/spawn_tests.cpp +28/-5
  • src/ipc/libmultiprocess/test/mp/test/foo.h +31/-1
  • src/init/bitcoin-gui.cpp +8/-20
  • 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/.github/workflows/ci.yml +15/-9
  • src/ipc/libmultiprocess/CMakeLists.txt +17/-7
  • src/ipc/libmultiprocess/include/mp/type-struct.h +12/-12
  • src/bitcoin-wallet.cpp +19/-3
  • src/qt/bitcoin.cpp +18/-3
  • src/ipc/libmultiprocess/include/mp/type-interface.h +10/-10
  • src/ipc/CMakeLists.txt +19/-0
  • src/ipc/libmultiprocess/ci/scripts/ci.sh +18/-0
  • src/ipc/libmultiprocess/include/mp/type-context.h +15/-3
  • src/ipc/libmultiprocess/shell.nix +12/-6
  • src/ipc/capnp/handler.capnp +17/-0
  • CMakeLists.txt +14/-0
  • src/ipc/capnp/context.h +14/-0
  • src/ipc/libmultiprocess/include/mp/proxy.h +8/-6
  • src/node/interfaces.cpp +10/-4
  • 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
  • src/ipc/libmultiprocess/test/mp/test/foo.capnp +12/-0
  • 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/doc/versions.md +8/-2
  • src/interfaces/chain.h +5/-4
  • src/ipc/capnp/init.capnp +9/-0
  • src/ipc/libmultiprocess/ci/configs/netbsd.bash +1/-7
  • src/ipc/libmultiprocess/cmake/pthread_checks.cmake +8/-0
  • src/ipc/libmultiprocess/include/mp/type-threadmap.h +4/-4
  • src/wallet/init.cpp +8/-0
  • test/functional/wallet_fast_rescan.py +4/-4
  • test/functional/wallet_resendwallettransactions.py +4/-4
  • doc/multiprocess.md +6/-0
  • src/init/basic.cpp +3/-3
  • src/ipc/libmultiprocess/ci/configs/newdeps.bash +6/-0
  • src/ipc/libmultiprocess/doc/usage.md +6/-0
  • src/ipc/libmultiprocess/test/mp/test/foo-types.h +6/-0
  • src/qt/test/apptests.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/ci/configs/olddeps.bash +4/-1
  • 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/doc/design.md +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/ipc/libmultiprocess/.github/workflows/bitcoin-core-ci.yml +3/-0
  • 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/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/type-map.h +2/-0
  • src/ipc/libmultiprocess/include/mp/version.h +1/-1
  • src/ipc/stub.cpp +1/-1
  • src/netbase.h +2/-0
  • src/policy/fees/block_policy_estimator.h +2/-0
  • src/qt/bitcoin.h +1/-1
  • src/rpc/request.h +2/-0
  • src/test/util/setup_common.cpp +1/-1
  • src/util/result.h +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
  • src/ipc/libmultiprocess/.clang-tidy +1/-0
  • 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/wallet_transactiontime_rescan.py +1/-0

Card

PR 19460 adds an -ipcconnect option to bitcoin-wallet and an -ipcbind option to bitcoin-node, allowing the wallet tool to detect and connect to a running node over IPC. This lays structural groundwork for future online wallet tool operations such as resyncing and interactive RPC shells without running the full daemon. The PR currently only establishes the IPC connection and reports connectivity status. Review is currently paused and blocked: ajtowns objected in April 2026 to overloading daemon/online behavior into the existing offline CLI binary instead of introducing a separate binary, to which the author has not replied, and the PR sits on top of unmerged base PR #29409.

Data

dossier JSON · extract JSON · model openrouter/google/gemini-3.8-flash, generated 2026-09-17T21:16, confidence high, input hash f40696936a3721fb