4565cff72cbitcoin-gui: Implement missing Init::makeMining method (Ryan Ofsky)fbea576c26test: add interface_ipc_cli.py testing bitcoin-cli -ipcconnect (Ryan Ofsky)0448a19b1bipc: Improve -ipcconnect error checking (Ryan Ofsky)8d614bfa47bitcoin-cli: Add -ipcconnect option (Ryan Ofsky)6a54834895ipc: Expose an RPC interface over the -ipcbind socket (Ryan Ofsky)df76891a3brefactor: Add ExecuteHTTPRPC function (Ryan Ofsky)3cd1cd3ad3ipc: Add MakeBasicInit function (Ryan Ofsky) Pull request description: This implements an idea from sipa in https://github.com/bitcoin/bitcoin/issues/28722#issuecomment-2807026958 to allow `bitcoin-cli` to connect to the node via IPC instead of TCP, if the ENABLE_IPC cmake option is enabled and the node has been started with `-ipcbind`. This feature can be tested with: ``` build/bin/bitcoin-node -regtest -ipcbind=unix -debug=ipc build/bin/bitcoin-cli -regtest -ipcconnect=unix -getinfo ``` The -ipconnect parameter can also be omitted, since this change also makes `bitcoin-cli` prefer IPC over HTTP by default, and falling back to HTTP if an IPC connection can't be established. --- This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/issues/28722). ACKs for top commit: achow101: ACK4565cff72cpinheadmz: ACK4565cff72cenirox001: Tested ACK4565cff72cTree-SHA512: cb0dc521d82591e4eb2723a37ae60949309a206265e0ccfbee1f4d59b426b770426fafa1e842819a2fa27322ecdfcd226f31da70f91c2c31b8095e1380666f1f
Internal c++ interfaces
The following interfaces are defined here:
-
Chain— used by wallet to access blockchain and mempool state. Added in #14437, #14711, #15288, and #10973. -
ChainClient— used by node to start & stopChainclients. Added in #14437. -
Node— used by GUI to start & stop bitcoin node. Added in #10244. -
Handler— returned byhandleEventmethods on interfaces above and used to manage lifetimes of event handlers. -
Init— used by multiprocess code to access interfaces above on startup. Added in #19160. -
Ipc— used by multiprocess code to accessInitinterface across processes. Added in #19160. -
Rpc— used bybitcoin-clito be able to call RPC methods over a unix socket instead of TCP.
The interfaces above define boundaries between major components of bitcoin code (node, wallet, and gui), making it possible for them to run in different processes, and be tested, developed, and understood independently. These interfaces are not currently designed to be stable or to be used externally.