Multiprocess bitcoin
This is a draft PR because it is based on #29409. The non-base commits are:
392296298a03test: Increase feature_block.py and feature_taproot.py timeouts4fd334e5e3e2test: Fix multiprocess test for unclean shutdown on kill9f979fcc615autil: Add util::Result workaround to be compatible with libmultiprocess9e49448266f4multiprocess: Add capnp serialization code for bitcoin types7c4f3d367866multiprocess: Add capnp wrapper for Wallet interface1aeff1518df2multiprocess: Add capnp wrapper for Node interface6880553d09admultiprocess: Make bitcoin-gui spawn a bitcoin-node process19fd233b78dbmultiprocess: Make bitcoin-node spawn a bitcoin-wallet process7e20199b54damultiprocess: Add debug.log .wallet/.gui suffixes3ec1db0e1635doc: Multiprocess misc doc and comment updatesb57c89793ec0combine_logs: Handle multiprocess wallet log files
This PR adds an --enable-multiprocess configure option which builds new bitcoin-node, bitcoin-wallet, and bitcoin-gui executables with relevant functionality isolated into different processes. See doc/design/multiprocess.md for usage details and future plans.
The change is implemented by adding a new Init interface that spawns new wallet and node subprocesses that can be controlled over a socketpair by calling Node, Wallet, and ChainClient methods. When running with split processes, you can see the IPC messages going back and forth in -debug=1 output. Followup PR's #19460 and #19461 add -ipcbind and -ipcconnect options that allow more flexibility in how processes are connected.
The IPC protocol used is Cap'n Proto, but this could be swapped out for another protocol. Cap'n Proto types and libraries are only accessed in the src/ipc/capnp/ directory, and not in any public headers or other parts of bitcoin code.
Slides from a presentation describing this change are available on google drive. Demo code used in the presentation was from an older version this PR (tag ipc.21, commits).
This PR is part of the process separation project.