Skip to content

Process Separation

Shaynomaino edited this page Oct 5, 2020 · 2 revisions

The [process separation project](https://github.com/bitcoin/bitcoin/projects/10) 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](https://github.com/ryanofsky/bitcoin/commits/ipc-export) with documentation in [doc/multiprocess.md](https://github.com/ryanofsky/bitcoin/blob/ipc-export/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/](https://github.com/ryanofsky/bitcoin/tree/ipc-export/src/interfaces) that [don’t assume interface callers and callees have access to the same memory space](https://github.com/ryanofsky/bitcoin/blob/ipc-export/doc/developer-notes.md#internal-interface-guidelines).

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](https://github.com/chaincodelabs/libmultiprocess) library. These changes only affect build scripts, not C++ code.

Step 3: Blocking fix PRs

Performance improvements or fixes needed for multiprocess support.

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.

Clone this wiki locally