Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stratum v2 Template Provider via IPC interface (multiprocess) #48

Open
wants to merge 61 commits into
base: 2024/07/sv2-tp-common
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
2f6ce54
test: put the generic parts from StaticContentsSock into a separate c…
vasild Sep 6, 2024
5766bbe
test: add a mocked Sock that allows inspecting what has been Send() t…
vasild Dec 6, 2022
2248997
Add sv2 log category for Stratum v2
Sjors Nov 30, 2023
a551b44
build: libbitcoin_sv2 scaffold
Sjors Sep 13, 2024
de88060
net: reduce CAddress usage to CService or CNetAddr
vasild Aug 23, 2024
89ef528
net: split CConnman::BindListenPort() off CConnman
vasild Aug 23, 2024
2590875
Add sv2 noise protocol
Sjors Dec 19, 2024
a0a8a72
style: modernize the style of SockMan::BindListenPort()
vasild Sep 17, 2024
919d275
net: split CConnman::AcceptConnection() off CConnman
vasild Aug 26, 2024
552a0f6
style: modernize the style of SockMan::AcceptConnection()
vasild Sep 17, 2024
e0cb576
net: move the generation of ids for new nodes from CConnman to SockMan
vasild Aug 27, 2024
5eb0b66
net: move CConnman-specific parts away from ThreadI2PAcceptIncoming()
vasild Aug 27, 2024
8e2ea1c
net: move I2P-accept-incoming code from CConnman to SockMan
vasild Aug 27, 2024
014ea3b
net: index nodes in CConnman by id
vasild Sep 20, 2024
9fda56c
net: isolate P2P specifics from GenerateWaitSockets()
vasild Sep 21, 2024
361673b
net: isolate P2P specifics from SocketHandlerConnected() and ThreadSo…
vasild Sep 21, 2024
a30c7a6
net: isolate all remaining P2P specifics from SocketHandlerConnected()
vasild Sep 22, 2024
35db697
net: split CConnman::ConnectNode()
vasild Sep 23, 2024
22c04d4
net: tweak EventNewConnectionAccepted()
vasild Sep 24, 2024
8d08948
net: move sockets from CNode to SockMan
vasild Sep 23, 2024
b8b0426
net: move-only: improve encapsulation of SockMan
vasild Sep 23, 2024
8462c1d
Add sv2 message CoinbaseOutputDataSize
Sjors Sep 19, 2024
b380246
Move CNetMessage and Transport headers to common
Sjors Sep 20, 2024
962ccda
Convert between Sv2NetMsg and CSerializedNetMsg
Sjors Jun 21, 2024
79a5268
Introduce Sv2Transport
Sjors Sep 20, 2024
6f7b261
Merge remote-tracking branch 'vasild/sockman' into 2024/06/sv2_connec…
Sjors Dec 19, 2024
a8eb005
Merge remote-tracking branch 'vasild/DynSock' into 2024/06/sv2_connec…
Sjors Dec 19, 2024
ebd5b77
Add sv2 SETUP_CONNECTION messages
Sjors Jul 15, 2024
b3126a3
Add strings for Sv2MsgType
Sjors Jul 1, 2024
a3a7a46
Add Sv2Connman
Sjors Nov 15, 2024
9c1da87
Make m_tip_block an std::optional
Sjors Dec 17, 2024
5486c19
Ensure m_tip_block is never ZERO
Sjors Dec 17, 2024
a464787
test: use Mining interface in miner_tests
Sjors Dec 4, 2024
7227d01
Add waitNext() to BlockTemplate interface
Sjors Dec 18, 2024
32d753d
Stratum v2 template provider scaffold
Sjors Nov 15, 2024
88b4d2f
Chainparams: add default sv2 port
Sjors Nov 29, 2023
543665b
Add remaining sv2 messages for TemplateProvider
Sjors Jun 24, 2024
f481d65
Sv2: construct and submit block templates
Sjors Nov 22, 2024
f315fd6
Handle REQUEST_TRANSACTION_DATA
Sjors Jul 2, 2024
4c2b3f1
Handle SUBMIT_SOLUTION
Sjors Jul 2, 2024
f8ebcbb
Incrementally update sv2 block template
Sjors Sep 30, 2024
ef523cd
CKey: add Serialize and Unserialize
Sjors Feb 1, 2024
91ea715
Persist static key for Template Provider
Sjors Jan 11, 2024
e65cd32
build: disable sv2 on Windows
Sjors Nov 25, 2024
0b822c9
build: depends makes libmultiprocess by default
Sjors Nov 10, 2024
20b0ac7
ci: install libmultiprocess for non-depends
Sjors Oct 7, 2024
5303890
ci: enable multiprocess for non-depends jobs
Sjors Dec 2, 2024
ff9184d
interface_ui: move from node to common library
ryanofsky Dec 5, 2017
7ff1e25
multiprocess: Add bitcoin-mine test program
ryanofsky Sep 6, 2024
02fea85
Drop tip hash print from demo
Sjors Jul 17, 2024
7dc20a7
Add event loop with interrupt
Sjors Jul 17, 2024
4a4fbfe
build: add bitcoin_sv2 as bitcoin-mine dep
Sjors Sep 19, 2024
81663d9
Run Template Provider from bitcoin-mine
Sjors Jul 19, 2024
9407062
Document -sv2 arguments
Sjors Jul 17, 2024
bf8e1b0
ci: disable things Template Provider doesn't need
Sjors Jul 18, 2024
2dbe0ed
build: move set(installable_targets) up
Sjors Oct 4, 2024
3a4bdbb
build: add bitcoin-mine to executables
Sjors Oct 4, 2024
11f87a9
build: reduce Windows deploy stuff
Sjors Nov 25, 2024
6be6249
guix: only build Template Provider
Sjors Oct 5, 2024
4cc0153
build: no sv2 without multiprocess
Sjors Nov 25, 2024
9406c4a
build: enable multiprocess by default
Sjors Dec 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ env: # Global defaults
MAKEJOBS: "-j10"
TEST_RUNNER_PORT_MIN: "14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache
CI_FAILFAST_TEST_LEAVE_DANGLING: "1" # Cirrus CI does not care about dangling processes and setting this variable avoids killing the CI script itself on error
RUN_FUNCTIONAL_TESTS: false # Template Provider doesn't have its own functional tests

# A self-hosted machine(s) can be used via Cirrus CI. It can be configured with
# multiple users to run tasks in parallel. No sudo permission is required.
Expand Down Expand Up @@ -186,13 +187,13 @@ task:
FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh"

task:
name: 'multiprocess, i686, DEBUG'
name: 'no multiprocess, 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_multiprocess.sh"

task:
name: 'no wallet, libbitcoinkernel'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ env:

jobs:
test-each-commit:
name: 'test each commit'
name: 'test each commit (no multiprocess)'
runs-on: ubuntu-24.04
if: github.event_name == 'pull_request' && github.event.pull_request.commits != 1
timeout-minutes: 360 # Use maximum time, see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes. Assuming a worst case time of 1 hour per commit, this leads to a --max-count=6 below.
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
run: |
# Run tests on commits after the last merge commit and before the PR head commit
# Use clang++, because it is a bit faster and uses less memory than g++
git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && CC=clang CXX=clang++ cmake -B build -DWERROR=ON -DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWITH_BDB=ON -DWITH_USDT=ON -DCMAKE_CXX_FLAGS='-Wno-error=unused-member-function' && cmake --build build -j $(nproc) && ctest --output-on-failure --stop-on-failure --test-dir build -j $(nproc) && ./build/test/functional/test_runner.py -j $(( $(nproc) * 2 ))" ${{ env.TEST_BASE }}
git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && CC=clang CXX=clang++ cmake -B build -DWERROR=ON -DWITH_MULTIPROCESS=OFF -DWITH_SV2=OFF -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DCMAKE_CXX_FLAGS='-Wno-error=unused-member-function' && cmake --build build -j $(nproc) && ctest --output-on-failure --stop-on-failure --test-dir build -j $(nproc) && ./build/test/functional/test_runner.py -j $(( $(nproc) * 2 ))" ${{ env.TEST_BASE }}

macos-native-arm64:
name: ${{ matrix.job-name }}
Expand Down Expand Up @@ -120,7 +120,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@5 qrencode
brew install --quiet coreutils ninja pkgconf gnu-getopt ccache boost libevent zeromq qt@5 qrencode capnp

- name: Set Ccache directory
run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV"
Expand Down
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,16 @@ endif()

cmake_dependent_option(WITH_DBUS "Enable DBus support." ON "CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND BUILD_GUI" OFF)

option(WITH_MULTIPROCESS "Build multiprocess bitcoin-node and bitcoin-gui executables in addition to monolithic bitcoind and bitcoin-qt executables. Requires libmultiprocess library. Experimental." OFF)
option(WITH_MULTIPROCESS "Build multiprocess bitcoin-node and bitcoin-gui executables in addition to monolithic bitcoind and bitcoin-qt executables. Requires libmultiprocess library. Experimental." ON)
if(WITH_MULTIPROCESS)
find_package(Libmultiprocess COMPONENTS Lib)
find_package(LibmultiprocessNative COMPONENTS Bin
NAMES Libmultiprocess
)
endif()

cmake_dependent_option(WITH_SV2 "Enable Stratum v2 functionality." ON "NOT WIN32" OFF)

cmake_dependent_option(BUILD_GUI_TESTS "Build test_bitcoin-qt executable." ON "BUILD_GUI;BUILD_TESTS" OFF)
if(BUILD_GUI)
set(qt_components Core Gui Widgets LinguistTools)
Expand Down Expand Up @@ -220,6 +222,7 @@ if(BUILD_FOR_FUZZING)
set(BUILD_GUI OFF)
set(ENABLE_EXTERNAL_SIGNER OFF)
set(WITH_ZMQ OFF)
set(WITH_MULTIPROCESS OFF)
set(BUILD_TESTS OFF)
set(BUILD_GUI_TESTS OFF)
set(BUILD_BENCH OFF)
Expand Down Expand Up @@ -628,6 +631,7 @@ message(" ZeroMQ .............................. ${WITH_ZMQ}")
message(" USDT tracing ........................ ${WITH_USDT}")
message(" QR code (GUI) ....................... ${WITH_QRENCODE}")
message(" DBus (GUI, Linux only) .............. ${WITH_DBUS}")
message(" Stratum v2 .......................... ${WITH_SV2}")
message("Tests:")
message(" test_bitcoin ........................ ${BUILD_TESTS}")
message(" test_bitcoin-qt ..................... ${BUILD_GUI_TESTS}")
Expand Down
1 change: 1 addition & 0 deletions ci/test/00_setup_env_arm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ export GOAL="install"
# -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1"
# This could be removed once the ABI change warning does not show up by default
export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON -DCMAKE_CXX_FLAGS='-Wno-psabi -Wno-error=maybe-uninitialized'"
export BITCOIND=bitcoin-node # Used in functional tests
2 changes: 1 addition & 1 deletion ci/test/00_setup_env_i686_centos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ export STREAM_GCC_V="12"
export CI_BASE_PACKAGES="gcc-toolset-${STREAM_GCC_V}-gcc-c++ glibc-devel.x86_64 gcc-toolset-${STREAM_GCC_V}-libstdc++-devel.x86_64 glibc-devel.i686 gcc-toolset-${STREAM_GCC_V}-libstdc++-devel.i686 ccache make git python3 python3-pip which patch lbzip2 xz procps-ng dash rsync coreutils bison e2fsprogs cmake"
export PIP_PACKAGES="pyzmq"
export GOAL="install"
export BITCOIN_CONFIG="-DWITH_ZMQ=ON -DBUILD_GUI=ON -DREDUCE_EXPORTS=ON"
export BITCOIN_CONFIG="-DENABLE_WALLET=OFF -DWITH_ZMQ=OFF -DBUILD_GUI=OFF -DREDUCE_EXPORTS=ON"
export CONFIG_SHELL="/bin/dash"
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
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="docker.io/amd64/ubuntu:24.04"
export PACKAGES="llvm clang g++-multilib"
export DEP_OPTS="DEBUG=1 MULTIPROCESS=1"
export DEP_OPTS="DEBUG=1 NO_MULTIPROCESS=1"
export GOAL="install"
export TEST_RUNNER_EXTRA="--v2transport"
export BITCOIN_CONFIG="\
Expand All @@ -20,4 +20,3 @@ export BITCOIN_CONFIG="\
-DCMAKE_CXX_FLAGS='-Wno-error=documentation' \
-DAPPEND_CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' \
"
export BITCOIND=bitcoin-node # Used in functional tests
2 changes: 1 addition & 1 deletion ci/test/00_setup_env_mac_cross.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ export XCODE_BUILD_ID=15A240d
export RUN_UNIT_TESTS=false
export RUN_FUNCTIONAL_TESTS=false
export GOAL="deploy"
export BITCOIN_CONFIG="-DBUILD_GUI=ON -DREDUCE_EXPORTS=ON"
export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON"
6 changes: 5 additions & 1 deletion ci/test/00_setup_env_mac_native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ export LC_ALL=C.UTF-8
export PIP_PACKAGES="--break-system-packages zmq"
export GOAL="install"
export CMAKE_GENERATOR="Ninja"
export BITCOIN_CONFIG="-DBUILD_GUI=ON -DWITH_ZMQ=ON -DREDUCE_EXPORTS=ON"
export BITCOIN_CONFIG="\
-DWITH_MULTIPROCESS=ON \
-DREDUCE_EXPORTS=ON \
"
export CI_OS_NAME="macos"
export NO_DEPENDS=1
export OSX_SDK=""
export BITCOIND=bitcoin-node # Used in functional tests
5 changes: 3 additions & 2 deletions ci/test/00_setup_env_native_asan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ fi

export CONTAINER_NAME=ci_native_asan
export APT_LLVM_V="19"
export PACKAGES="systemtap-sdt-dev clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev python3-zmq qtbase5-dev qttools5-dev qttools5-dev-tools libevent-dev libboost-dev libdb5.3++-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 qtbase5-dev qttools5-dev qttools5-dev-tools libevent-dev libboost-dev libdb5.3++-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE} libcapnp-dev capnproto"
export NO_DEPENDS=1
export GOAL="install"
export BITCOIN_CONFIG="\
-DWITH_USDT=ON -DWITH_ZMQ=ON -DWITH_BDB=ON -DWARN_INCOMPATIBLE_BDB=OFF -DBUILD_GUI=ON \
-DWITH_MULTIPROCESS=OFF \
-DWITH_SV2=OFF \
-DSANITIZERS=address,float-divide-by-zero,integer,undefined \
-DCMAKE_C_COMPILER=clang-${APT_LLVM_V} \
-DCMAKE_CXX_COMPILER=clang++-${APT_LLVM_V} \
Expand Down
3 changes: 2 additions & 1 deletion ci/test/00_setup_env_native_fuzz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ export LC_ALL=C.UTF-8
export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
export CONTAINER_NAME=ci_native_fuzz
export APT_LLVM_V="19"
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
export RUN_FUZZ_TESTS=true
export GOAL="install"
export CI_CONTAINER_CAP="--cap-add SYS_PTRACE" # If run with (ASan + LSan), the container needs access to ptrace (https://github.com/google/sanitizers/issues/764)
export BITCOIN_CONFIG="\
-DWITH_SV2=OFF \
-DBUILD_FOR_FUZZING=ON \
-DSANITIZERS=fuzzer,address,undefined,float-divide-by-zero,integer \
-DCMAKE_C_COMPILER=clang-${APT_LLVM_V} \
Expand Down
3 changes: 2 additions & 1 deletion ci/test/00_setup_env_native_fuzz_with_valgrind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ export LC_ALL=C.UTF-8

export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
export CONTAINER_NAME=ci_native_fuzz_valgrind
export PACKAGES="clang-16 llvm-16 libclang-rt-16-dev libevent-dev libboost-dev libsqlite3-dev valgrind"
export PACKAGES="clang-16 llvm-16 libclang-rt-16-dev libevent-dev libboost-dev libsqlite3-dev valgrind libcapnp-dev capnproto"
export NO_DEPENDS=1
export RUN_UNIT_TESTS=false
export RUN_FUNCTIONAL_TESTS=false
export RUN_FUZZ_TESTS=true
export FUZZ_TESTS_CONFIG="--valgrind"
export GOAL="install"
export BITCOIN_CONFIG="\
-DWITH_MULTIPROCESS=ON \
-DBUILD_FOR_FUZZING=ON \
-DSANITIZERS=fuzzer \
-DCMAKE_C_COMPILER=clang-16 \
Expand Down
3 changes: 2 additions & 1 deletion ci/test/00_setup_env_native_msan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}"
export CONTAINER_NAME="ci_native_msan"
export PACKAGES="ninja-build"
# BDB generates false-positives and will be removed in future
export DEP_OPTS="DEBUG=1 NO_BDB=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
export DEP_OPTS="DEBUG=1 NO_WALLET=1 NO_BDB=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
export GOAL="install"
# Setting CMAKE_{C,CXX}_FLAGS_DEBUG flags to an empty string ensures that the flags set in MSAN_FLAGS remain unaltered.
# _FORTIFY_SOURCE is not compatible with MSAN.
export BITCOIN_CONFIG="\
-DENABLE_WALLET=OFF \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_FLAGS_DEBUG='' \
-DCMAKE_CXX_FLAGS_DEBUG='' \
Expand Down
2 changes: 1 addition & 1 deletion ci/test/00_setup_env_native_previous_releases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export RUN_UNIT_TESTS="false"
export GOAL="install"
export DOWNLOAD_PREVIOUS_RELEASES="true"
export BITCOIN_CONFIG="\
-DWITH_ZMQ=ON -DBUILD_GUI=ON -DREDUCE_EXPORTS=ON \
-DWITH_ZMQ=OFF -DBUILD_GUI=OFF -DREDUCE_EXPORTS=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_FLAGS='-funsigned-char' \
-DCMAKE_C_FLAGS_DEBUG='-g0 -O2' \
Expand Down
8 changes: 5 additions & 3 deletions ci/test/00_setup_env_native_tidy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
export CONTAINER_NAME=ci_native_tidy
export TIDY_LLVM_V="19"
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 qtbase5-dev qttools5-dev qttools5-dev-tools libqrencode-dev libsqlite3-dev libdb++-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 qtbase5-dev qttools5-dev qttools5-dev-tools libqrencode-dev libsqlite3-dev libdb++-dev libcapnp-dev capnproto"
export NO_DEPENDS=1
export RUN_UNIT_TESTS=false
export RUN_FUNCTIONAL_TESTS=false
export RUN_FUZZ_TESTS=false
export RUN_CHECK_DEPS=true
export RUN_CHECK_DEPS=false
export RUN_TIDY=true
export GOAL="install"
export DEP_OPTS="NO_WALLET=1"
export BITCOIN_CONFIG="\
-DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DWITH_USDT=ON -DWITH_BDB=ON -DWARN_INCOMPATIBLE_BDB=OFF \
-DWITH_MULTIPROCESS=ON \
-DBUILD_BENCH=ON \
-DENABLE_HARDENING=OFF \
-DCMAKE_C_COMPILER=clang-${TIDY_LLVM_V} \
-DCMAKE_CXX_COMPILER=clang++-${TIDY_LLVM_V} \
Expand Down
2 changes: 1 addition & 1 deletion ci/test/00_setup_env_native_tsan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ export APT_LLVM_V="19"
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev libc++abi-${APT_LLVM_V}-dev libc++-${APT_LLVM_V}-dev python3-zmq"
export DEP_OPTS="CC=clang-${APT_LLVM_V} CXX='clang++-${APT_LLVM_V} -stdlib=libc++'"
export GOAL="install"
export BITCOIN_CONFIG="-DWITH_ZMQ=ON -DSANITIZERS=thread \
export BITCOIN_CONFIG="-DSANITIZERS=thread \
-DAPPEND_CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER -DDEBUG_LOCKCONTENTION -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES'"
6 changes: 3 additions & 3 deletions ci/test/00_setup_env_native_valgrind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ export LC_ALL=C.UTF-8

export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
export CONTAINER_NAME=ci_native_valgrind
export PACKAGES="valgrind clang-16 llvm-16 libclang-rt-16-dev python3-zmq libevent-dev libboost-dev libdb5.3++-dev libzmq3-dev libsqlite3-dev"
export PACKAGES="valgrind clang-16 llvm-16 libclang-rt-16-dev python3-zmq libevent-dev libboost-dev libdb5.3++-dev libzmq3-dev libsqlite3-dev libcapnp-dev capnproto"
export USE_VALGRIND=1
export NO_DEPENDS=1
export TEST_RUNNER_EXTRA="--exclude feature_init,rpc_bind,feature_bind_extra" # feature_init excluded for now, see https://github.com/bitcoin/bitcoin/issues/30011 ; bind tests excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
export GOAL="install"
# TODO enable GUI
export BITCOIN_CONFIG="\
-DWITH_ZMQ=ON -DWITH_BDB=ON -DWARN_INCOMPATIBLE_BDB=OFF -DBUILD_GUI=OFF \
-DWITH_MULTIPROCESS=OFF \
-DBUILD_GUI=OFF \
-DCMAKE_C_COMPILER=clang-16 \
-DCMAKE_CXX_COMPILER=clang++-16 \
"
11 changes: 11 additions & 0 deletions ci/test/01_base_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,14 @@ if [ -n "$XCODE_VERSION" ] && [ ! -d "${DEPENDS_DIR}/SDKs/${OSX_SDK_BASENAME}" ]
fi

git config --global ${CFG_DONE} "true"

# Install libmultiprocess
if [ -n "$NO_DEPENDS" ]; then
git clone https://github.com/chaincodelabs/libmultiprocess.git
cd libmultiprocess
mkdir build
cd build
cmake ..
cmake --build .
cmake --install . || sudo cmake --install .
fi
3 changes: 2 additions & 1 deletion ci/test/03_test_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build-$HOST}
mkdir -p "${BASE_BUILD_DIR}"
cd "${BASE_BUILD_DIR}"

BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DENABLE_EXTERNAL_SIGNER=ON -DCMAKE_INSTALL_PREFIX=$BASE_OUTDIR"
# Disable things the Template Provider binary doesn't use
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DENABLE_WALLET=OFF -DCMAKE_INSTALL_PREFIX=$BASE_OUTDIR"

if [[ "${RUN_TIDY}" == "true" ]]; then
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
Expand Down
5 changes: 1 addition & 4 deletions cmake/module/GenerateSetupNsi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ function(generate_setup_nsi)
set(abs_top_builddir ${PROJECT_BINARY_DIR})
set(CLIENT_URL ${PROJECT_HOMEPAGE_URL})
set(CLIENT_TARNAME "bitcoin")
set(BITCOIN_GUI_NAME "bitcoin-qt")
set(BITCOIN_DAEMON_NAME "bitcoind")
# TODO: add bitcoin-node and bitcoin-miner
set(BITCOIN_CLI_NAME "bitcoin-cli")
set(BITCOIN_TX_NAME "bitcoin-tx")
set(BITCOIN_WALLET_TOOL_NAME "bitcoin-wallet")
set(BITCOIN_TEST_NAME "test_bitcoin")
set(EXEEXT ${CMAKE_EXECUTABLE_SUFFIX})
configure_file(${PROJECT_SOURCE_DIR}/share/setup.nsi.in ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.nsi USE_SOURCE_PERMISSIONS @ONLY)
Expand Down
10 changes: 3 additions & 7 deletions cmake/module/Maintenance.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function(add_maintenance_targets)
VERBATIM
)

foreach(target IN ITEMS bitcoind bitcoin-qt bitcoin-cli bitcoin-tx bitcoin-util bitcoin-wallet test_bitcoin bench_bitcoin)
foreach(target IN ITEMS bitcoind bitcoin-qt bitcoin-cli bitcoin-tx bitcoin-util bitcoin-wallet bitcoin-mine test_bitcoin bench_bitcoin)
if(TARGET ${target})
list(APPEND executables $<TARGET_FILE:${target}>)
endif()
Expand All @@ -66,20 +66,16 @@ function(add_maintenance_targets)
endfunction()

function(add_windows_deploy_target)
if(MINGW AND TARGET bitcoin-qt AND TARGET bitcoind AND TARGET bitcoin-cli AND TARGET bitcoin-tx AND TARGET bitcoin-wallet AND TARGET bitcoin-util AND TARGET test_bitcoin)
# TODO: add TARGET bitcoin-node TARGET bitcoin-mine
if(MINGW AND TARGET bitcoin-cli AND TARGET test_bitcoin)
# TODO: Consider replacing this code with the CPack NSIS Generator.
# See https://cmake.org/cmake/help/latest/cpack_gen/nsis.html
include(GenerateSetupNsi)
generate_setup_nsi()
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.exe
COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/release
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-qt> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-qt>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoind> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoind>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-cli> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-cli>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-tx> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-tx>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-wallet> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-wallet>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-util> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-util>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:test_bitcoin> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:test_bitcoin>
COMMAND makensis -V2 ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.nsi
VERBATIM
Expand Down
6 changes: 0 additions & 6 deletions contrib/devtools/check-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ declare -A SUPPRESS
# init.cpp file currently calls Berkeley DB sanity check function on startup, so
# there is an undocumented dependency of the node library on the wallet library.
SUPPRESS["init.cpp.o bdb.cpp.o _ZN6wallet27BerkeleyDatabaseSanityCheckEv"]=1
# init/common.cpp file calls InitError and InitWarning from interface_ui which
# is currently part of the node library. interface_ui should just be part of the
# common library instead, and is moved in
# https://github.com/bitcoin/bitcoin/issues/10102
SUPPRESS["common.cpp.o interface_ui.cpp.o _Z11InitWarningRK13bilingual_str"]=1
SUPPRESS["common.cpp.o interface_ui.cpp.o _Z9InitErrorRK13bilingual_str"]=1
# rpc/external_signer.cpp adds defines node RPC methods but is built as part of the
# common library. It should be moved to the node library instead.
SUPPRESS["external_signer.cpp.o server.cpp.o _ZN9CRPCTable13appendCommandERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPK11CRPCCommand"]=1
Expand Down
1 change: 1 addition & 0 deletions contrib/devtools/gen-manpages.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
BINARIES = [
'src/bitcoind',
'src/bitcoin-cli',
'src/bitcoin-mine',
'src/bitcoin-tx',
'src/bitcoin-wallet',
'src/bitcoin-util',
Expand Down
Loading
Loading