Process Separation - bitcoin-core/bitcoin-devwiki GitHub Wiki
The process separation project builds new bitcoin-node, bitcoin-wallet,
and bitcoin-gui executables that isolate node, wallet, and gui functionality in different
processes and communicate with each other across sockets.
A combined branch with all multiprocess changes can be found at
ryanofsky@ipc-export
with documentation in
doc/multiprocess.md.
For review purposes, the branch has been broken up into multiple PRs, major ones are listed and grouped below.
Step 1: Refactoring PRs
Refactoring PRs replace wallet code accessing node state directly, and GUI code accessing wallet and node state directly, with new code accessing state indirectly through explicitly-defined interface classes in src/interfaces/ that don't assume interface callers and callees have access to the same memory space.
- #10244 Separate gui from wallet and node
- #14437 Start to separate wallet from node
- #15288 Remove wallet -> node global function calls
- #17999 Add ChainClient setMockTime, getWallets methods
- #18278 Describe and follow some code conventions
Step 2: Build support PR
The build PR adds new bitcoin-gui and bitcoin-node makefile targets, a new travis variant, and new configure and depends changes to build against the libmultiprocess library. These changes only affect build scripts, not C++ code.
Step 3: Blocking fix PRs
Performance improvements or fixes needed for multiprocess support.
- #17905 Avoid redundant tx status updates
- #18587 Avoid wallet tryGetBalances calls in WalletModel::pollBalanceChanged
Step 4: Spawned process PR
Minimal change changing bitcoin-gui to spawn a bitcoin-node process, and
bitcoin-node to spawn a bitcoin-wallet process and for gui, node, and wallet
functionality to run in the different processes and communicate though pipes.
Step 5: Ad-hoc connection PRs
Changes adding -ipcconnect and -ipcbind options and allowing bitcoin-node
to open a listening socket that allows incoming bitcoin-gui and bitcoin-wallet
connections.
Followup changes
Steps 1, 2, and 3 above can proceed simultaneously, but steps 4 and 5 depend on all earlier PRs to be merged before they are merged.