-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multiprocess: Add bitcoin-wallet -ipcconnect option #19460
base: master
Are you sure you want to change the base?
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
Spawn node subprocess instead of running node code internally
Spawn wallet subprocess instead of running wallet code internally
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.
Add `-ipcbind` option to `bitcoin-node`, and an `-ipcconnect` option to `bitcoin-wallet` to allow running a node that listens on an IPC socket and accepts connections from wallet processes. Example usage: src/bitcoin-node -regtest -debug -ipcbind=unix src/bitcoin-wallet -regtest -ipcconnect=unix info `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.
🐙 This pull request conflicts with the target branch and needs rebase. |
There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
⌛ There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
⌛ There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
This is a draft PR because it is based on #10102. The non-base commits are:
bbefbd3c199b
multiprocess: Add -ipcconnect and -ipcbind optionsBuilding on #10102, this adds an
-ipcconnect
option tobitcoin-wallet
and an-ipcbind
option tobitcoin-node
(both enabled by default in multiprocess builds) so bitcoin node will listen on a<datadir>/sockets/node.sock
unix socket, andbitcoin-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 abitcoin-wallet sync
command that will update balances and sync latest transactions to an unloaded wallet, or abitcoin-wallet serve
subcommand that loads a wallet and serves RPC requests, or abitcoin-wallet shell
subcommand that allows running RPC methods interactively like the GUI console, or just general support forbitcoin-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.mdThis PR is part of the process separation project.