-
Notifications
You must be signed in to change notification settings - Fork 52
Process Separation
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.
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).
-
[X] [#10244 Separate gui from wallet and node](https://github.com/bitcoin/bitcoin/pull/10244)
-
[X] [#14437 Start to separate wallet from node](https://github.com/bitcoin/bitcoin/pull/14437)
-
[X] [#15288 Remove wallet → node global function calls](https://github.com/bitcoin/bitcoin/pull/15288)
-
[X] [#17999 Add ChainClient setMockTime, getWallets methods](https://github.com/bitcoin/bitcoin/pull/17999)
-
[X] [#18278 Describe and follow some code conventions](https://github.com/bitcoin/bitcoin/pull/18278)
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.
-
[X] [#16367 Multiprocess build support](https://github.com/bitcoin/bitcoin/pull/16367)
-
[X] [#18677 Multiprocess build support](https://github.com/bitcoin/bitcoin/pull/18677)
Performance improvements or fixes needed for multiprocess support.
-
[X] [#17905 Avoid redundant tx status updates](https://github.com/bitcoin/bitcoin/pull/17905)
-
[X] [18587 Avoid wallet tryGetBalances calls in WalletModel::pollBalanceChanged](https://github.com/bitcoin/bitcoin/pull/18587) ## 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.
-
❏ [#19160 Add basic spawn and IPC support](https://github.com/bitcoin/bitcoin/pull/19160)
-
❏ [#10102 Multiprocess bitcoin](https://github.com/bitcoin/bitcoin/pull/10102)
Changes adding -ipcconnect
and -ipcbind
options and allowing bitcoin-node
to open a listening socket that allows incoming bitcoin-gui
and bitcoin-wallet
connections.
-
❏ [#19460 Add bitcoin-wallet -ipcconnect option](https://github.com/bitcoin/bitcoin/pull/19460)
-
❏ [#19461 Add bitcoin-gui -ipcconnect option](https://github.com/bitcoin/bitcoin/pull/19461)
See [Multiprocess next steps](https://github.com/ryanofsky/bitcoin/blob/ipc-export/doc/multiprocess.md#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.
-
[Presentation](https://docs.google.com/presentation/d/1AeJ-7gD-dItUgs5yH-HoEzLvXaEWe_2ZiGUUxYIXcws/edit) as of [pr/ipc.21](https://github.com/ryanofsky/bitcoin/releases/tag/pr%2Fipc.21) ([commits](https://github.com/ryanofsky/bitcoin/compare/master…pr/ipc.21))
-
[Update Presentation](https://docs.google.com/presentation/d/1h47dU2g3__0YQ_bd0pxZ_eYqpxC4JkrnrAsV032HXGU/edit)
-
[#19160 Review club meeting notes](https://bitcoincore.reviews/19160)
-
[Stack Exchange answer on process separation benefits](https://bitcoin.stackexchange.com/questions/98398/what-is-the-motivation-behind-russell-yanofskys-work-to-separate-bitcoin-core-i)