Skip to content

Process Separation

Russell Yanofsky edited this page Aug 11, 2020 · 13 revisions

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.

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.

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

See Multiprocess next steps

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.

Links