Skip to content

Commit 6610d74

Browse files
committed
Merge branch 'auxpow'
2 parents 9b8832d + 8da12f1 commit 6610d74

Some content is hidden

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

62 files changed

+527
-521
lines changed

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@
99
# - CMake 3.26.5, https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/
1010
cmake_minimum_required(VERSION 3.22)
1111

12-
if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
12+
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
1313
message(FATAL_ERROR "In-source builds are not allowed.")
1414
endif()
1515

16+
if(POLICY CMP0171)
17+
# `codegen` is a reserved target name.
18+
# See: https://cmake.org/cmake/help/latest/policy/CMP0171.html
19+
cmake_policy(SET CMP0171 NEW)
20+
endif()
21+
1622
#=============================
1723
# Project / Package metadata
1824
#=============================

ci/test/00_setup_env_native_fuzz_with_msan.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export CONTAINER_NAME="ci_native_fuzz_msan"
1616
export PACKAGES="ninja-build"
1717
# BDB generates false-positives and will be removed in future
1818
export DEP_OPTS="DEBUG=1 NO_BDB=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
19-
export GOAL="install"
19+
export GOAL="all"
2020
# Setting CMAKE_{C,CXX}_FLAGS_DEBUG flags to an empty string ensures that the flags set in MSAN_FLAGS remain unaltered.
2121
# _FORTIFY_SOURCE is not compatible with MSAN.
2222
export BITCOIN_CONFIG="\

ci/test/00_setup_env_native_fuzz_with_valgrind.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export RUN_UNIT_TESTS=false
1414
export RUN_FUNCTIONAL_TESTS=false
1515
export RUN_FUZZ_TESTS=true
1616
export FUZZ_TESTS_CONFIG="--valgrind"
17-
export GOAL="install"
17+
export GOAL="all"
1818
export BITCOIN_CONFIG="\
1919
-DBUILD_FOR_FUZZING=ON \
2020
-DSANITIZERS=fuzzer \

ci/test/01_base_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if [ -n "$PIP_PACKAGES" ]; then
4949
fi
5050

5151
if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then
52-
${CI_RETRY_EXE} git clone --depth=1 https://github.com/llvm/llvm-project -b "llvmorg-20.1.0-rc1" /msan/llvm-project
52+
${CI_RETRY_EXE} git clone --depth=1 https://github.com/llvm/llvm-project -b "llvmorg-20.1.0" /msan/llvm-project
5353

5454
cmake -G Ninja -B /msan/clang_build/ \
5555
-DLLVM_ENABLE_PROJECTS="clang" \

cmake/ccache.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ if(NOT MSVC)
2323
else()
2424
set(WITH_CCACHE OFF)
2525
endif()
26+
else()
27+
set(WITH_CCACHE OFF)
2628
endif()
2729

2830
mark_as_advanced(CCACHE_EXECUTABLE)

cmake/module/GenerateHeaders.cmake

Lines changed: 0 additions & 29 deletions
This file was deleted.

cmake/module/TargetDataSources.cmake

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Copyright (c) 2023-present The Bitcoin Core developers
2+
# Distributed under the MIT software license, see the accompanying
3+
# file COPYING or https://opensource.org/license/mit/.
4+
5+
macro(set_add_custom_command_options)
6+
set(DEPENDS_EXPLICIT_OPT "")
7+
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.27)
8+
set(DEPENDS_EXPLICIT_OPT DEPENDS_EXPLICIT_ONLY)
9+
endif()
10+
set(CODEGEN_OPT "")
11+
if(POLICY CMP0171)
12+
cmake_policy(GET CMP0171 _cmp0171_status)
13+
if(_cmp0171_status STREQUAL "NEW")
14+
set(CODEGEN_OPT CODEGEN)
15+
endif()
16+
unset(_cmp0171_status)
17+
endif()
18+
endmacro()
19+
20+
# Specifies JSON data files to be processed into corresponding
21+
# header files for inclusion when building a target.
22+
function(target_json_data_sources target)
23+
set_add_custom_command_options()
24+
foreach(json_file IN LISTS ARGN)
25+
set(header ${CMAKE_CURRENT_BINARY_DIR}/${json_file}.h)
26+
add_custom_command(
27+
OUTPUT ${header}
28+
COMMAND ${CMAKE_COMMAND} -DJSON_SOURCE_PATH=${CMAKE_CURRENT_SOURCE_DIR}/${json_file} -DHEADER_PATH=${header} -P ${PROJECT_SOURCE_DIR}/cmake/script/GenerateHeaderFromJson.cmake
29+
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${json_file} ${PROJECT_SOURCE_DIR}/cmake/script/GenerateHeaderFromJson.cmake
30+
VERBATIM
31+
${CODEGEN_OPT}
32+
${DEPENDS_EXPLICIT_OPT}
33+
)
34+
target_sources(${target} PRIVATE ${header})
35+
endforeach()
36+
endfunction()
37+
38+
# Specifies raw binary data files to be processed into corresponding
39+
# header files for inclusion when building a target.
40+
function(target_raw_data_sources target)
41+
cmake_parse_arguments(PARSE_ARGV 1 _ "" "NAMESPACE" "")
42+
set_add_custom_command_options()
43+
foreach(raw_file IN LISTS __UNPARSED_ARGUMENTS)
44+
set(header ${CMAKE_CURRENT_BINARY_DIR}/${raw_file}.h)
45+
add_custom_command(
46+
OUTPUT ${header}
47+
COMMAND ${CMAKE_COMMAND} -DRAW_SOURCE_PATH=${CMAKE_CURRENT_SOURCE_DIR}/${raw_file} -DHEADER_PATH=${header} -DRAW_NAMESPACE=${__NAMESPACE} -P ${PROJECT_SOURCE_DIR}/cmake/script/GenerateHeaderFromRaw.cmake
48+
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${raw_file} ${PROJECT_SOURCE_DIR}/cmake/script/GenerateHeaderFromRaw.cmake
49+
VERBATIM
50+
${CODEGEN_OPT}
51+
${DEPENDS_EXPLICIT_OPT}
52+
)
53+
target_sources(${target} PRIVATE ${header})
54+
endforeach()
55+
endfunction()

contrib/devtools/headerssync-params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
# Parameters:
1313

1414
# Aim for still working fine at some point in the future. [datetime]
15-
TIME = datetime(2027, 4, 1)
15+
TIME = datetime(2027, 10, 6)
1616

1717
# Expected block interval. [timedelta]
1818
BLOCK_INTERVAL = timedelta(seconds=600)
1919

2020
# The number of headers corresponding to the minchainwork parameter. [headers]
21-
MINCHAINWORK_HEADERS = 856760
21+
MINCHAINWORK_HEADERS = 886157
2222

2323
# Combined processing bandwidth from all attackers to one victim. [bit/s]
2424
# 6 Gbit/s is approximately the speed at which a single thread of a Ryzen 5950X CPU thread can hash

contrib/guix/INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ Alternately, see `guix package --search-paths -p "$HOME/.guix-profile"'.
456456

457457
However, this is somewhat tedious to do for both `guix pull` and `guix install`
458458
for each user on the system that wants to properly use `guix`. I recommend that
459-
you instead add an entry to `/etc/profile.d` instead. This is done by default
459+
you add an entry to `/etc/profile.d` instead. This is done by default
460460
when installing the Debian package later than 1.2.0-4 and when using the shell
461461
script installer.
462462

contrib/guix/guix-codesign

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ fi
137137

138138

139139
################
140-
# Unsigned tarballs SHOULD exist
140+
# Codesigning tarballs SHOULD exist
141141
################
142142

143143
# Usage: outdir_for_host HOST SUFFIX
@@ -149,13 +149,13 @@ outdir_for_host() {
149149
}
150150

151151

152-
unsigned_tarball_for_host() {
152+
codesigning_tarball_for_host() {
153153
case "$1" in
154154
*mingw*)
155-
echo "$(outdir_for_host "$1")/${DISTNAME}-win64-unsigned.tar.gz"
155+
echo "$(outdir_for_host "$1")/${DISTNAME}-win64-codesigning.tar.gz"
156156
;;
157157
*darwin*)
158-
echo "$(outdir_for_host "$1")/${DISTNAME}-${1}-unsigned.tar.gz"
158+
echo "$(outdir_for_host "$1")/${DISTNAME}-${1}-codesigning.tar.gz"
159159
;;
160160
*)
161161
exit 1
@@ -164,22 +164,22 @@ unsigned_tarball_for_host() {
164164
}
165165

166166
# Accumulate a list of build directories that already exist...
167-
hosts_unsigned_tarball_missing=""
167+
hosts_codesigning_tarball_missing=""
168168
for host in $HOSTS; do
169-
if [ ! -e "$(unsigned_tarball_for_host "$host")" ]; then
170-
hosts_unsigned_tarball_missing+=" ${host}"
169+
if [ ! -e "$(codesigning_tarball_for_host "$host")" ]; then
170+
hosts_codesigning_tarball_missing+=" ${host}"
171171
fi
172172
done
173173

174-
if [ -n "$hosts_unsigned_tarball_missing" ]; then
174+
if [ -n "$hosts_codesigning_tarball_missing" ]; then
175175
# ...so that we can print them out nicely in an error message
176176
cat << EOF
177-
ERR: Unsigned tarballs do not exist
177+
ERR: Codesigning tarballs do not exist
178178
...
179179
180180
EOF
181-
for host in $hosts_unsigned_tarball_missing; do
182-
echo " ${host} '$(unsigned_tarball_for_host "$host")'"
181+
for host in $hosts_codesigning_tarball_missing; do
182+
echo " ${host} '$(codesigning_tarball_for_host "$host")'"
183183
done
184184
exit 1
185185
fi
@@ -371,7 +371,7 @@ EOF
371371
OUTDIR="$(OUTDIR_BASE=/outdir-base && outdir_for_host "$HOST" codesigned)" \
372372
DIST_ARCHIVE_BASE=/outdir-base/dist-archive \
373373
DETACHED_SIGS_REPO=/detached-sigs \
374-
UNSIGNED_TARBALL="$(OUTDIR_BASE=/outdir-base && unsigned_tarball_for_host "$HOST")" \
374+
CODESIGNING_TARBALL="$(OUTDIR_BASE=/outdir-base && codesigning_tarball_for_host "$HOST")" \
375375
bash -c "cd /bitcoin && bash contrib/guix/libexec/codesign.sh"
376376
)
377377

0 commit comments

Comments
 (0)