Skip to content

Commit de777e8

Browse files
committed
Squashed 'depend/bitcoin/' changes from 35f8503285..20eec64b5e
20eec64b5e kernel: Add pure kernel bitcoin-chainstate 1522ee9596 kernel: Add functions to get the block hash from a block c543cadc90 kernel: Add block index utility functions to C header 6b5a4fed43 kernel: Add function to read block undo data from disk to C header 6b53c3ba1a kernel: Add functions to read block from disk to C header 7f9908ad99 kernel: Add function for copying block data to C header 1ab71ac371 kernel: Add functions for the block validation state to C header 508dd4db98 kernel: Add validation interface to C header a6a658e5f8 kernel: Add interrupt function to C header 253c3cd36f kernel: Add import blocks function to C header 3ed633b6c4 kernel: Add chainstate load options for in-memory dbs in C header 08ec37f8ce kernel: Add options for reindexing in C header ad0875e397 kernel: Add block validation to C header 2575018d69 Kernel: Add chainstate loading to kernel C header f5d21c94dc kernel: Add chainstate manager option for setting worker threads 783f56f0a2 kernel: Add chainstate manager object to C header 262039e409 kernel: Add notifications context option to C header dc0d406dd5 kerenl: Add chain params context option to C header b5f84de7ad kernel: Add kernel library context object dad0009c86 kernel: Add logging to kernel library C header 27e25aa941 kernel: Introduce initial kernel C header API ff873a20a7 Merge bitcoin/bitcoin#31313: refactor: Clamp worker threads in ChainstateManager constructor c9a7418a8d Merge bitcoin/bitcoin#31096: Package validation: accept packages of size 1 6f24662eb9 Merge bitcoin/bitcoin#31175: rpc: Remove submitblock pre-checks 3867d2421a Merge bitcoin/bitcoin#31112: Improve parallel script validation error debug logging 8e02b48059 Merge bitcoin/bitcoin#31284: ci: Skip broken Wine64 tests by default 492e1f0994 [validation] merge all ConnectBlock debug logging code paths b49df703f0 [validation] include all logged information in BlockValidationState 7b267c034f [validation] Add detailed txin/txout information for script error messages 146a3d5426 [validation] Make script error messages uniform for parallel/single validation 1ac1c33f3f [checkqueue] support user-defined return type through std::optional ebe4cac38b Merge bitcoin/bitcoin#30991: test: enable running independent functional test sub-tests 1927674100 Merge bitcoin/bitcoin#31387: doc: Use more precise anchor link to codesigning docs e043618d44 Merge bitcoin/bitcoin#31396: test: simple reordering to reduce run time a25b892ab1 Merge bitcoin/bitcoin#31386: doc: Use more precise anchor links to Xcode SDK extraction eb646111cd Merge bitcoin/bitcoin#31383: test: Add missing node.setmocktime(self.mocktime) to p2p_ibd_stalling.py 6cd95de2e0 Merge bitcoin/bitcoin#31395: build: Set shared linker flags in toolchain file abeebccc48 Merge bitcoin/bitcoin#31357: cmake: Improve build script correctness 4c9b13841c Merge bitcoin/bitcoin#31402: doc: correct libfuzzer-nosan preset flag da4f4fac8d Merge bitcoin/bitcoin#31361: cmake, qt: Use absolute paths for includes in MOC-generated files 16b140f225 doc: correct libfuzzer-nosan preset flag 097c66f614 Merge bitcoin/bitcoin#30039: dbwrapper: Bump LevelDB max file size to 32 MiB to avoid system slowdown from high disk cache flush rate 68daaea0e4 Merge bitcoin/bitcoin#31390: Remove `src/config` directory 14f162dc5c Merge bitcoin/bitcoin#31399: ci, macos: Install `pkgconf` Homebrew's package e2f2698395 ci, macos: Install `pkgconf` Homebrew's package b73d331937 dbwrapper: Bump max file size to 32 MiB 62f6d9e1a4 test: simple ordering optimization to reduce runtime a8e04704f9 build: Set shared linker flags in toolchain file dbc8ba12f3 Merge bitcoin/bitcoin#31371: doc, test: more ephemeral dust follow-ups 935973b315 Remove `src/config` directory 19f49c7489 doc: Use more precise anchor link to codesigning docs 8bf1b3039c doc: Use more precise anchor links to Xcode SDK extraction 7590e93bc7 Merge bitcoin/bitcoin#30986: contrib: skip missing binaries in gen-manpages b2af068825 Merge bitcoin/bitcoin#30708: rpc: add getdescriptoractivity 144f98db85 Merge bitcoin/bitcoin#31337: build: Fix coverage builds faa16ed4b9 test: Add missing node.setmocktime(self.mocktime) to p2p_ibd_stalling.py efdb49afb9 Merge bitcoin/bitcoin#31323: guix: swap `moreutils` for just `sponge` 37a5c5d836 doc: update descriptors.md for getdescriptoractivity ee3ce6a4f4 test: rpc: add no address case for getdescriptoractivity 811f76f3a5 rpc: add getdescriptoractivity ee6185372f gen-manpages: Prompt error if no binaries are found 70e20ea024 Merge bitcoin/bitcoin#31172: build: increase minimum supported Windows to 10.0 733317ba94 Merge bitcoin/bitcoin#31364: refactor: Fix remaining clang-tidy performance-unnecessary-copy-initialization errors 5a4bc5c036 Merge bitcoin/bitcoin#31305: refactor: Fix remaining clang-tidy performance-inefficient-vector errors 28fd0bc731 Merge bitcoin/bitcoin#31365: interpreter: Use the same type for SignatureHash in the definition 72ab35a6d0 Merge bitcoin/bitcoin#31221: ci: Split out native fuzz jobs for macOS and windows (take 2) 160799d913 test: refactor: introduce `create_ephemeral_dust_package` helper 61e18dec30 doc: ephemeral policy: add missing closing double quote 32fc59796f rpc: Allow single transaction through submitpackage 3305972f7b refactor: Fix remaining clang-tidy performance-unnecessary-copy-initialization errors 11f3bc229c refactor: Reserve vectors in fuzz tests 152fefe7a2 refactor: Preallocate PrevectorFillVector(In)Direct without vector resize a774c7a339 refactor: Fix remaining clang-tidy performance-inefficient-vector errors f7144b24be Merge bitcoin/bitcoin#31279: policy: ephemeral dust followups c288c790cd interpreter: Use the same type for SignatureHash in the definition b031b7910d [ci] Split out native fuzz jobs for macOS and windows 6f4128e3a8 cmake, qt: Use absolute paths for includes in MOC-generated files ab5c63edcc cmake: Build `secp256k1` only when required 76a3a540a4 cmake: Ensure script correctness when no targets are specified e8f50c5deb guix: swap moreutils for just sponge 01a7298818 build: Avoid using the `-ffile-prefix-map` compiler option 2638fdb4f9 Merge bitcoin/bitcoin#31338: test: Deduplicate assert_mempool_contents() 73db95c65c kernel: Make bitcoin-chainstate's block validation mirror submitblock's bb53ce9bda tests: Add functional test for submitting a previously pruned block 1f7fc73825 rpc: Remove submitblock duplicate pre-check e62a8abd7d rpc: Remove submitblock invalid-duplicate precheck 36dbebafb9 rpc: Remove submitblock coinbase pre-check 17834bd197 Merge bitcoin/bitcoin#31333: fuzz: Implement G_TEST_GET_FULL_NAME cf57722788 Merge bitcoin/bitcoin#31335: macOS: swap docs & CI from pkg-config to pkgconf fe3457ccff ci: note that we should install pkgconf in future a0eafc10f9 functional test: Deduplicate assert_mempool_contents() 8d203480b3 doc: migrate from pkg-config to pkgconf in macOS build docs 466e4df3fb assert_mempool_contents: assert not duplicates expected ea5db2f269 functional: only generate required blocks for test d033acb608 fuzz: package_eval: let fuzzer run out input in main tx creation loop ba35a570c5 CheckEphemeralSpends: return boolean, and set child state and txid outparams cf0cee1617 func: add note about lack of 1P1C propagation in tree submitpackage 8424290304 unit test: ephemeral_tests is using a dust relay rate, not minrelay d9cfa5fc4e CheckEphemeralSpends: no need to iterate inputs if no parent dust 87b26e3dc0 func: rename test_free_relay to test_no_minrelay_fee e5709a4a41 func: slight elaboration on submitpackage restriction 08e969bd10 RPC: only enforce dust rules on priority when standardness active ca050d12e7 unit test: adapt to changing MAX_DUST_OUTPUTS_PER_TX 7c3490169c fuzz: package_eval: move last_tx inside txn ctor 445eaed182 fuzz: use optional status instead of should_rbf_eph_spend 4dfdf615b9 fuzz: remove unused TransactionsDelta validation interface 09ce926e4a func: cleanup reorg test comment 768a0c1889 func: cleanup test_dustrelay comments bedca1cb66 fuzz: Directly place transactions in vector c041ad6ecc fuzz: explain package eval coin tracking better bc0d98ea61 fuzz: remove dangling reference to GetEntry 15b6cbf07f unit test: make dust index less magical 5fbcfd12b8 unit test: assert txid returned on CheckEphemeralSpends failures ef94d84b4e bench: remove unnecessary CMTxn constructors c5c10fd317 ephemeral policy doxygen cleanup dd9044b8d4 ephemeral policy: IWYU c6859ce2de Move+rename GetDustIndexes -> GetDust 22ef95dbe3 Merge bitcoin/bitcoin#31288: Add destroy to BlockTemplate schema 92d3d691f0 fuzz: Implement G_TEST_GET_FULL_NAME f34fe0806a Merge bitcoin/bitcoin#31122: cluster mempool: Implement changeset interface for mempool b2d952c0f5 Merge bitcoin/bitcoin#31331: doc: add copyright header to p2p_headers_presync 7d3703dec3 doc: add copyright header to p2p_headers_presync 116b8c5573 Merge bitcoin/bitcoin#31213: fuzz: Fix difficulty target generation in `p2p_headers_presync` 15c1f47a00 Merge bitcoin/bitcoin#31327: doc: Correct PR Review Club frequency from weekly to monthly 1209a1082c Merge bitcoin/bitcoin#31315: build: Enable -Wbidi-chars=any ab22726def Merge bitcoin/bitcoin#31276: guix: scope pkg-config to Linux only 637f437a16 doc: remove PR Review Club frequency e122309958 Merge bitcoin/bitcoin#31317: test: Revert to random path element 2666d83da5 Merge bitcoin/bitcoin#30893: test: Introduce ensure_for helper faaaf59f71 test: Make g_rng_temp_path rand, not dependent on SeedRandomForTest 746f93b4f0 Merge bitcoin/bitcoin#31307: build: Temporarily disable compiling `fuzz/utxo_snapshot.cpp` with MSVC 25fe087de5 rpc: move-only: move ScriptPubKeyDoc to utils fa80b08fef test: Revert to random path element 8f85d36d68 refactor: Clamp worker threads in ChainstateManager constructor fa7857ccda build: Enable -Wbidi-chars=any b2d5361002 build: Temporarily disable compiling `fuzz/utxo_snapshot.cpp` with MSVC 9aa50152c1 Add destroy to BlockTemplate schema ccc2d3abcd Merge bitcoin/bitcoin#31287: refactor: Avoid std::string format strings 62016b3230 Use std::ranges for ephemeral policy checks 3ed930a1f4 Have HasDust and PreCheckValidEphemeralTx take CTransaction 04a614bf9a Rename CheckValidEphemeralTx to PreCheckEphemeralTx 85bcfeea23 Merge bitcoin/bitcoin#30666: validation: fix m_best_header tracking and BLOCK_FAILED_CHILD assignment 2257c6d68f Merge bitcoin/bitcoin#30487: ci: skip Github CI on branch pushes for forks 380e1f44e8 Merge bitcoin/bitcoin#30349: benchmark: Improve SipHash_32b accuracy to avoid potential optimization issues 1a8f51e745 Merge bitcoin/bitcoin#28843: [refactor] Cleanup BlockAssembler mempool usage 2d944e982c Merge bitcoin/bitcoin#31285: guix: remove `util-linux` bcd82b13f4 Remove pkgconfig from toolchain file 319a4e8261 depends: drop sqlite pkgconfig file fa1177e3d7 refactor: Avoid std::string format strings a8fe1fd38b depends: better cleanup after fontconfig 17e79c9260 depends: fully remove libtool archives from Qt build 8ca85651c8 guix: move pkg-config to Linux builds e3e648cf41 depends: drop pkg-config option from Qt build 0d185bd99f doc: update depends doc to prefer .cmake outputs e546b4e1a0 Merge bitcoin/bitcoin#31225: doc: Fix grammatical errors in multisig-tutorial.md f44e39c9d0 Merge bitcoin/bitcoin#31174: tinyformat: Add compile-time checking for literal format strings 299e2220e9 gen-manpages: implement --skip-missing-binaries 5736d1ddac tracing: pass if replaced by tx/pkg to tracepoint a4ec07f194 doc: add comments for CTxMemPool::ChangeSet 83f814b1d1 Remove m_all_conflicts from SubPackageState d3c8e7dfb6 Ensure that we don't add duplicate transactions in rbf fuzz tests d7dc9fd2f7 Move CalculateChunksForRBF() to the mempool changeset 284a1d33f1 Move prioritisation into changeset 446b08b599 Don't distinguish between direct conflicts and all conflicts when doing cluster-size-2-rbf checks b53041021a Duplicate transactions are not permitted within a changeset b447416fdd Public mempool removal methods Assume() no changeset is outstanding 2b30f4d36c Make RemoveStaged() private 18829194ca Enforce that there is only one changeset at a time 7fb62f7db6 Apply mempool changeset transactions directly into the mempool 34b6c5833d Clean up FinalizeSubpackage to avoid workspace-specific information 57983b8add Move LimitMempoolSize to take place outside FinalizeSubpackage 01e145b975 Move changeset from workspace to subpackage 802214c083 Introduce mempool changesets 87d92fa340 test: Add unit test coverage of package rbf + prioritisetransaction 15d982f91e Add package hash to package-rbf log message fa5e706459 ci: Skip broken Wine64 tests by default 4d66854982 ci: remove util-linux from centos CI cdf34be7c9 guix: remove util-linux cbf1a47d60 CheckEphemeralSpends: only compute txid of tx when needed 111465d72d test: Remove unused attempts parameter from wait_until 5468a23eb9 test: Add check_interval parameter to wait_until 16c87d91fd test: Introduce ensure_for helper a6ca8f3243 fuzz: Fix difficulty target generation in p2p_headers_presync 8610bcef9d ci: skip Github CI on branch pushes for forks 409d0d6293 test: enable running individual independent functional test methods ee1128ead8 doc: update stack-clash-protection comment re mingw-w64 bf47448f15 test: drop check for Windows < 10 35b898c47f release: target Windows 10 or later 398754e70b depends: target Windows 10 when building for mingw-w64 ac286e0d1b doc: Fix grammatical errors in multisig-tutorial.md fa327c77e3 util: Add ConsumeArithUInt256InRange fuzzing helper 42066f45ff Refactor SipHash_32b benchmark to improve accuracy and avoid optimization issues fe39acf88f tinyformat: Add compile-time checking for literal format strings 184f34f2d0 util: Support dynamic width & precision in ConstevalFormatString 192dac1d33 [refactor] Cleanup BlockAssembler mempool usage 0bd53d913c test: add test for getchaintips behavior with invalid chains ccd98ea4c8 test: cleanup rpc_getchaintips.py f5149ddb9b validation: mark blocks building on an invalid block as BLOCK_FAILED_CHILD 783cb7337f validation: call RecalculateBestHeader in InvalidChainFound 9275e9689a rpc: call RecalculateBestHeader as part of reconsiderblock a51e91783a validation: add RecalculateBestHeader() function REVERT: 35f8503285 kernel: Add pure kernel bitcoin-chainstate REVERT: 84eb1f952c kernel: Add functions to get the block hash from a block REVERT: 575cb5a033 kernel: Add block index utility functions to C header REVERT: 4c433defd3 kernel: Add function to read block undo data from disk to C header REVERT: 83e48e021b kernel: Add functions to read block from disk to C header REVERT: a4381c560f kernel: Add function for copying block data to C header REVERT: d3e84ac5a6 kernel: Add functions for the block validation state to C header REVERT: deb5b4a5f5 kernel: Add validation interface to C header REVERT: f4ea5f49c6 kernel: Add interrupt function to C header REVERT: 5f4b436aad kernel: Add import blocks function to C header REVERT: c95a28fd80 kernel: Add chainstate load options for in-memory dbs in C header REVERT: d6360557ef kernel: Add options for reindexing in C header REVERT: a125867b9f kernel: Add block validation to C header REVERT: b2b75a0ef7 Kernel: Add chainstate loading to kernel C header REVERT: d233003ff2 kernel: Add chainstate manager option for setting worker threads REVERT: 3610be3b13 kernel: Add chainstate manager object to C header REVERT: c194bea41f kernel: Add notifications context option to C header REVERT: 691d89d846 kerenl: Add chain params context option to C header REVERT: 407ca750cd kernel: Add kernel library context object REVERT: ee3c4ea92c kernel: Add logging to kernel library C header REVERT: e6c610a7e0 kernel: Introduce initial kernel C header API git-subtree-dir: depend/bitcoin git-subtree-split: 20eec64b5e417cac8c68100826c0adf2152a49eb
1 parent 0982f96 commit de777e8

File tree

141 files changed

+2860
-1557
lines changed

Some content is hidden

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

141 files changed

+2860
-1557
lines changed

depend/bitcoin/.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ task:
131131
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
132132

133133
task:
134-
name: 'Win64, unit tests, no gui tests, no functional tests'
134+
name: 'Win64-cross'
135135
<< : *GLOBAL_TASK_TEMPLATE
136136
persistent_worker:
137137
labels:

depend/bitcoin/.github/workflows/ci.yml

Lines changed: 61 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,34 @@ jobs:
7575
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 }}
7676
7777
macos-native-arm64:
78-
name: 'macOS 14 native, arm64, no depends, sqlite only, gui'
78+
name: ${{ matrix.job-name }}
7979
# Use latest image, but hardcode version to avoid silent upgrades (and breaks).
8080
# See: https://github.com/actions/runner-images#available-images.
8181
runs-on: macos-14
8282

83-
# No need to run on the read-only mirror, unless it is a PR.
84-
if: github.repository != 'bitcoin-core/gui' || github.event_name == 'pull_request'
83+
# When a contributor maintains a fork of the repo, any pull request they make
84+
# to their own fork, or to the main repository, will trigger two CI runs:
85+
# one for the branch push and one for the pull request.
86+
# This can be avoided by setting SKIP_BRANCH_PUSH=true as a custom env variable
87+
# in Github repository settings.
88+
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
8589

8690
timeout-minutes: 120
8791

92+
strategy:
93+
fail-fast: false
94+
matrix:
95+
job-type: [standard, fuzz]
96+
include:
97+
- job-type: standard
98+
file-env: './ci/test/00_setup_env_mac_native.sh'
99+
job-name: 'macOS 14 native, arm64, no depends, sqlite only, gui'
100+
- job-type: fuzz
101+
file-env: './ci/test/00_setup_env_mac_native_fuzz.sh'
102+
job-name: 'macOS 14 native, arm64, fuzz'
103+
88104
env:
89105
DANGER_RUN_CI_ON_HOST: 1
90-
FILE_ENV: './ci/test/00_setup_env_mac_native.sh'
91106
BASE_ROOT_DIR: ${{ github.workspace }}
92107

93108
steps:
@@ -105,7 +120,7 @@ jobs:
105120
run: |
106121
# A workaround for "The `brew link` step did not complete successfully" error.
107122
brew install --quiet python@3 || brew link --overwrite python@3
108-
brew install --quiet coreutils ninja pkg-config gnu-getopt ccache boost libevent zeromq qt@5 qrencode
123+
brew install --quiet coreutils ninja pkgconf gnu-getopt ccache boost libevent zeromq qt@5 qrencode
109124
110125
- name: Set Ccache directory
111126
run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV"
@@ -115,33 +130,46 @@ jobs:
115130
uses: actions/cache/restore@v4
116131
with:
117132
path: ${{ env.CCACHE_DIR }}
118-
key: ${{ github.job }}-ccache-${{ github.run_id }}
119-
restore-keys: ${{ github.job }}-ccache-
133+
key: ${{ github.job }}-${{ matrix.job-type }}-ccache-${{ github.run_id }}
134+
restore-keys: ${{ github.job }}-${{ matrix.job-type }}-ccache-
120135

121136
- name: CI script
122137
run: ./ci/test_run_all.sh
138+
env:
139+
FILE_ENV: ${{ matrix.file-env }}
123140

124141
- name: Save Ccache cache
125142
uses: actions/cache/save@v4
126143
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
127144
with:
128145
path: ${{ env.CCACHE_DIR }}
129146
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
130-
key: ${{ github.job }}-ccache-${{ github.run_id }}
147+
key: ${{ github.job }}-${{ matrix.job-type }}-ccache-${{ github.run_id }}
131148

132149
win64-native:
133-
name: 'Win64 native, VS 2022'
150+
name: ${{ matrix.job-name }}
134151
# Use latest image, but hardcode version to avoid silent upgrades (and breaks).
135152
# See: https://github.com/actions/runner-images#available-images.
136153
runs-on: windows-2022
137154

138-
# No need to run on the read-only mirror, unless it is a PR.
139-
if: github.repository != 'bitcoin-core/gui' || github.event_name == 'pull_request'
155+
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
140156

141157
env:
142158
PYTHONUTF8: 1
143159
TEST_RUNNER_TIMEOUT_FACTOR: 40
144160

161+
strategy:
162+
fail-fast: false
163+
matrix:
164+
job-type: [standard, fuzz]
165+
include:
166+
- job-type: standard
167+
generate-options: '-DBUILD_GUI=ON -DWITH_BDB=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DWERROR=ON'
168+
job-name: 'Win64 native, VS 2022'
169+
- job-type: fuzz
170+
generate-options: '-DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="sqlite" -DBUILD_GUI=OFF -DBUILD_FOR_FUZZING=ON -DWERROR=ON'
171+
job-name: 'Win64 native fuzz, VS 2022'
172+
145173
steps:
146174
- name: Checkout
147175
uses: actions/checkout@v4
@@ -182,11 +210,11 @@ jobs:
182210

183211
- name: Generate build system
184212
run: |
185-
cmake -B build --preset vs2022-static -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" -DBUILD_GUI=ON -DWITH_BDB=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWERROR=ON
213+
cmake -B build --preset vs2022-static -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" ${{ matrix.generate-options }}
186214
187215
- name: Save vcpkg binary cache
188216
uses: actions/cache/save@v4
189-
if: github.event_name != 'pull_request' && steps.vcpkg-binary-cache.outputs.cache-hit != 'true'
217+
if: github.event_name != 'pull_request' && steps.vcpkg-binary-cache.outputs.cache-hit != 'true' && matrix.job-type == 'standard'
190218
with:
191219
path: ~/AppData/Local/vcpkg/archives
192220
key: ${{ github.job }}-vcpkg-binary-${{ hashFiles('cmake_version', 'msbuild_version', 'toolset_version', 'vcpkg.json') }}
@@ -197,11 +225,13 @@ jobs:
197225
cmake --build . -j $env:NUMBER_OF_PROCESSORS --config Release
198226
199227
- name: Run test suite
228+
if: matrix.job-type == 'standard'
200229
working-directory: build
201230
run: |
202231
ctest --output-on-failure --stop-on-failure -j $env:NUMBER_OF_PROCESSORS -C Release
203232
204233
- name: Run functional tests
234+
if: matrix.job-type == 'standard'
205235
working-directory: build
206236
env:
207237
BITCOIND: '${{ github.workspace }}\build\src\Release\bitcoind.exe'
@@ -212,11 +242,27 @@ jobs:
212242
shell: cmd
213243
run: py -3 test\functional\test_runner.py --jobs %NUMBER_OF_PROCESSORS% --ci --quiet --tmpdirprefix=%RUNNER_TEMP% --combinedlogslen=99999999 --timeout-factor=%TEST_RUNNER_TIMEOUT_FACTOR% %TEST_RUNNER_EXTRA%
214244

245+
- name: Clone corpora
246+
if: matrix.job-type == 'fuzz'
247+
run: |
248+
git clone --depth=1 https://github.com/bitcoin-core/qa-assets "$env:RUNNER_TEMP\qa-assets"
249+
Set-Location "$env:RUNNER_TEMP\qa-assets"
250+
Write-Host "Using qa-assets repo from commit ..."
251+
git log -1
252+
253+
- name: Run fuzz tests
254+
if: matrix.job-type == 'fuzz'
255+
working-directory: build
256+
env:
257+
BITCOINFUZZ: '${{ github.workspace }}\build\src\test\fuzz\Release\fuzz.exe'
258+
shell: cmd
259+
run: |
260+
py -3 test\fuzz\test_runner.py --par %NUMBER_OF_PROCESSORS% --loglevel DEBUG %RUNNER_TEMP%\qa-assets\fuzz_corpora
261+
215262
asan-lsan-ubsan-integer-no-depends-usdt:
216263
name: 'ASan + LSan + UBSan + integer, no depends, USDT'
217264
runs-on: ubuntu-24.04 # has to match container in ci/test/00_setup_env_native_asan.sh for tracing tools
218-
# No need to run on the read-only mirror, unless it is a PR.
219-
if: github.repository != 'bitcoin-core/gui' || github.event_name == 'pull_request'
265+
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
220266
timeout-minutes: 120
221267
env:
222268
FILE_ENV: "./ci/test/00_setup_env_native_asan.sh"

depend/bitcoin/CMakeLists.txt

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ if(WIN32)
255255
]=]
256256

257257
target_compile_definitions(core_interface INTERFACE
258-
_WIN32_WINNT=0x0601
259-
_WIN32_IE=0x0501
258+
_WIN32_WINNT=0x0A00
259+
_WIN32_IE=0x0A00
260260
WIN32_LEAN_AND_MEAN
261261
NOMINMAX
262262
)
@@ -294,9 +294,11 @@ if(WIN32)
294294
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412.
295295
try_append_cxx_flags("-Wa,-muse-unaligned-vector-move" TARGET core_interface SKIP_LINK)
296296
try_append_linker_flag("-static" TARGET core_interface)
297-
# We require Windows 7 (NT 6.1) or later.
297+
# We support Windows 10+, however it's not possible to set these values accordingly,
298+
# due to a bug in mingw-w64. See https://sourceforge.net/p/mingw-w64/bugs/968/.
299+
# As a best effort, target Windows 8.
298300
try_append_linker_flag("-Wl,--major-subsystem-version,6" TARGET core_interface)
299-
try_append_linker_flag("-Wl,--minor-subsystem-version,1" TARGET core_interface)
301+
try_append_linker_flag("-Wl,--minor-subsystem-version,2" TARGET core_interface)
300302
endif()
301303
endif()
302304

@@ -419,6 +421,7 @@ else()
419421
try_append_cxx_flags("-Wunreachable-code" TARGET warn_interface SKIP_LINK)
420422
try_append_cxx_flags("-Wdocumentation" TARGET warn_interface SKIP_LINK)
421423
try_append_cxx_flags("-Wself-assign" TARGET warn_interface SKIP_LINK)
424+
try_append_cxx_flags("-Wbidi-chars=any" TARGET warn_interface SKIP_LINK)
422425
try_append_cxx_flags("-Wundef" TARGET warn_interface SKIP_LINK)
423426

424427
# Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
@@ -437,8 +440,16 @@ configure_file(contrib/filter-lcov.py filter-lcov.py USE_SOURCE_PERMISSIONS COPY
437440
# Don't allow extended (non-ASCII) symbols in identifiers. This is easier for code review.
438441
try_append_cxx_flags("-fno-extended-identifiers" TARGET core_interface SKIP_LINK)
439442

440-
try_append_cxx_flags("-ffile-prefix-map=A=B" TARGET core_interface SKIP_LINK
441-
IF_CHECK_PASSED "-ffile-prefix-map=${PROJECT_SOURCE_DIR}/src=."
443+
# Avoiding the `-ffile-prefix-map` compiler option because it implies
444+
# `-fcoverage-prefix-map` on Clang or `-fprofile-prefix-map` on GCC,
445+
# which can cause issues with coverage builds, particularly when using
446+
# Clang in the OSS-Fuzz environment due to its use of other options
447+
# and a third party script, or with GCC.
448+
try_append_cxx_flags("-fdebug-prefix-map=A=B" TARGET core_interface SKIP_LINK
449+
IF_CHECK_PASSED "-fdebug-prefix-map=${PROJECT_SOURCE_DIR}/src=."
450+
)
451+
try_append_cxx_flags("-fmacro-prefix-map=A=B" TARGET core_interface SKIP_LINK
452+
IF_CHECK_PASSED "-fmacro-prefix-map=${PROJECT_SOURCE_DIR}/src=."
442453
)
443454

444455
# Currently all versions of gcc are subject to a class of bugs, see the
@@ -479,8 +490,7 @@ if(ENABLE_HARDENING)
479490
try_append_cxx_flags("-fcf-protection=full" TARGET hardening_interface)
480491

481492
if(MINGW)
482-
# stack-clash-protection doesn't compile with GCC 10 and earlier.
483-
# In any case, it is a no-op for Windows.
493+
# stack-clash-protection is a no-op for Windows.
484494
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90458 for more details.
485495
else()
486496
try_append_cxx_flags("-fstack-clash-protection" TARGET hardening_interface)

depend/bitcoin/CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ list or changes that are
3636
Some of them might no longer be applicable. So if you are interested, but
3737
unsure, you might want to leave a comment on the issue first.
3838

39-
You may also participate in the weekly
40-
[Bitcoin Core PR Review Club](https://bitcoincore.reviews/) meeting.
39+
You may also participate in the [Bitcoin Core PR Review Club](https://bitcoincore.reviews/).
4140

4241
### Good First Issue Label
4342

depend/bitcoin/ci/test/00_setup_env_i686_centos.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export LC_ALL=C.UTF-8
99
export HOST=i686-pc-linux-gnu
1010
export CONTAINER_NAME=ci_i686_centos
1111
export CI_IMAGE_NAME_TAG="quay.io/centos/amd64:stream9"
12-
export CI_BASE_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache make git python3 python3-pip which patch lbzip2 xz procps-ng dash rsync coreutils bison util-linux e2fsprogs cmake"
12+
export CI_BASE_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache make git python3 python3-pip which patch lbzip2 xz procps-ng dash rsync coreutils bison e2fsprogs cmake"
1313
export PIP_PACKAGES="pyzmq"
1414
export GOAL="install"
1515
export NO_WERROR=1 # Suppress error: #warning _FORTIFY_SOURCE > 2 is treated like 2 on this platform [-Werror=cpp]
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) The Bitcoin Core developers
4+
# Distributed under the MIT software license, see the accompanying
5+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
6+
7+
export LC_ALL=C.UTF-8
8+
9+
export CMAKE_GENERATOR="Ninja"
10+
export BITCOIN_CONFIG="-DBUILD_FOR_FUZZING=ON"
11+
export CI_OS_NAME="macos"
12+
export NO_DEPENDS=1
13+
export OSX_SDK=""
14+
export RUN_UNIT_TESTS=false
15+
export RUN_FUNCTIONAL_TESTS=false
16+
export RUN_FUZZ_TESTS=true

depend/bitcoin/ci/test/00_setup_env_win64.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ export CI_IMAGE_NAME_TAG="docker.io/amd64/debian:bookworm" # Check that https:/
1111
export HOST=x86_64-w64-mingw32
1212
export DPKG_ADD_ARCH="i386"
1313
export PACKAGES="nsis g++-mingw-w64-x86-64-posix wine-binfmt wine64 wine32 file"
14+
# Install wine, but do not run unit tests, as they surface frequent
15+
# false-positives.
16+
export RUN_UNIT_TESTS=${RUN_UNIT_TESTS:-false}
1417
export RUN_FUNCTIONAL_TESTS=false
1518
export GOAL="deploy"
1619
# Prior to 11.0.0, the mingw-w64 headers were missing noreturn attributes, causing warnings when

depend/bitcoin/contrib/devtools/gen-manpages.py

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import subprocess
77
import sys
88
import tempfile
9+
import argparse
910

1011
BINARIES = [
1112
'src/bitcoind',
@@ -16,6 +17,18 @@
1617
'src/qt/bitcoin-qt',
1718
]
1819

20+
parser = argparse.ArgumentParser(
21+
formatter_class=argparse.RawDescriptionHelpFormatter,
22+
)
23+
parser.add_argument(
24+
"-s",
25+
"--skip-missing-binaries",
26+
action="store_true",
27+
default=False,
28+
help="skip generation for binaries that are not found in the build path",
29+
)
30+
args = parser.parse_args()
31+
1932
# Paths to external utilities.
2033
git = os.getenv('GIT', 'git')
2134
help2man = os.getenv('HELP2MAN', 'help2man')
@@ -38,8 +51,12 @@
3851
try:
3952
r = subprocess.run([abspath, "--version"], stdout=subprocess.PIPE, check=True, text=True)
4053
except IOError:
41-
print(f'{abspath} not found or not an executable', file=sys.stderr)
42-
sys.exit(1)
54+
if(args.skip_missing_binaries):
55+
print(f'{abspath} not found or not an executable. Skipping...', file=sys.stderr)
56+
continue
57+
else:
58+
print(f'{abspath} not found or not an executable', file=sys.stderr)
59+
sys.exit(1)
4360
# take first line (which must contain version)
4461
verstr = r.stdout.splitlines()[0]
4562
# last word of line is the actual version e.g. v22.99.0-5c6b3d5b3508
@@ -51,6 +68,10 @@
5168

5269
versions.append((abspath, verstr, copyright))
5370

71+
if not versions:
72+
print(f'No binaries found in {builddir}. Please ensure the binaries are present in {builddir}, or set another build path using the BUILDDIR env variable.')
73+
sys.exit(1)
74+
5475
if any(verstr.endswith('-dirty') for (_, verstr, _) in versions):
5576
print("WARNING: Binaries were built from a dirty tree.")
5677
print('man pages generated from dirty binaries should NOT be committed.')

depend/bitcoin/contrib/devtools/symbol-check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def check_PE_libraries(binary) -> bool:
260260
def check_PE_subsystem_version(binary) -> bool:
261261
major: int = binary.optional_header.major_subsystem_version
262262
minor: int = binary.optional_header.minor_subsystem_version
263-
if major == 6 and minor == 1:
263+
if major == 6 and minor == 2:
264264
return True
265265
return False
266266

depend/bitcoin/contrib/devtools/test-symbol-check.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def test_PE(self):
135135
}
136136
''')
137137

138-
self.assertEqual(call_symbol_check(cxx, source, executable, ['-lpdh', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,1']),
138+
self.assertEqual(call_symbol_check(cxx, source, executable, ['-lpdh', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,2']),
139139
(1, 'pdh.dll is not in ALLOWED_LIBRARIES!\n' +
140140
executable + ': failed DYNAMIC_LIBRARIES'))
141141

@@ -166,7 +166,7 @@ def test_PE(self):
166166
}
167167
''')
168168

169-
self.assertEqual(call_symbol_check(cxx, source, executable, ['-lole32', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,1']),
169+
self.assertEqual(call_symbol_check(cxx, source, executable, ['-lole32', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,2']),
170170
(0, ''))
171171

172172

0 commit comments

Comments
 (0)