Skip to content

Commit c6fe291

Browse files
Merge branch 'bitcoin:master' into master
2 parents 515514a + 4af72d8 commit c6fe291

File tree

468 files changed

+17176
-10906
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

468 files changed

+17176
-10906
lines changed

.github/ci-test-each-commit-exec.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ set -o errexit -o pipefail -o xtrace
1212
echo "Running test-one-commit on $( git log -1 )"
1313

1414
# Use clang++, because it is a bit faster and uses less memory than g++
15-
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'
15+
CC=clang CXX=clang++ cmake -B build -DWERROR=ON -DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWITH_USDT=ON -DCMAKE_CXX_FLAGS='-Wno-error=unused-member-function'
1616

17-
cmake --build build -j "$( nproc )" && ctest --output-on-failure --stop-on-failure --test-dir build -j "$( nproc )"
17+
cmake --build build -j "$( nproc )"
18+
19+
ctest --output-on-failure --stop-on-failure --test-dir build -j "$( nproc )"
1820

1921
./build/test/functional/test_runner.py -j $(( $(nproc) * 2 )) --combinedlogslen=99999999

.github/workflows/ci.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
git config user.name "CI"
7878
- run: |
7979
sudo apt-get update
80-
sudo apt-get install clang ccache build-essential cmake ninja-build pkgconf python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libzmq3-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev -y
80+
sudo apt-get install clang 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
8181
- name: Compile and run tests
8282
run: |
8383
# Run tests on commits after the last merge commit and before the PR head commit
@@ -175,7 +175,7 @@ jobs:
175175
job-type: [standard, fuzz]
176176
include:
177177
- job-type: standard
178-
generate-options: '-DBUILD_GUI=ON -DWITH_BDB=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DWERROR=ON'
178+
generate-options: '-DBUILD_GUI=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DWERROR=ON'
179179
job-name: 'Windows native, VS 2022'
180180
- job-type: fuzz
181181
generate-options: '-DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="wallet" -DBUILD_GUI=OFF -DBUILD_FOR_FUZZING=ON -DWERROR=ON'
@@ -237,6 +237,15 @@ jobs:
237237
run: |
238238
cmake --build . -j $NUMBER_OF_PROCESSORS --config Release
239239
240+
- name: Get bitcoind manifest
241+
if: matrix.job-type == 'standard'
242+
working-directory: build
243+
run: |
244+
mt.exe -nologo -inputresource:bin/Release/bitcoind.exe -out:bitcoind.manifest
245+
cat bitcoind.manifest
246+
echo
247+
mt.exe -nologo -inputresource:bin/Release/bitcoind.exe -validate_manifest
248+
240249
- name: Run test suite
241250
if: matrix.job-type == 'standard'
242251
working-directory: build
@@ -347,6 +356,20 @@ jobs:
347356
- name: Run bitcoind.exe
348357
run: ./bin/bitcoind.exe -version
349358

359+
- name: Find mt.exe tool
360+
shell: pwsh
361+
run: |
362+
$sdk_dir = (Get-ItemProperty 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots' -Name KitsRoot10).KitsRoot10
363+
$sdk_latest = (Get-ChildItem "$sdk_dir\bin" -Directory | Where-Object { $_.Name -match '^\d+\.\d+\.\d+\.\d+$' } | Sort-Object Name -Descending | Select-Object -First 1).Name
364+
"MT_EXE=${sdk_dir}bin\${sdk_latest}\x64\mt.exe" >> $env:GITHUB_ENV
365+
366+
- name: Get bitcoind manifest
367+
shell: pwsh
368+
run: |
369+
& $env:MT_EXE -nologo -inputresource:bin\bitcoind.exe -out:bitcoind.manifest
370+
Get-Content bitcoind.manifest
371+
& $env:MT_EXE -nologo -inputresource:bin\bitcoind.exe -validate_manifest
372+
350373
- name: Run unit tests
351374
# Can't use ctest here like other jobs as we don't have a CMake build tree.
352375
run: |

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Patterns that are specific to a text editor, IDE, operating system, or user
2+
# environment are not added here. They should be added to your local gitignore
3+
# file instead:
4+
# https://docs.github.com/en/get-started/git-basics/ignoring-files#configuring-ignored-files-for-all-repositories-on-your-computer
5+
16
# Build subdirectories.
27
/*build*
38
!/build-aux

CMakeLists.txt

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ if(POLICY CMP0171)
1919
cmake_policy(SET CMP0171 NEW)
2020
endif()
2121

22+
# When adjusting CMake flag variables, we must not override those explicitly
23+
# set by the user. These are a subset of the CACHE_VARIABLES property.
24+
get_directory_property(precious_variables CACHE_VARIABLES)
25+
2226
#=============================
2327
# Project / Package metadata
2428
#=============================
@@ -90,6 +94,7 @@ endif()
9094
#=============================
9195
include(CMakeDependentOption)
9296
# When adding a new option, end the <help_text> with a full stop for consistency.
97+
option(BUILD_BITCOIN_BIN "Build bitcoin executable." ON)
9398
option(BUILD_DAEMON "Build bitcoind executable." ON)
9499
option(BUILD_GUI "Build bitcoin-qt executable." OFF)
95100
option(BUILD_CLI "Build bitcoin-cli executable." ON)
@@ -110,22 +115,6 @@ if(ENABLE_WALLET)
110115
find_package(SQLite3 3.7.17 REQUIRED)
111116
endif()
112117
endif()
113-
option(WITH_BDB "Enable Berkeley DB (BDB) wallet support." OFF)
114-
cmake_dependent_option(WARN_INCOMPATIBLE_BDB "Warn when using a Berkeley DB (BDB) version other than 4.8." ON "WITH_BDB" OFF)
115-
if(WITH_BDB)
116-
find_package(BerkeleyDB 4.8 MODULE REQUIRED)
117-
set(USE_BDB ON)
118-
if(NOT BerkeleyDB_VERSION VERSION_EQUAL 4.8)
119-
message(WARNING "Found Berkeley DB (BDB) other than 4.8.\n"
120-
"BDB (legacy) wallets opened by this build will not be portable!"
121-
)
122-
if(WARN_INCOMPATIBLE_BDB)
123-
message(WARNING "If this is intended, pass \"-DWARN_INCOMPATIBLE_BDB=OFF\".\n"
124-
"Passing \"-DWITH_BDB=OFF\" will suppress this warning."
125-
)
126-
endif()
127-
endif()
128-
endif()
129118
cmake_dependent_option(BUILD_WALLET_TOOL "Build bitcoin-wallet tool." ${BUILD_TESTS} "ENABLE_WALLET" OFF)
130119

131120
option(REDUCE_EXPORTS "Attempt to reduce exported symbols in the resulting executables." OFF)
@@ -142,15 +131,15 @@ if(WITH_USDT)
142131
find_package(USDT MODULE REQUIRED)
143132
endif()
144133

145-
cmake_dependent_option(ENABLE_EXTERNAL_SIGNER "Enable external signer support." ON "NOT WIN32" OFF)
134+
option(ENABLE_EXTERNAL_SIGNER "Enable external signer support." ON)
146135

147136
cmake_dependent_option(WITH_QRENCODE "Enable QR code support." ON "BUILD_GUI" OFF)
148137
if(WITH_QRENCODE)
149138
find_package(QRencode MODULE REQUIRED)
150139
set(USE_QRCODE TRUE)
151140
endif()
152141

153-
cmake_dependent_option(WITH_DBUS "Enable DBus support." ON "CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND BUILD_GUI" OFF)
142+
cmake_dependent_option(WITH_DBUS "Enable DBus support." ON "NOT CMAKE_SYSTEM_NAME MATCHES \"(Windows|Darwin)\" AND BUILD_GUI" OFF)
154143

155144
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)
156145
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)
@@ -214,6 +203,7 @@ target_link_libraries(core_interface INTERFACE
214203

215204
if(BUILD_FOR_FUZZING)
216205
message(WARNING "BUILD_FOR_FUZZING=ON will disable all other targets and force BUILD_FUZZ_BINARY=ON.")
206+
set(BUILD_BITCOIN_BIN OFF)
217207
set(BUILD_DAEMON OFF)
218208
set(BUILD_CLI OFF)
219209
set(BUILD_TX OFF)
@@ -288,6 +278,10 @@ if(WIN32)
288278
/Zc:__cplusplus
289279
/sdl
290280
)
281+
target_link_options(core_interface INTERFACE
282+
# We embed our own manifests.
283+
/MANIFEST:NO
284+
)
291285
# Improve parallelism in MSBuild.
292286
# See: https://devblogs.microsoft.com/cppblog/improved-parallelism-in-msbuild/.
293287
list(APPEND CMAKE_VS_GLOBALS "UseMultiToolTask=true")
@@ -449,6 +443,7 @@ else()
449443
try_append_cxx_flags("-Wvla" TARGET warn_interface SKIP_LINK)
450444
try_append_cxx_flags("-Wshadow-field" TARGET warn_interface SKIP_LINK)
451445
try_append_cxx_flags("-Wthread-safety" TARGET warn_interface SKIP_LINK)
446+
try_append_cxx_flags("-Wthread-safety-pointer" TARGET warn_interface SKIP_LINK)
452447
try_append_cxx_flags("-Wloop-analysis" TARGET warn_interface SKIP_LINK)
453448
try_append_cxx_flags("-Wredundant-decls" TARGET warn_interface SKIP_LINK)
454449
try_append_cxx_flags("-Wunused-member-function" TARGET warn_interface SKIP_LINK)
@@ -655,6 +650,7 @@ message("\n")
655650
message("Configure summary")
656651
message("=================")
657652
message("Executables:")
653+
message(" bitcoin ............................. ${BUILD_BITCOIN_BIN}")
658654
message(" bitcoind ............................ ${BUILD_DAEMON}")
659655
if(BUILD_DAEMON AND ENABLE_IPC)
660656
set(bitcoin_daemon_status ON)
@@ -677,9 +673,6 @@ message(" bitcoin-chainstate (experimental) ... ${BUILD_UTIL_CHAINSTATE}")
677673
message(" libbitcoinkernel (experimental) ..... ${BUILD_KERNEL_LIB}")
678674
message("Optional features:")
679675
message(" wallet support ...................... ${ENABLE_WALLET}")
680-
if(ENABLE_WALLET)
681-
message(" - legacy wallets (Berkeley DB) ..... ${WITH_BDB}")
682-
endif()
683676
message(" external signer ..................... ${ENABLE_EXTERNAL_SIGNER}")
684677
message(" ZeroMQ .............................. ${WITH_ZMQ}")
685678
if(ENABLE_IPC)
@@ -694,7 +687,7 @@ endif()
694687
message(" IPC ................................. ${ipc_status}")
695688
message(" USDT tracing ........................ ${WITH_USDT}")
696689
message(" QR code (GUI) ....................... ${WITH_QRENCODE}")
697-
message(" DBus (GUI, Linux only) .............. ${WITH_DBUS}")
690+
message(" DBus (GUI) .......................... ${WITH_DBUS}")
698691
message("Tests:")
699692
message(" test_bitcoin ........................ ${BUILD_TESTS}")
700693
message(" test_bitcoin-qt ..................... ${BUILD_GUI_TESTS}")

CMakePresets.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@
7878
"BUILD_WALLET_TOOL": "ON",
7979
"ENABLE_EXTERNAL_SIGNER": "ON",
8080
"ENABLE_WALLET": "ON",
81-
"WARN_INCOMPATIBLE_BDB": "OFF",
82-
"WITH_BDB": "ON",
8381
"ENABLE_IPC": "ON",
8482
"WITH_QRENCODE": "ON",
8583
"WITH_USDT": "ON",

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ facilitates social contribution, easy testing and peer review.
8080

8181
To contribute a patch, the workflow is as follows:
8282

83-
1. Fork repository ([only for the first time](https://docs.github.com/en/get-started/quickstart/fork-a-repo))
83+
1. Fork repository ([only for the first time](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo))
8484
1. Create topic branch
8585
1. Commit patches
8686

@@ -121,7 +121,7 @@ Commit messages should be verbose by default consisting of a short subject line
121121
paragraph(s), unless the title alone is self-explanatory (like "Correct typo
122122
in init.cpp") in which case a single title line is sufficient. Commit messages should be
123123
helpful to people reading your code in the future, so explain the reasoning for
124-
your decisions. Further explanation [here](https://chris.beams.io/posts/git-commit/).
124+
your decisions. Further explanation [here](https://cbea.ms/git-commit/).
125125

126126
If a particular commit references another issue, please add the reference. For
127127
example: `refs #1234` or `fixes #4321`. Using the `fixes` or `closes` keywords
@@ -182,7 +182,7 @@ for more information on helping with translations.
182182
### Work in Progress Changes and Requests for Comments
183183

184184
If a pull request is not to be considered for merging (yet), please
185-
prefix the title with [WIP] or use [Tasks Lists](https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#task-lists)
185+
prefix the title with [WIP] or use [Tasks Lists](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#task-lists)
186186
in the body of the pull request to indicate tasks are pending.
187187

188188
### Address Feedback
@@ -401,7 +401,7 @@ about:
401401
- It may be because your code is too complex for all but a few people, and those people
402402
may not have realized your pull request even exists. A great way to find people who
403403
are qualified and care about the code you are touching is the
404-
[Git Blame feature](https://docs.github.com/en/github/managing-files-in-a-repository/managing-files-on-github/tracking-changes-in-a-file). Simply
404+
[Git Blame feature](https://docs.github.com/en/repositories/working-with-files/using-files/viewing-and-understanding-files). Simply
405405
look up who last modified the code you are changing and see if you can find
406406
them and give them a nudge. Don't be incessant about the nudging, though.
407407
- Finally, if all else fails, ask on IRC or elsewhere for someone to give your pull request

INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
See [doc/build-\*.md](/doc)
1+
See [doc/build-\*.md](/doc)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ License
1919
-------
2020

2121
Bitcoin Core is released under the terms of the MIT license. See [COPYING](COPYING) for more
22-
information or see https://opensource.org/licenses/MIT.
22+
information or see https://opensource.org/license/MIT.
2323

2424
Development Process
2525
-------------------

ci/lint/04_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ command -v python3
3737
python3 --version
3838

3939
${CI_RETRY_EXE} pip3 install \
40-
codespell==2.2.6 \
40+
codespell==2.4.1 \
4141
lief==0.13.2 \
4242
mypy==1.4.1 \
4343
pyzmq==25.1.0 \

ci/test/00_setup_env_i686_multiprocess.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ export BITCOIN_CONFIG="\
2020
-DCMAKE_CXX_COMPILER='clang++;-m32' \
2121
-DAPPEND_CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' \
2222
"
23-
export BITCOIND=bitcoin-node # Used in functional tests
23+
export BITCOIN_CMD="bitcoin -m" # Used in functional tests

0 commit comments

Comments
 (0)