What is Multiprocess Bitcoin?
Multiprocess Bitcoin splits the traditional monolithicbitcoind and bitcoin-qt binaries into separate executables:
bitcoin-node- Handles P2P networking and RPCbitcoin-wallet- Manages wallet operationsbitcoin-gui- Provides the graphical interface
- In separate address spaces for better isolation
- On different machines
- In different environments
- With independent lifecycles (start/stop components separately)
When to Use Multiprocess
Multiprocess architecture is beneficial when you need:- Enhanced Security: Isolate wallet operations from network code
- Flexibility: Run components on different machines (e.g., wallet on secure offline system)
- Debugging: Easier to debug individual components in isolation
- Development: Test components independently
- Resource Management: Allocate resources differently to each component
Multiprocess is currently experimental. Future versions will expand functionality to support remote components and independent lifecycle management.
Building with Multiprocess Support
Unix/Linux Build
Multiprocess is enabled by default on Unix systems:Dependencies
Multiprocess requires Cap’n Proto to be installed. Install dependencies according to your platform:- See
build-unix.mdfor Linux instructions - See
build-osx.mdfor macOS instructions
Using the Depends System
Alternatively, use the depends system to avoid manual dependency installation:NO_IPC=1 option).
Cross-Compiling
When cross-compiling without depends, specify native code generation tools:External libmultiprocess
By default, libmultiprocess is built from sources atsrc/ipc/libmultiprocess/. To use an external installation:
CMAKE_PREFIX_PATH if libmultiprocess is installed in a non-standard location:
Usage
Running Multiprocess Binaries
The recommended way is using thebitcoin CLI with the -m flag:
-m (or --multiprocess):
bitcoin -m nodeexecutesbitcoin-nodeinstead ofbitcoindbitcoin -m guiexecutesbitcoin-guiinstead ofbitcoin-qt
Debugging IPC Communication
Enable IPC debugging to see requests and responses between processes:Running Tests
Run functional tests with multiprocess:Current Features
Multiprocess binaries currently:- Function the same as monolithic binaries
- Support an additional
-ipcbindoption for IPC configuration - Provide better process isolation
Future Features
Planned enhancements include:Independent Process Spawning
After PR #10102:bitcoin-guiwill spawnbitcoin-nodefor P2P and RPCbitcoin-nodewill spawnbitcoin-walletfor wallet operations- Components communicate over socket pairs
Remote Connection Support
PR #19460 adds:- Running wallet on a secure, isolated machine
- Running GUI remotely while node runs on a server
- Starting/stopping components independently
Example: Development Setup
Example: Production Setup
Security Considerations
- Each process runs in its own address space
- Memory corruption in one component doesn’t affect others
- Wallet operations are isolated from network code
- Future versions will support running components on separate machines for enhanced security
While multiprocess improves isolation, it’s still experimental. Use caution in production environments and keep Bitcoin Core updated.