From 16bce9ac4cd02b2c8308f370bf39d70f9421e69b Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Thu, 17 Apr 2025 14:40:29 +0200 Subject: [PATCH 1/6] build: depends makes libmultiprocess by default This causes IPC binaries (bitcoin-node, bitcoin-gui) to be included in releases. The effect on CI is that this causes more depends builds to build IPC binaries, but still the only build running functional tests with them is the i686_multiprocess one. Except for Windows. --- ci/test/00_setup_env_i686_multiprocess.sh | 2 +- cmake/module/Maintenance.cmake | 2 +- depends/Makefile | 11 ++++++----- depends/README.md | 2 +- depends/packages/packages.mk | 2 +- depends/toolchain.cmake.in | 7 ++++--- doc/multiprocess.md | 6 +++--- 7 files changed, 17 insertions(+), 15 deletions(-) diff --git a/ci/test/00_setup_env_i686_multiprocess.sh b/ci/test/00_setup_env_i686_multiprocess.sh index e19a45d169c..c3caefc560f 100755 --- a/ci/test/00_setup_env_i686_multiprocess.sh +++ b/ci/test/00_setup_env_i686_multiprocess.sh @@ -11,7 +11,7 @@ export CONTAINER_NAME=ci_i686_multiprocess export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" export CI_IMAGE_PLATFORM="linux/amd64" export PACKAGES="llvm clang g++-multilib" -export DEP_OPTS="DEBUG=1 MULTIPROCESS=1" +export DEP_OPTS="DEBUG=1" export GOAL="install" export TEST_RUNNER_EXTRA="--v2transport --usecli" export BITCOIN_CONFIG="\ diff --git a/cmake/module/Maintenance.cmake b/cmake/module/Maintenance.cmake index 52fc7faba9f..5f4b1d8aa8e 100644 --- a/cmake/module/Maintenance.cmake +++ b/cmake/module/Maintenance.cmake @@ -23,7 +23,7 @@ function(add_maintenance_targets) return() endif() - foreach(target IN ITEMS bitcoin bitcoind bitcoin-qt bitcoin-cli bitcoin-tx bitcoin-util bitcoin-wallet test_bitcoin bench_bitcoin) + foreach(target IN ITEMS bitcoin bitcoind bitcoin-node bitcoin-qt bitcoin-gui bitcoin-cli bitcoin-tx bitcoin-util bitcoin-wallet test_bitcoin bench_bitcoin) if(TARGET ${target}) list(APPEND executables $) endif() diff --git a/depends/Makefile b/depends/Makefile index 9767b8eb297..ed54eac40a9 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -39,7 +39,8 @@ NO_QR ?= NO_WALLET ?= NO_ZMQ ?= NO_USDT ?= -MULTIPROCESS ?= +# Default NO_IPC value is 1 on Windows +NO_IPC ?= $(if $(findstring mingw32,$(HOST)),1,) LTO ?= FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources @@ -161,7 +162,7 @@ qt_native_packages_$(NO_QT) = $(qt_native_packages) wallet_packages_$(NO_WALLET) = $(sqlite_packages) zmq_packages_$(NO_ZMQ) = $(zmq_packages) -multiprocess_packages_$(MULTIPROCESS) = $(multiprocess_packages) +ipc_packages_$(NO_IPC) = $(ipc_packages) usdt_packages_$(NO_USDT) = $(usdt_$(host_os)_packages) packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(boost_packages_) $(libevent_packages_) $(qt_packages_) $(wallet_packages_) $(usdt_packages_) @@ -171,8 +172,8 @@ ifneq ($(zmq_packages_),) packages += $(zmq_packages) endif -ifeq ($(multiprocess_packages_),) -packages += $(multiprocess_packages) +ifneq ($(ipc_packages_),) +packages += $(ipc_packages) native_packages += $(multiprocess_native_packages) endif @@ -231,7 +232,7 @@ $(host_prefix)/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_$(fina -e 's|@zmq_packages@|$(zmq_packages_)|' \ -e 's|@wallet_packages@|$(wallet_packages_)|' \ -e 's|@usdt_packages@|$(usdt_packages_)|' \ - -e 's|@multiprocess@|$(MULTIPROCESS)|' \ + -e 's|@ipc_packages@|$(ipc_packages_)|' \ $< > $@ touch $@ diff --git a/depends/README.md b/depends/README.md index db3098921e0..94579109bab 100644 --- a/depends/README.md +++ b/depends/README.md @@ -96,7 +96,7 @@ The following can be set when running make: `make FOO=bar` - `NO_ZMQ`: Don't download/build/cache packages needed for enabling ZeroMQ - `NO_WALLET`: Don't download/build/cache libs needed to enable the wallet (SQLite) - `NO_USDT`: Don't download/build/cache packages needed for enabling USDT tracepoints -- `MULTIPROCESS`: Build libmultiprocess (experimental) +- `NO_IPC`: Don't build Cap’n Proto and libmultiprocess packages. Default on Windows. - `DEBUG`: Disable some optimizations and enable more runtime checking - `HOST_ID_SALT`: Optional salt to use when generating host package ids - `BUILD_ID_SALT`: Optional salt to use when generating build package ids diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk index b6f100f28cd..4fee4e18a39 100644 --- a/depends/packages/packages.mk +++ b/depends/packages/packages.mk @@ -20,7 +20,7 @@ sqlite_packages=sqlite zmq_packages=zeromq -multiprocess_packages = capnp +ipc_packages = capnp multiprocess_native_packages = native_libmultiprocess native_capnp usdt_linux_packages=systemtap diff --git a/depends/toolchain.cmake.in b/depends/toolchain.cmake.in index 34984b85b1d..e31d9eefeef 100644 --- a/depends/toolchain.cmake.in +++ b/depends/toolchain.cmake.in @@ -165,11 +165,12 @@ else() set(WITH_USDT ON CACHE BOOL "") endif() -if("@multiprocess@" STREQUAL "1") +set(ipc_packages @ipc_packages@) +if("${ipc_packages}" STREQUAL "") + set(ENABLE_IPC OFF CACHE BOOL "") +else() set(ENABLE_IPC ON CACHE BOOL "") set(MPGEN_EXECUTABLE "${CMAKE_CURRENT_LIST_DIR}/native/bin/mpgen" CACHE FILEPATH "") set(CAPNP_EXECUTABLE "${CMAKE_CURRENT_LIST_DIR}/native/bin/capnp" CACHE FILEPATH "") set(CAPNPC_CXX_EXECUTABLE "${CMAKE_CURRENT_LIST_DIR}/native/bin/capnpc-c++" CACHE FILEPATH "") -else() - set(ENABLE_IPC OFF CACHE BOOL "") endif() diff --git a/doc/multiprocess.md b/doc/multiprocess.md index 5a91b513de5..853f077fcd0 100644 --- a/doc/multiprocess.md +++ b/doc/multiprocess.md @@ -16,11 +16,11 @@ Specifying `-DENABLE_IPC=ON` requires [Cap'n Proto](https://capnproto.org/) to b ### Depends installation -Alternately the [depends system](../depends) can be used to avoid need to install local dependencies. A simple way to get started is to pass the `MULTIPROCESS=1` [dependency option](../depends#dependency-options) to make: +Alternatively the [depends system](../depends) can be used to avoid needing to install local dependencies: ``` cd -make -C depends NO_QT=1 MULTIPROCESS=1 +make -C depends NO_QT=1 # Set host platform to output of gcc -dumpmachine or clang -dumpmachine or check the depends/ directory for the generated subdirectory name HOST_PLATFORM="x86_64-pc-linux-gnu" cmake -B build --toolchain=depends/$HOST_PLATFORM/toolchain.cmake @@ -29,7 +29,7 @@ build/bin/bitcoin -m node -regtest -printtoconsole -debug=ipc BITCOIN_CMD="bitcoin -m" build/test/functional/test_runner.py ``` -The `cmake` build will pick up settings and library locations from the depends directory, so there is no need to pass `-DENABLE_IPC=ON` as a separate flag when using the depends system (it's controlled by the `MULTIPROCESS=1` option). +The `cmake` build will pick up settings and library locations from the depends directory, so there is no need to pass `-DENABLE_IPC=ON` as a separate flag when using the depends system (it's controlled by the `NO_IPC=1` option). ### Cross-compiling From b333cc14d50b449183ed52de012b98bcbbe1dc9c Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Wed, 29 Jan 2025 18:19:22 +0100 Subject: [PATCH 2/6] ci: build one depends job without multiprocess --- .cirrus.yml | 4 ++-- ..._env_i686_multiprocess.sh => 00_setup_env_i686_no_ipc.sh} | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) rename ci/test/{00_setup_env_i686_multiprocess.sh => 00_setup_env_i686_no_ipc.sh} (83%) diff --git a/.cirrus.yml b/.cirrus.yml index 0d45f8e1b81..33e49c180af 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -172,13 +172,13 @@ task: FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh" task: - name: 'multiprocess, i686, DEBUG' + name: 'no IPC, i686, DEBUG' << : *GLOBAL_TASK_TEMPLATE persistent_worker: labels: type: medium env: - FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh" + FILE_ENV: "./ci/test/00_setup_env_i686_no_ipc.sh" task: name: 'no wallet, libbitcoinkernel' diff --git a/ci/test/00_setup_env_i686_multiprocess.sh b/ci/test/00_setup_env_i686_no_ipc.sh similarity index 83% rename from ci/test/00_setup_env_i686_multiprocess.sh rename to ci/test/00_setup_env_i686_no_ipc.sh index c3caefc560f..5ab41437225 100755 --- a/ci/test/00_setup_env_i686_multiprocess.sh +++ b/ci/test/00_setup_env_i686_no_ipc.sh @@ -7,11 +7,11 @@ export LC_ALL=C.UTF-8 export HOST=i686-pc-linux-gnu -export CONTAINER_NAME=ci_i686_multiprocess +export CONTAINER_NAME=ci_i686_no_multiprocess export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" export CI_IMAGE_PLATFORM="linux/amd64" export PACKAGES="llvm clang g++-multilib" -export DEP_OPTS="DEBUG=1" +export DEP_OPTS="DEBUG=1 NO_IPC=1" export GOAL="install" export TEST_RUNNER_EXTRA="--v2transport --usecli" export BITCOIN_CONFIG="\ @@ -20,4 +20,3 @@ export BITCOIN_CONFIG="\ -DCMAKE_CXX_COMPILER='clang++;-m32' \ -DAPPEND_CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' \ " -export BITCOIN_CMD="bitcoin -m" # Used in functional tests From 32a90e1b9017f47eecedc2c76c6d09ab4f14c401 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Fri, 11 Apr 2025 18:06:29 -0400 Subject: [PATCH 3/6] ci: use bitcoin-node for one depends job The bitcoin-node binary is built on all platforms which have multiprocess enabled, but for functional tests it's only used in CentOS native (depends) job. The next commit will also add a non-depends job. --- ci/test/00_setup_env_native_centos.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/test/00_setup_env_native_centos.sh b/ci/test/00_setup_env_native_centos.sh index 94002b63493..98e731e6e23 100755 --- a/ci/test/00_setup_env_native_centos.sh +++ b/ci/test/00_setup_env_native_centos.sh @@ -18,3 +18,4 @@ export BITCOIN_CONFIG="\ -DREDUCE_EXPORTS=ON \ -DCMAKE_BUILD_TYPE=Debug \ " +export BITCOIN_CMD="bitcoin -m" # Used in functional tests From 3cbf747c328f1e74641dcefdf3ab19a09d167894 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Thu, 12 Jun 2025 14:01:01 +0200 Subject: [PATCH 4/6] cmake: set ENABLE_IPC by default Install capnp on non-depends CI jobs. Use the bitcoin-node binary in the macOS native non-depends job. --- .github/workflows/ci.yml | 4 ++-- CMakeLists.txt | 2 +- ci/test/00_setup_env_mac_native.sh | 1 + ci/test/00_setup_env_native_asan.sh | 2 +- ci/test/00_setup_env_native_fuzz.sh | 2 +- ci/test/00_setup_env_native_fuzz_with_valgrind.sh | 2 +- ci/test/00_setup_env_native_tidy.sh | 2 +- ci/test/00_setup_env_native_valgrind.sh | 2 +- doc/multiprocess.md | 2 +- 9 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df4e02e7a15..03d11536b1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,7 +77,7 @@ jobs: git config user.name "CI" - run: | sudo apt-get update - sudo apt-get install clang mold ccache build-essential cmake ninja-build pkgconf python3-zmq libevent-dev libboost-dev libsqlite3-dev systemtap-sdt-dev libzmq3-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev -y + sudo apt-get install clang mold ccache build-essential cmake ninja-build pkgconf python3-zmq libevent-dev libboost-dev libsqlite3-dev systemtap-sdt-dev libzmq3-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev capnproto libcapnp-dev -y - name: Compile and run tests run: | # Run tests on commits after the last merge commit and before the PR head commit @@ -133,7 +133,7 @@ jobs: run: | # A workaround for "The `brew link` step did not complete successfully" error. brew install --quiet python@3 || brew link --overwrite python@3 - brew install --quiet coreutils ninja pkgconf gnu-getopt ccache boost libevent zeromq qt@6 qrencode + brew install --quiet coreutils ninja pkgconf gnu-getopt ccache boost libevent zeromq qt@6 qrencode capnp - name: Set Ccache directory run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV" diff --git a/CMakeLists.txt b/CMakeLists.txt index 42552b9613e..74ccdb02182 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,7 +141,7 @@ endif() cmake_dependent_option(WITH_DBUS "Enable DBus support." ON "NOT CMAKE_SYSTEM_NAME MATCHES \"(Windows|Darwin)\" AND BUILD_GUI" OFF) -option(ENABLE_IPC "Build multiprocess bitcoin-node and bitcoin-gui executables in addition to monolithic bitcoind and bitcoin-qt executables. Requires libmultiprocess library. Experimental." OFF) +cmake_dependent_option(ENABLE_IPC "Build multiprocess bitcoin-node and bitcoin-gui executables in addition to monolithic bitcoind and bitcoin-qt executables." ON "NOT WIN32" OFF) cmake_dependent_option(WITH_EXTERNAL_LIBMULTIPROCESS "Build with external libmultiprocess library instead of with local git subtree when ENABLE_IPC is enabled. This is not normally recommended, but can be useful for developing libmultiprocess itself." OFF "ENABLE_IPC" OFF) if(ENABLE_IPC AND WITH_EXTERNAL_LIBMULTIPROCESS) find_package(Libmultiprocess REQUIRED COMPONENTS Lib) diff --git a/ci/test/00_setup_env_mac_native.sh b/ci/test/00_setup_env_mac_native.sh index 65917b95060..0cba3751d76 100755 --- a/ci/test/00_setup_env_mac_native.sh +++ b/ci/test/00_setup_env_mac_native.sh @@ -15,3 +15,4 @@ export BITCOIN_CONFIG="-DBUILD_GUI=ON -DWITH_ZMQ=ON -DREDUCE_EXPORTS=ON -DCMAKE_ export CI_OS_NAME="macos" export NO_DEPENDS=1 export OSX_SDK="" +export BITCOIN_CMD="bitcoin -m" # Used in functional tests diff --git a/ci/test/00_setup_env_native_asan.sh b/ci/test/00_setup_env_native_asan.sh index a1dd5aa968f..f750338a023 100755 --- a/ci/test/00_setup_env_native_asan.sh +++ b/ci/test/00_setup_env_native_asan.sh @@ -20,7 +20,7 @@ fi export CONTAINER_NAME=ci_native_asan export APT_LLVM_V="20" -export PACKAGES="systemtap-sdt-dev clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev python3-zmq qt6-base-dev qt6-tools-dev qt6-l10n-tools libevent-dev libboost-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE}" +export PACKAGES="systemtap-sdt-dev clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev python3-zmq qt6-base-dev qt6-tools-dev qt6-l10n-tools libevent-dev libboost-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE} libcapnp-dev capnproto" export NO_DEPENDS=1 export GOAL="install" export CI_LIMIT_STACK_SIZE=1 diff --git a/ci/test/00_setup_env_native_fuzz.sh b/ci/test/00_setup_env_native_fuzz.sh index f80c4d988de..fc0c6b785ad 100755 --- a/ci/test/00_setup_env_native_fuzz.sh +++ b/ci/test/00_setup_env_native_fuzz.sh @@ -9,7 +9,7 @@ export LC_ALL=C.UTF-8 export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" export CONTAINER_NAME=ci_native_fuzz export APT_LLVM_V="20" -export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev libevent-dev libboost-dev libsqlite3-dev" +export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev libevent-dev libboost-dev libsqlite3-dev libcapnp-dev capnproto" export NO_DEPENDS=1 export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false diff --git a/ci/test/00_setup_env_native_fuzz_with_valgrind.sh b/ci/test/00_setup_env_native_fuzz_with_valgrind.sh index b2f3545b370..f1d99f81819 100755 --- a/ci/test/00_setup_env_native_fuzz_with_valgrind.sh +++ b/ci/test/00_setup_env_native_fuzz_with_valgrind.sh @@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8 export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" export CONTAINER_NAME=ci_native_fuzz_valgrind -export PACKAGES="libevent-dev libboost-dev libsqlite3-dev valgrind" +export PACKAGES="libevent-dev libboost-dev libsqlite3-dev valgrind libcapnp-dev capnproto" export NO_DEPENDS=1 export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false diff --git a/ci/test/00_setup_env_native_tidy.sh b/ci/test/00_setup_env_native_tidy.sh index d67616c1c62..c14e59b7289 100755 --- a/ci/test/00_setup_env_native_tidy.sh +++ b/ci/test/00_setup_env_native_tidy.sh @@ -10,7 +10,7 @@ export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" export CONTAINER_NAME=ci_native_tidy export TIDY_LLVM_V="20" export APT_LLVM_V="${TIDY_LLVM_V}" -export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev libomp-${TIDY_LLVM_V}-dev clang-tidy-${TIDY_LLVM_V} jq libevent-dev libboost-dev libzmq3-dev systemtap-sdt-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev libsqlite3-dev" +export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev libomp-${TIDY_LLVM_V}-dev clang-tidy-${TIDY_LLVM_V} jq libevent-dev libboost-dev libzmq3-dev systemtap-sdt-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev libsqlite3-dev libcapnp-dev capnproto" export NO_DEPENDS=1 export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false diff --git a/ci/test/00_setup_env_native_valgrind.sh b/ci/test/00_setup_env_native_valgrind.sh index e0213dbe65f..99dbe807f5b 100755 --- a/ci/test/00_setup_env_native_valgrind.sh +++ b/ci/test/00_setup_env_native_valgrind.sh @@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8 export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" export CONTAINER_NAME=ci_native_valgrind -export PACKAGES="valgrind python3-zmq libevent-dev libboost-dev libzmq3-dev libsqlite3-dev" +export PACKAGES="valgrind python3-zmq libevent-dev libboost-dev libzmq3-dev libsqlite3-dev libcapnp-dev capnproto" export USE_VALGRIND=1 export NO_DEPENDS=1 # bind tests excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547 diff --git a/doc/multiprocess.md b/doc/multiprocess.md index 853f077fcd0..fd047c09b71 100644 --- a/doc/multiprocess.md +++ b/doc/multiprocess.md @@ -4,7 +4,7 @@ _This document describes usage of the multiprocess feature. For design informati ## Build Option -On Unix systems, the `-DENABLE_IPC=ON` build option can be passed to build the supplemental `bitcoin-node` and `bitcoin-gui` multiprocess executables. +The `-DENABLE_IPC=ON` build option, supported and enabled by default on Unix systems, can be passed to build the supplemental `bitcoin-node` and `bitcoin-gui` multiprocess executables. ## Debugging From 71f29d4fa90aaeb6472b3ce9d4f4e97f85ed487b Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Tue, 12 Aug 2025 16:36:50 +0200 Subject: [PATCH 5/6] doc: update build and dependencies docs for IPC OpenBSD does not have this package, so recommend building from source for now. --- doc/build-freebsd.md | 8 ++++++++ doc/build-netbsd.md | 8 ++++++++ doc/build-openbsd.md | 5 +++++ doc/build-osx.md | 20 ++++++-------------- doc/build-unix.md | 16 +++++++++------- doc/dependencies.md | 1 + 6 files changed, 37 insertions(+), 21 deletions(-) diff --git a/doc/build-freebsd.md b/doc/build-freebsd.md index 4b5a1d0f24a..fee20f84ab5 100644 --- a/doc/build-freebsd.md +++ b/doc/build-freebsd.md @@ -21,6 +21,14 @@ pkg install sqlite3 To build Bitcoin Core without the wallet, use `-DENABLE_WALLET=OFF`. +Cap'n Proto is needed for IPC functionality (see [multiprocess.md](multiprocess.md)): + +```bash +pkg install capnproto +``` + +Compile with `-DENABLE_IPC=OFF` if you do not need IPC functionality. + See [dependencies.md](dependencies.md) for a complete overview. ### 2. Clone Bitcoin Repo diff --git a/doc/build-netbsd.md b/doc/build-netbsd.md index b485bb5a52a..f2631777221 100644 --- a/doc/build-netbsd.md +++ b/doc/build-netbsd.md @@ -39,6 +39,14 @@ pkgin sqlite3 To build Bitcoin Core without the wallet, use `-DENABLE_WALLET=OFF`. +Cap'n Proto is needed for IPC functionality (see [multiprocess.md](multiprocess.md)): + +```bash +pkgin capnproto +``` + +Compile with `-DENABLE_IPC=OFF` if you do not need IPC functionality. + See [dependencies.md](dependencies.md) for a complete overview. ### 2. Clone Bitcoin Repo diff --git a/doc/build-openbsd.md b/doc/build-openbsd.md index d68a118b8ad..99d4ec25165 100644 --- a/doc/build-openbsd.md +++ b/doc/build-openbsd.md @@ -21,6 +21,11 @@ pkg_add sqlite3 To build Bitcoin Core without the wallet, use `-DENABLE_WALLET=OFF`. +Cap'n Proto is needed for IPC functionality (see [multiprocess.md](multiprocess.md)) +and can be built from source: https://capnproto.org/install.html + +Compile with `-DENABLE_IPC=OFF` if you do not need IPC functionality. + See [dependencies.md](dependencies.md) for a complete overview. ### 2. Clone Bitcoin Repo diff --git a/doc/build-osx.md b/doc/build-osx.md index 523946d982f..e1bf037490a 100644 --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -48,7 +48,7 @@ See [dependencies.md](dependencies.md) for a complete overview. To install, run the following from your terminal: ``` bash -brew install cmake boost pkgconf libevent +brew install cmake boost pkgconf libevent capnp ``` #### Wallet Dependencies @@ -59,6 +59,11 @@ the `cmake -B` step below. SQLite is required, but since macOS ships with a useable `sqlite` package, you don't need to install anything. +#### IPC Dependencies + +If you do not need IPC functionality (see [multiprocess.md](multiprocess.md)) +you can omit `capnp` and use `-DENABLE_IPC=OFF` in the `cmake -B` step below. + ### 4. Clone Bitcoin repository `git` should already be installed by default on your system. @@ -112,19 +117,6 @@ For more information on ZMQ, see: [zmq.md](zmq.md) --- -### IPC Dependencies - -Compiling IPC-enabled binaries with `-DENABLE_IPC=ON` requires the following dependency. -Skip if you do not need IPC functionality. - -```bash -brew install capnp -``` - -For more information on IPC, see: [multiprocess.md](multiprocess.md). - ---- - #### Test Suite Dependencies There is an included test suite that is useful for testing code changes when developing. diff --git a/doc/build-unix.md b/doc/build-unix.md index ad577636fc5..38b44966871 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -60,6 +60,12 @@ SQLite is required for the wallet: To build Bitcoin Core without the wallet, see [*Disable-wallet mode*](#disable-wallet-mode) +Cap'n Proto is needed for IPC functionality (see [multiprocess.md](multiprocess.md)): + + sudo apt-get install libcapnp-dev capnproto + +Compile with `-DENABLE_IPC=OFF` if you do not need IPC functionality. + ZMQ-enabled binaries are compiled with `-DWITH_ZMQ=ON` and require the following dependency: sudo apt-get install libzmq3-dev @@ -68,11 +74,6 @@ User-Space, Statically Defined Tracing (USDT) dependencies: sudo apt install systemtap-sdt-dev -IPC-enabled binaries are compiled with `-DENABLE_IPC=ON` and require the following dependencies. -Skip if you do not need IPC functionality. - - sudo apt-get install libcapnp-dev capnproto - GUI dependencies: Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compile the GUI, we need to install @@ -119,11 +120,12 @@ User-Space, Statically Defined Tracing (USDT) dependencies: sudo dnf install systemtap-sdt-devel -IPC-enabled binaries are compiled with `-DENABLE_IPC=ON` and require the following dependency. -Skip if you do not need IPC functionality. +Cap'n Proto is needed for IPC functionality (see [multiprocess.md](multiprocess.md)): sudo dnf install capnproto +Compile with `-DENABLE_IPC=OFF` if you do not need IPC functionality. + GUI dependencies: Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compile the GUI, we need to install diff --git a/doc/dependencies.md b/doc/dependencies.md index bc8cc7fb202..c7fcd0cbd56 100644 --- a/doc/dependencies.md +++ b/doc/dependencies.md @@ -35,6 +35,7 @@ Bitcoin Core requires one of the following compilers. | Dependency | Releases | Minimum required | | --- | --- | --- | +| [Cap'n Proto](../depends/packages/capnp.mk) | [link](https://capnproto.org) | [0.7.1](https://capnproto.org/install.html) | | Python (scripts, tests) | [link](https://www.python.org) | [3.10](https://github.com/bitcoin/bitcoin/pull/30527) | | [Qt](../depends/packages/qt.mk) (gui) | [link](https://download.qt.io/archive/qt/) | [6.2](https://github.com/bitcoin/bitcoin/pull/30997) | | [qrencode](../depends/packages/qrencode.mk) (gui) | [link](https://fukuchi.org/works/qrencode/) | N/A | From ce7d94a492e61f2a43ea315e75be607d6aa71702 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Thu, 24 Jul 2025 16:25:35 +0200 Subject: [PATCH 6/6] doc: add release note --- doc/release-notes-31802.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/release-notes-31802.md diff --git a/doc/release-notes-31802.md b/doc/release-notes-31802.md new file mode 100644 index 00000000000..168fa74ee4a --- /dev/null +++ b/doc/release-notes-31802.md @@ -0,0 +1,3 @@ +A new (experimental) Mining interface was introduced to support Stratum v2 or other mining client software, see #31098. When the node is started with `bitcoin node -m -ipcbind=unix` the node will listen on a unix socket for IPC client connections. The `-m` option launches a new binary `bitcoin-node` instead of `bitcoind`. + +IPC connectivity introduces new dependencies (see [multiprocess.md](multiprocess.md)), which are only included in the `bitcoin-node` and `bitcoin-gui` binaries (not in `bitcoind` and `bitcoin-qt`). Those new binaries are now built by default (controlled by `ENABLE_IPC`). If you don't intend to use IPC, nothing changes and there is no need to use `bitcoin -m`, `bitcoin-node` or `bitcoin-gui`(#31802)