Building on #10102, this adds an -ipcconnect option to bitcoin-wallet and an -ipcbind option to bitcoin-node (both enabled by default in multiprocess builds) so bitcoin node will listen on a <datadir>/sockets/node.sock unix socket, and bitcoin-wallet will connect to it.
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, or a bitcoin-wallet shell subcommand that allows running RPC methods interactively like the GUI console, or just general support for bitcoin-wallet <rpc method> <rpc params> invocations suggested #13926 (comment).
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.
The default bitcoin-wallet connect option is -ipcconnect=auto, which connects if possible as described above, and proceeds offline if not possible. Other supported options are -noipcconnect to disable ipc, -ipcconnect to require a connection and fail if it can’t be established, and -ipcconnect=unix:<socket> to require a connection and use a custom socket path.
These changes require multiprocess support and this PR has no effect unless bitcoin is configured with --enable-multiprocess as described in doc/multiprocess.md
#25722 (refactor: Use util::Result class for wallet loading by ryanofsky)
#25665 (refactor: Add util::Result failure types and ability to merge result values by ryanofsky)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
DrahtBot added the label
Needs rebase
on Jul 11, 2020
ryanofsky force-pushed
on Jul 14, 2020
ryanofsky
commented at 1:55 pm on July 14, 2020:
contributor
DrahtBot removed the label
Needs rebase
on Jul 14, 2020
DrahtBot added the label
Needs rebase
on Jul 30, 2020
ryanofsky force-pushed
on Aug 12, 2020
DrahtBot removed the label
Needs rebase
on Aug 12, 2020
DrahtBot added the label
Needs rebase
on Aug 13, 2020
ryanofsky force-pushed
on Aug 28, 2020
DrahtBot removed the label
Needs rebase
on Aug 28, 2020
DrahtBot added the label
Needs rebase
on Aug 31, 2020
ajtowns removed the label
Docs
on Sep 17, 2020
ajtowns removed the label
GUI
on Sep 17, 2020
ajtowns removed the label
P2P
on Sep 17, 2020
ajtowns removed the label
RPC/REST/ZMQ
on Sep 17, 2020
ajtowns removed the label
Tests
on Sep 17, 2020
ryanofsky force-pushed
on Sep 28, 2020
DrahtBot removed the label
Needs rebase
on Sep 28, 2020
ryanofsky force-pushed
on Oct 2, 2020
DrahtBot added the label
Needs rebase
on Oct 27, 2020
ryanofsky force-pushed
on Nov 25, 2020
DrahtBot removed the label
Needs rebase
on Nov 25, 2020
DrahtBot added the label
Needs rebase
on Dec 2, 2020
ryanofsky force-pushed
on Dec 11, 2020
DrahtBot removed the label
Needs rebase
on Dec 11, 2020
DrahtBot added the label
Needs rebase
on Dec 16, 2020
ryanofsky force-pushed
on Dec 18, 2020
DrahtBot removed the label
Needs rebase
on Dec 18, 2020
jonasschnelli
commented at 8:02 am on December 18, 2020:
contributor
Impressive change. Again!
Conceptual I’m not yet convinced.
My understanding is/was that bitcoin-wallet is an offline wallet exploring and manipulation tool without the requirement of a node or online connectivity.
Things that require a node, should IMO go into wallet RPC calls.
But my conceptual understanding might be old and rusty (happy to get convinced).
Things like bitcoin-wallet shell would be nice though. I guess we would just need to make sure the IPC/node option is completely optional and thus the offline functionality (for things that can work offline) is still guaranteed.
Or is this also an attempt to decouple the wallet from the node (in the long run)?
DrahtBot added the label
Needs rebase
on Dec 18, 2020
ryanofsky
commented at 11:34 am on December 18, 2020:
contributor
My understanding is/was that bitcoin-wallet is an offline wallet exploring and manipulation tool without the requirement of a node or online connectivity.
To address any concern here, there’s no thought of changing this. This PR gives bitcoin-wallet tool ability to do online things as well as offline things. It doesn’t require a node or take away the ability to do offline things. Even if you require separate bitcoin-wallet-online-stuff and bitcoin-wallet-offline-only binaries, it only needs build changes not code changes (a new automake entry and src/init/bitcoin-wallet-offline-only.cpp stub)
Make sure to run all tests locally, according to the documentation.
The failure may happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the
affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
DrahtBot added the label
CI failed
on Jul 26, 2024
knst referenced this in commit
3411577473
on Jul 27, 2024
knst referenced this in commit
a7993de34b
on Aug 3, 2024
knst referenced this in commit
aa2d3b8164
on Aug 7, 2024
hebasto added the label
Needs CMake port
on Aug 16, 2024
DrahtBot added the label
Needs rebase
on Aug 28, 2024
maflcko removed the label
Needs CMake port
on Aug 29, 2024
achow101 referenced this in commit
df3f63ccfa
on Sep 9, 2024
ryanofsky force-pushed
on Sep 19, 2024
DrahtBot removed the label
Needs rebase
on Sep 19, 2024
DrahtBot added the label
Needs rebase
on Sep 25, 2024
ryanofsky force-pushed
on Sep 26, 2024
DrahtBot removed the label
Needs rebase
on Sep 26, 2024
DrahtBot added the label
Needs rebase
on Nov 21, 2024
ryanofsky force-pushed
on Dec 6, 2024
DrahtBot removed the label
Needs rebase
on Dec 6, 2024
DrahtBot added the label
Needs rebase
on Jan 29, 2025
ryanofsky force-pushed
on Mar 18, 2025
ryanofsky force-pushed
on Mar 19, 2025
ryanofsky
commented at 8:26 pm on March 19, 2025:
contributor
Updated 240bc4798a3c4e991e153d6660509c78323fe937 -> ce32dc3958c9e3610bd7113551a8a43396d0019d (pr/ipc-connect.42 -> pr/ipc-connect.43, compare) to fix CI failure in tool_wallet.py https://cirrus-ci.com/task/4513424845045760 where bitcoin-wallet throws an exception because the temporary directory name is too long and it causes a “Unix address path “…” exceeded maximum socket path length” error
Rebased ce32dc3958c9e3610bd7113551a8a43396d0019d -> 511f5a9be75b2e07dd45f497206b6fa844ef58a8 (pr/ipc-connect.43 -> pr/ipc-connect.44, compare) on top of updated base pr/ipc.216
Rebased 3540003e44f6edf1e077921286708bf8bc414de4 -> 8c6e331a9b6e6bffa0f9f6e404270e8e697df326 (pr/ipc-connect.47 -> pr/ipc-connect.48, compare) on top of base PR pr/ipc.225
Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the
affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
DrahtBot added the label
Needs rebase
on Dec 4, 2025
ryanofsky force-pushed
on Dec 12, 2025
DrahtBot removed the label
Needs rebase
on Dec 12, 2025
Add capnp serialization code for bitcoin types
- Add capnp ToBlob, ToArray, Wrap, Serialize, and Unserialize helper functions
- Add support for std::chrono::seconds capnp serialization
- Add support for util::Result capnp serialization
d9f1932b77
Add capnp wrapper for Handler interface9deb5fca14
Add capnp wrapper for Chain interface33e62b598d
multiprocess: Expose Chain interface
Expose Chain interface to external processes spawning or connecting to
bitcoin-node.
b2cbdd3c32
Merge branch 'pr/ipc-chain' into pr/ipcfe8c122a15
test: Increase feature_block.py and feature_taproot.py timeouts
Needed because BlockConnected notifications are a lot slower with the wallet
running in separate process.
2e1b921784
test: Fix multiprocess test for unclean shutdown on kill7d2f266090
util: Add util::Result workaround to be compatible with libmultiprocess
Make default constructor more generic so it doesn't only work with void types.
8fdd86827f
multiprocess: Add capnp serialization code for bitcoin typese0f8cea618
multiprocess: Add capnp wrapper for Wallet interfacec623d7590a
multiprocess: Add capnp wrapper for Node interface6a43d491d7
multiprocess: Make bitcoin-gui spawn a bitcoin-node process
Spawn node subprocess instead of running node code internally
8f4e27cab8
multiprocess: Make bitcoin-node spawn a bitcoin-wallet process
Spawn wallet subprocess instead of running wallet code internally
9c4ec080e3
multiprocess: Add debug.log .wallet/.gui suffixes
Add .wallet/.gui suffixes to log files created by bitcoin-gui and
bitcoin-wallet processes so they don't clash with bitcoin-node log file.
231a8e49fa
doc: Multiprocess misc doc and comment updates1a270d8735
Add `-ipcconnect` option to `bitcoin-wallet` to allow connecting to a bitcoin
node process over IPC. The `bitcoin-wallet` tool doesn't really do anything with its
connection to the node yet, but it could potentially run or serve RPCs that
require being online.
Example usage:
src/bitcoin-node -regtest -debug -ipcbind=unix
src/bitcoin-wallet -regtest -ipcconnect=unix info
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2025-12-16 21:13 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me