Skip to content

Commit 62e8971

Browse files
committed
Merge commit 'f74b275ffc41d7119d771ee7c66c0771eb9dae80'
2 parents 10733b7 + f74b275 commit 62e8971

File tree

158 files changed

+2820
-985
lines changed

Some content is hidden

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

158 files changed

+2820
-985
lines changed

depend/bitcoin/.github/actions/configure-docker/action.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
name: 'Configure Docker'
22
description: 'Set up Docker build driver and configure build cache args'
33
inputs:
4-
use-cirrus:
5-
description: 'Use cirrus cache'
4+
cache-provider:
5+
description: 'gha or cirrus cache provider'
66
required: true
7+
options:
8+
- gh
9+
- cirrus
710
runs:
811
using: 'composite'
912
steps:
@@ -32,7 +35,7 @@ runs:
3235
# which are set automatically when running on GitHub infra: https://docs.docker.com/build/cache/backends/gha/#synopsis
3336
3437
# Use cirrus cache host
35-
if [[ ${{ inputs.use-cirrus }} == 'true' ]]; then
38+
if [[ ${{ inputs.cache-provider }} == 'cirrus' ]]; then
3639
url_args="url=${CIRRUS_CACHE_HOST},url_v2=${CIRRUS_CACHE_HOST}"
3740
else
3841
url_args=""

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

Lines changed: 58 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ jobs:
3333
name: 'determine runners'
3434
runs-on: ubuntu-latest
3535
outputs:
36-
use-cirrus-runners: ${{ steps.runners.outputs.use-cirrus-runners }}
36+
provider: ${{ steps.runners.outputs.provider }}
3737
steps:
3838
- id: runners
3939
run: |
4040
if [[ "${REPO_USE_CIRRUS_RUNNERS}" == "${{ github.repository }}" ]]; then
41-
echo "use-cirrus-runners=true" >> "$GITHUB_OUTPUT"
41+
echo "provider=cirrus" >> "$GITHUB_OUTPUT"
4242
echo "::notice title=Runner Selection::Using Cirrus Runners"
4343
else
44-
echo "use-cirrus-runners=false" >> "$GITHUB_OUTPUT"
44+
echo "provider=gha" >> "$GITHUB_OUTPUT"
4545
echo "::notice title=Runner Selection::Using GitHub-hosted runners"
4646
fi
4747
@@ -105,7 +105,7 @@ jobs:
105105
name: ${{ matrix.job-name }}
106106
# Use any image to support the xcode-select below, but hardcode version to avoid silent upgrades (and breaks).
107107
# See: https://github.com/actions/runner-images#available-images.
108-
runs-on: macos-14
108+
runs-on: macos-15
109109

110110
# When a contributor maintains a fork of the repo, any pull request they make
111111
# to their own fork, or to the main repository, will trigger two CI runs:
@@ -123,10 +123,10 @@ jobs:
123123
include:
124124
- job-type: standard
125125
file-env: './ci/test/00_setup_env_mac_native.sh'
126-
job-name: 'macOS 14 native, arm64, no depends, sqlite only, gui'
126+
job-name: 'macOS native, no depends, sqlite only, gui'
127127
- job-type: fuzz
128128
file-env: './ci/test/00_setup_env_mac_native_fuzz.sh'
129-
job-name: 'macOS 14 native, arm64, fuzz'
129+
job-name: 'macOS native, fuzz'
130130

131131
env:
132132
DANGER_RUN_CI_ON_HOST: 1
@@ -145,8 +145,8 @@ jobs:
145145
# Use the earliest Xcode supported by the version of macOS denoted in
146146
# doc/release-notes-empty-template.md and providing at least the
147147
# minimum clang version denoted in doc/dependencies.md.
148-
# See: https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes
149-
sudo xcode-select --switch /Applications/Xcode_15.0.app
148+
# See: https://developer.apple.com/documentation/xcode-release-notes/xcode-16-release-notes
149+
sudo xcode-select --switch /Applications/Xcode_16.0.app
150150
clang --version
151151
152152
- name: Install Homebrew packages
@@ -211,11 +211,16 @@ jobs:
211211
steps:
212212
- *CHECKOUT
213213

214-
- name: Configure Developer Command Prompt for Microsoft Visual C++
215-
# Using microsoft/setup-msbuild is not enough.
216-
uses: ilammy/msvc-dev-cmd@v1
217-
with:
218-
arch: x64
214+
- &SET_UP_VS
215+
name: Set up VS Developer Prompt
216+
shell: pwsh -Command "$PSVersionTable; $PSNativeCommandUseErrorActionPreference = $true; $ErrorActionPreference = 'Stop'; & '{0}'"
217+
run: |
218+
$vswherePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
219+
$installationPath = & $vswherePath -latest -property installationPath
220+
& "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=x64 -no_logo && set" | foreach-object {
221+
$name, $value = $_ -split '=', 2
222+
echo "$name=$value" >> $env:GITHUB_ENV
223+
}
219224
220225
- name: Get tool information
221226
shell: pwsh
@@ -263,14 +268,26 @@ jobs:
263268
run: |
264269
cmake --build . -j $NUMBER_OF_PROCESSORS --config Release
265270
266-
- name: Get bitcoind manifest
271+
- name: Check executable manifests
267272
if: matrix.job-type == 'standard'
268273
working-directory: build
274+
shell: pwsh -Command "$PSVersionTable; $PSNativeCommandUseErrorActionPreference = $true; $ErrorActionPreference = 'Stop'; & '{0}'"
269275
run: |
270-
mt.exe -nologo -inputresource:bin/Release/bitcoind.exe -out:bitcoind.manifest
271-
cat bitcoind.manifest
272-
echo
273-
mt.exe -nologo -inputresource:bin/Release/bitcoind.exe -validate_manifest
276+
mt.exe -nologo -inputresource:bin\Release\bitcoind.exe -out:bitcoind.manifest
277+
Get-Content bitcoind.manifest
278+
279+
Get-ChildItem -Filter "bin\Release\*.exe" | ForEach-Object {
280+
$exeName = $_.Name
281+
282+
# Skip as they currently do not have manifests
283+
if ($exeName -eq "fuzz.exe" -or $exeName -eq "bench_bitcoin.exe" -or $exeName -eq "test_bitcoin-qt.exe" -or $exeName -eq "test_kernel.exe" -or $exeName -eq "bitcoin-chainstate.exe") {
284+
Write-Host "Skipping $exeName (no manifest present)"
285+
return
286+
}
287+
288+
Write-Host "Checking $exeName"
289+
& mt.exe -nologo -inputresource:$_.FullName -validate_manifest
290+
}
274291
275292
- name: Run test suite
276293
if: matrix.job-type == 'standard'
@@ -313,7 +330,7 @@ jobs:
313330
windows-cross:
314331
name: 'Linux->Windows cross, no tests'
315332
needs: runners
316-
runs-on: ${{ needs.runners.outputs.use-cirrus-runners == 'true' && 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-sm' || 'ubuntu-24.04' }}
333+
runs-on: ${{ needs.runners.outputs.provider == 'cirrus' && 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-sm' || 'ubuntu-24.04' }}
317334
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
318335

319336
env:
@@ -333,7 +350,7 @@ jobs:
333350
- name: Configure Docker
334351
uses: ./.github/actions/configure-docker
335352
with:
336-
use-cirrus: ${{ needs.runners.outputs.use-cirrus-runners }}
353+
cache-provider: ${{ needs.runners.outputs.provider }}
337354

338355
- name: CI script
339356
run: ./ci/test_run_all.sh
@@ -371,19 +388,26 @@ jobs:
371388
- name: Run bitcoind.exe
372389
run: ./bin/bitcoind.exe -version
373390

374-
- name: Find mt.exe tool
375-
shell: pwsh
376-
run: |
377-
$sdk_dir = (Get-ItemProperty 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots' -Name KitsRoot10).KitsRoot10
378-
$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
379-
"MT_EXE=${sdk_dir}bin\${sdk_latest}\x64\mt.exe" >> $env:GITHUB_ENV
391+
- *SET_UP_VS
380392

381-
- name: Get bitcoind manifest
382-
shell: pwsh
393+
- name: Check executable manifests
394+
shell: pwsh -Command "$PSVersionTable; $PSNativeCommandUseErrorActionPreference = $true; $ErrorActionPreference = 'Stop'; & '{0}'"
383395
run: |
384-
& $env:MT_EXE -nologo -inputresource:bin\bitcoind.exe -out:bitcoind.manifest
396+
mt.exe -nologo -inputresource:bin\bitcoind.exe -out:bitcoind.manifest
385397
Get-Content bitcoind.manifest
386-
& $env:MT_EXE -nologo -inputresource:bin\bitcoind.exe -validate_manifest
398+
399+
Get-ChildItem -Filter "bin\*.exe" | ForEach-Object {
400+
$exeName = $_.Name
401+
402+
# Skip as they currently do not have manifests
403+
if ($exeName -eq "fuzz.exe" -or $exeName -eq "bench_bitcoin.exe" -or $exeName -eq "test_kernel.exe") {
404+
Write-Host "Skipping $exeName (no manifest present)"
405+
return
406+
}
407+
408+
Write-Host "Checking $exeName"
409+
& mt.exe -nologo -inputresource:$_.FullName -validate_manifest
410+
}
387411
388412
- name: Run unit tests
389413
# Can't use ctest here like other jobs as we don't have a CMake build tree.
@@ -423,7 +447,7 @@ jobs:
423447
ci-matrix:
424448
name: ${{ matrix.name }}
425449
needs: runners
426-
runs-on: ${{ needs.runners.outputs.use-cirrus-runners == 'true' && matrix.cirrus-runner || matrix.fallback-runner }}
450+
runs-on: ${{ needs.runners.outputs.provider == 'cirrus' && matrix.cirrus-runner || matrix.fallback-runner }}
427451
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
428452
timeout-minutes: ${{ matrix.timeout-minutes }}
429453

@@ -440,6 +464,7 @@ jobs:
440464
fallback-runner: 'ubuntu-24.04-arm'
441465
timeout-minutes: 120
442466
file-env: './ci/test/00_setup_env_arm.sh'
467+
provider: 'gha'
443468

444469
- name: 'ASan + LSan + UBSan + integer, no depends, USDT'
445470
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md' # has to match container in ci/test/00_setup_env_native_asan.sh for tracing tools
@@ -514,7 +539,7 @@ jobs:
514539
- name: Configure Docker
515540
uses: ./.github/actions/configure-docker
516541
with:
517-
use-cirrus: ${{ needs.runners.outputs.use-cirrus-runners }}
542+
cache-provider: ${{ matrix.provider || needs.runners.outputs.provider }}
518543

519544
- name: Enable bpfcc script
520545
if: ${{ env.CONTAINER_NAME == 'ci_native_asan' }}
@@ -551,7 +576,7 @@ jobs:
551576
- name: Configure Docker
552577
uses: ./.github/actions/configure-docker
553578
with:
554-
use-cirrus: ${{ needs.runners.outputs.use-cirrus-runners }}
579+
cache-provider: ${{ needs.runners.outputs.provider }}
555580

556581
- name: CI script
557582
run: |

depend/bitcoin/ci/lint/01_install.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ python3 --version
4141
${CI_RETRY_EXE} pip3 install \
4242
codespell==2.4.1 \
4343
lief==0.16.6 \
44-
mypy==1.4.1 \
45-
pyzmq==25.1.0 \
46-
ruff==0.5.5 \
47-
vulture==2.6
44+
mypy==1.18.2 \
45+
pyzmq==27.1.0 \
46+
ruff==0.13.2 \
47+
vulture==2.14
4848

4949
SHELLCHECK_VERSION=v0.11.0
5050
curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | \

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@
77
export LC_ALL=C.UTF-8
88

99
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
10+
export APT_LLVM_V="21"
1011
LIBCXX_DIR="/cxx_build/"
1112
export MSAN_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer -g -O1 -fno-optimize-sibling-calls"
12-
LIBCXX_FLAGS="-nostdinc++ -nostdlib++ -isystem ${LIBCXX_DIR}include/c++/v1 -L${LIBCXX_DIR}lib -Wl,-rpath,${LIBCXX_DIR}lib -lc++ -lc++abi -lpthread -Wno-unused-command-line-argument"
13+
# -lstdc++ to resolve link issues due to upstream packaging
14+
LIBCXX_FLAGS="-nostdinc++ -nostdlib++ -isystem ${LIBCXX_DIR}include/c++/v1 -L${LIBCXX_DIR}lib -Wl,-rpath,${LIBCXX_DIR}lib -lc++ -lc++abi -lpthread -Wno-unused-command-line-argument -lstdc++"
1315
export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}"
1416

1517
export CONTAINER_NAME="ci_native_fuzz_msan"
18+
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} llvm-${APT_LLVM_V}-dev libclang-${APT_LLVM_V}-dev libclang-rt-${APT_LLVM_V}-dev"
1619
export DEP_OPTS="DEBUG=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
1720
export GOAL="all"
1821
# Setting CMAKE_{C,CXX}_FLAGS_DEBUG flags to an empty string ensures that the flags set in MSAN_FLAGS remain unaltered.

depend/bitcoin/ci/test/01_base_install.sh

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -58,23 +58,6 @@ fi
5858
if [[ -n "${USE_INSTRUMENTED_LIBCPP}" ]]; then
5959
${CI_RETRY_EXE} git clone --depth=1 https://github.com/llvm/llvm-project -b "llvmorg-21.1.1" /llvm-project
6060

61-
if [ -n "${APT_LLVM_V}" ]; then
62-
63-
cmake -G Ninja -B /clang_build/ \
64-
-DLLVM_ENABLE_PROJECTS="clang" \
65-
-DCMAKE_BUILD_TYPE=Release \
66-
-DLLVM_TARGETS_TO_BUILD=Native \
67-
-DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" \
68-
-S /llvm-project/llvm
69-
70-
ninja -C /clang_build/ "$MAKEJOBS"
71-
ninja -C /clang_build/ install-runtimes
72-
73-
update-alternatives --install /usr/bin/clang++ clang++ /clang_build/bin/clang++ 100
74-
update-alternatives --install /usr/bin/clang clang /clang_build/bin/clang 100
75-
update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /clang_build/bin/llvm-symbolizer 100
76-
fi
77-
7861
cmake -G Ninja -B /cxx_build/ \
7962
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
8063
-DCMAKE_BUILD_TYPE=Release \

depend/bitcoin/ci/test/03_test_script.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ if [[ "${RUN_TIDY}" == "true" ]]; then
130130
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
131131
fi
132132

133-
bash -c "cmake -S $BASE_ROOT_DIR -B ${BASE_BUILD_DIR} $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || (
133+
eval "CMAKE_ARGS=($BITCOIN_CONFIG_ALL $BITCOIN_CONFIG)"
134+
cmake -S "$BASE_ROOT_DIR" -B "$BASE_BUILD_DIR" "${CMAKE_ARGS[@]}" || (
134135
cd "${BASE_BUILD_DIR}"
135136
# shellcheck disable=SC2046
136137
cat $(cmake -P "${BASE_ROOT_DIR}/ci/test/GetCMakeLogFiles.cmake")

depend/bitcoin/cmake/module/Maintenance.cmake

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,24 +96,24 @@ function(add_macos_deploy_target)
9696
VERBATIM
9797
)
9898

99-
string(REPLACE " " "-" osx_volname ${CLIENT_NAME})
99+
set(macos_zip "bitcoin-macos-app")
100100
if(CMAKE_HOST_APPLE)
101101
add_custom_command(
102-
OUTPUT ${PROJECT_BINARY_DIR}/${osx_volname}.zip
103-
COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} ${osx_volname} -translations-dir=${QT_TRANSLATIONS_DIR} -zip
102+
OUTPUT ${PROJECT_BINARY_DIR}/${macos_zip}.zip
103+
COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} -translations-dir=${QT_TRANSLATIONS_DIR} -zip=${macos_zip}
104104
DEPENDS ${PROJECT_BINARY_DIR}/${macos_app}/Contents/MacOS/Bitcoin-Qt
105105
VERBATIM
106106
)
107107
add_custom_target(deploydir
108-
DEPENDS ${PROJECT_BINARY_DIR}/${osx_volname}.zip
108+
DEPENDS ${PROJECT_BINARY_DIR}/${macos_zip}.zip
109109
)
110110
add_custom_target(deploy
111-
DEPENDS ${PROJECT_BINARY_DIR}/${osx_volname}.zip
111+
DEPENDS ${PROJECT_BINARY_DIR}/${macos_zip}.zip
112112
)
113113
else()
114114
add_custom_command(
115115
OUTPUT ${PROJECT_BINARY_DIR}/dist/${macos_app}/Contents/MacOS/Bitcoin-Qt
116-
COMMAND ${CMAKE_COMMAND} -E env OBJDUMP=${CMAKE_OBJDUMP} $<TARGET_FILE:Python3::Interpreter> ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} ${osx_volname} -translations-dir=${QT_TRANSLATIONS_DIR}
116+
COMMAND ${CMAKE_COMMAND} -E env OBJDUMP=${CMAKE_OBJDUMP} $<TARGET_FILE:Python3::Interpreter> ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} -translations-dir=${QT_TRANSLATIONS_DIR}
117117
DEPENDS ${PROJECT_BINARY_DIR}/${macos_app}/Contents/MacOS/Bitcoin-Qt
118118
VERBATIM
119119
)
@@ -128,13 +128,13 @@ function(add_macos_deploy_target)
128128
)
129129
else()
130130
add_custom_command(
131-
OUTPUT ${PROJECT_BINARY_DIR}/dist/${osx_volname}.zip
131+
OUTPUT ${PROJECT_BINARY_DIR}/dist/${macos_zip}.zip
132132
WORKING_DIRECTORY dist
133-
COMMAND ${PROJECT_SOURCE_DIR}/cmake/script/macos_zip.sh ${ZIP_EXECUTABLE} ${osx_volname}.zip
133+
COMMAND ${PROJECT_SOURCE_DIR}/cmake/script/macos_zip.sh ${ZIP_EXECUTABLE} ${macos_zip}.zip
134134
VERBATIM
135135
)
136136
add_custom_target(deploy
137-
DEPENDS ${PROJECT_BINARY_DIR}/dist/${osx_volname}.zip
137+
DEPENDS ${PROJECT_BINARY_DIR}/dist/${macos_zip}.zip
138138
)
139139
endif()
140140
endif()

depend/bitcoin/cmake/secp256k1.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# Distributed under the MIT software license, see the accompanying
33
# file COPYING or https://opensource.org/license/mit/.
44

5+
enable_language(C)
6+
57
function(add_secp256k1 subdir)
68
message("")
79
message("Configuring secp256k1 subtree...")
@@ -30,7 +32,6 @@ function(add_secp256k1 subdir)
3032
string(STRIP "${SECP256K1_APPEND_LDFLAGS} ${APPEND_LDFLAGS}" SECP256K1_APPEND_LDFLAGS)
3133
set(SECP256K1_APPEND_LDFLAGS ${SECP256K1_APPEND_LDFLAGS} CACHE STRING "" FORCE)
3234
# We want to build libsecp256k1 with the most tested RelWithDebInfo configuration.
33-
enable_language(C)
3435
foreach(config IN LISTS CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES)
3536
if(config STREQUAL "")
3637
continue()

depend/bitcoin/contrib/guix/libexec/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ mkdir -p "$DISTSRC"
369369
;;
370370
*darwin*)
371371
cmake --build build --target deploy ${V:+--verbose}
372-
mv build/dist/Bitcoin-Core.zip "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.zip"
372+
mv build/dist/bitcoin-macos-app.zip "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.zip"
373373
mkdir -p "unsigned-app-${HOST}"
374374
cp --target-directory="unsigned-app-${HOST}" \
375375
contrib/macdeploy/detached-sig-create.sh

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@
112112
'libfontconfig.so.1', # font support
113113
'libfreetype.so.6', # font parsing
114114
'libdl.so.2', # programming interface to dynamic linker
115-
'libxcb-cursor.so.0',
116115
'libxcb-icccm.so.4',
117116
'libxcb-image.so.0',
118117
'libxcb-shm.so.0',
@@ -249,7 +248,7 @@ def check_MACHO_libraries(binary) -> bool:
249248
return ok
250249

251250
def check_MACHO_min_os(binary) -> bool:
252-
if binary.build_version.minos == [13,0,0]:
251+
if binary.build_version.minos == [14,0,0]:
253252
return True
254253
return False
255254

0 commit comments

Comments
 (0)