Skip to content

Commit 50d4368

Browse files
committed
Squashed 'libbitcoinkernel-sys/bitcoin/' changes from 5991a69ee00..29f05b91cf8
29f05b91cf8 kernel: Add pure kernel bitcoin-chainstate b7733085a90 kernel: Add functions to get the block hash from a block a4f79616064 kernel: Add block index utility functions to C header 0a0062b85a7 kernel: Add function to read block undo data from disk to C header e49808a42d3 kernel: Add functions to read block from disk to C header 2f54bd53745 kernel: Add function for copying block data to C header c34ecbefbd8 kernel: Add functions for the block validation state to C header 0b46337ebe3 kernel: Add validation interface to C header 4c7a81a030e kernel: Add interrupt function to C header edf1d56fc05 kernel: Add import blocks function to C header 894b9c20447 kernel: Add chainstate load options for in-memory dbs in C header 157de0eccd3 kernel: Add options for reindexing in C header bdff17958b1 kernel: Add block validation to C header c52ca9447fc kernel: Add chainstate loading when instantiating a ChainstateManager 031a96dc6b7 kernel: Add chainstate manager option for setting worker threads c2f03a11251 kernel: Add chainstate manager object to C header 18ec1cc195b kernel: Add notifications context option to C header e3b03745f93 kernel: Add chain params context option to C header ef426234c07 kernel: Add kernel library context object 2c5e6b55922 kernel: Add logging to kernel library C header 20f1f67de07 kernel: Introduce initial kernel C header API 998386d4462 Merge bitcoin/bitcoin#31866: test, refactor: Add TestNode.binaries to hold binary paths aa87e0b4460 Merge bitcoin/bitcoin#31519: refactor: Use std::span over Span ef525e8b7c1 Merge bitcoin/bitcoin#31457: fuzz: Speed up *_package_eval fuzz targets a bit 7d76c9725ca Merge bitcoin/bitcoin#31766: leveldb: pull upstream C++23 changes 780bcf80b5d Merge bitcoin/bitcoin#32091: test: replace assert with assert_equal and assert_greater_than e568c1dd134 Merge bitcoin/bitcoin#32088: test: switch wallet_crosschain.py to signet and drop testnet4 e8f6a48e310 Merge bitcoin/bitcoin#32057: test: avoid disk space warning for non-regtest 387385ba1ed test: replace assert with assert_equal and assert_greater_than d190f0facc8 test, contrib: Fix signer/miner command line escaping 223fc24c4eb Merge bitcoin/bitcoin#31603: descriptor: check whitespace in keys within fragments 0d2eefca8bf test, refactor: Add TestNode.binaries to hold binary paths d61a847af0b Merge bitcoin/bitcoin#32019: cmake: Check for `makensis` and `zip` tools before using them for optional `deploy` targets cec14ee47d7 test: switch wallet_crosschain.py to signet 9c2951541c2 test: drop testnet4 from wallet_crosschain.py 14fec6380dd Merge bitcoin/bitcoin#32059: test: Update coverage.cpp to drop linux restriction ece0b41da6d Merge bitcoin/bitcoin#32087: ci: Drop ENABLE_HARDENING=OFF from clang-tidy c9b633d1190 Merge bitcoin/bitcoin#31948: ci: [lint] Use Cirrus dockerfile cache 6245c235046 Merge bitcoin/bitcoin#32083: doc: shallow clone `qa-assets` 257fd27e4bb Merge bitcoin/bitcoin#32033: test: Check datadir cleanup after assumeutxo was successful 6f9f415a4fa doc: shallow clone qa-assets db2c57ae9ee Merge bitcoin-core/gui#858: qt: doc: adapt outdated binary paths to CMake changes c8fab356171 ci: remove -Wno-error=deprecated-declarations from ASAN 24fd0235e45 Update leveldb subtree to latest upstream a130bbd154d Squashed 'src/leveldb/' changes from 04b5790928..4188247086 a799415d84d Merge bitcoin/bitcoin#31904: refactor: modernize outdated trait patterns using helper aliases (C++14/C++17) 5f4422d68dc Merge bitcoin/bitcoin#32010: qa: Fix TxIndex race conditions 52482cb2440 test: Check datadir cleanup after assumeutxo was successful 7ebc458a8cb qt: doc: adapt outdated binary paths to CMake changes cd8089c20ba Merge bitcoin/bitcoin#32069: test: fix intermittent failure in wallet_reorgsrestore.py 70a0ee89c67 Merge bitcoin/bitcoin#32063: test: fix intermittent failure in p2p_orphan_handling.py 54e6eacc1fc test: Enable ResetCoverageCounters beyond Linux 83a9e55ae16 Merge bitcoin/bitcoin#32070: build: use make < 3.82 syntax for define directive ca05b28710a Merge bitcoin/bitcoin#31859: test: Rename send_message to send_without_ping ab2df1726ed Merge bitcoin/bitcoin#31917: fuzz: provide more realistic values to the base58(check) decoders 51a20e56c2f Merge bitcoin/bitcoin#31977: test: Use rpc_deprecated only for testing deprecation fac3d93c2ba fuzz: Speed up *_package_eval fuzz targets a bit fa40fd043ab fuzz: [refactor] Avoid confusing c-style cast 20fe41e9e83 test: avoid disk space warning for non-regtest 2819c514825 test: Use rpc_deprecated only for testing deprecation 7d34c19853e ci: Drop ENABLE_HARDENING=OFF from clang-tidy 9157d9e4498 build: use make < 3.82 syntax for define directive 36b0713edc4 test: fix intermittent failure in wallet_reorgsrestore.py fa9cf38ab66 scripted-diff: test: Rename send_message to send_without_ping fa4356717d6 test: Prefer send_and_ping over send_message+sync_with_ping 02942056fd8 test: fix intermittent failure in p2p_orphan_handling.py 1f9b2e150ce cmake: Require `zip` only for `deploy` target 0aeff299513 cmake: Check for `makensis` tool before using it fa3b4427158 ci: Use Cirrus dockerfile cache ffff4a293ad bench: Update span-serialize comment fa4d6ec97bc refactor: Avoid false-positive gcc warning fa942332b40 scripted-diff: Bump copyright headers after std::span changes fa0c6b7179c refactor: Remove unused Span alias fade0b5e5e6 scripted-diff: Use std::span over Span fadccc26c03 refactor: Make Span an alias of std::span fa27e36717e test: Fix broken span_tests fadf02ef8bf refactor: Return std::span from MakeUCharSpan fa720b94be1 refactor: Return std::span from MakeByteSpan 3301d2cbe8c qa: Wait for txindex to avoid race condition 9bfb0d75ba1 qa: Remove unnecessary -txindex args 7ac281c19cd qa: Add missing coverage of corrupt indexes d5537c18a90 fuzz: make sure DecodeBase58(Check) is called with valid values more often bad1433ef2b fuzz: Always restrict base conversion input lengths 21e9d39a372 docs: add release notes for 31603 a8b548d75d9 test: `getdescriptorinfo`/`importdescriptors` with whitespace in pubkeys c7afca3d62c test: descriptor: check whitespace into keys cb722a3cea1 descriptor: check whitespace in ParsePubkeyInner 4cd95a29218 refactor: modernize remaining outdated trait patterns ab2b67fce20 scripted-diff: modernize outdated trait patterns - values 8327889f358 scripted-diff: modernize outdated trait patterns - types 50856695ef6 test: fix descriptors in `ismine_tests` REVERT: 5991a69ee00 kernel: Add pure kernel bitcoin-chainstate REVERT: 05b7d136684 kernel: Add functions to get the block hash from a block REVERT: f18c792d843 kernel: Add block index utility functions to C header REVERT: 89f5bf04673 kernel: Add function to read block undo data from disk to C header REVERT: b4f71fc64e7 kernel: Add functions to read block from disk to C header REVERT: 41306f081ad kernel: Add function for copying block data to C header REVERT: 9385d9fc87e kernel: Add functions for the block validation state to C header REVERT: 0bd9a710358 kernel: Add validation interface to C header REVERT: 432710f3fc3 kernel: Add interrupt function to C header REVERT: cb164ae1eb2 kernel: Add import blocks function to C header REVERT: abd67fd93d0 kernel: Add chainstate load options for in-memory dbs in C header REVERT: b98c2748e94 kernel: Add options for reindexing in C header REVERT: 9d0efe1fc86 kernel: Add block validation to C header REVERT: 87e364fc1ec kernel: Add chainstate loading when instantiating a ChainstateManager REVERT: df1599b2d2a kernel: Add chainstate manager option for setting worker threads REVERT: fb767002e97 kernel: Add chainstate manager object to C header REVERT: 10b0fad2fd3 kernel: Add notifications context option to C header REVERT: 39e7ad8d0dc kernel: Add chain params context option to C header REVERT: 6285c353b89 kernel: Add kernel library context object REVERT: 98d10160b6a kernel: Add logging to kernel library C header REVERT: 4d663446de1 kernel: Introduce initial kernel C header API git-subtree-dir: libbitcoinkernel-sys/bitcoin git-subtree-split: 29f05b91cf8a479e403b0322afeb5ff1133da221
1 parent 2cab7a0 commit 50d4368

File tree

216 files changed

+1323
-1346
lines changed

Some content is hidden

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

216 files changed

+1323
-1346
lines changed

.cirrus.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,15 @@ task:
9696
name: 'lint'
9797
<< : *BASE_TEMPLATE
9898
container:
99-
image: debian:bookworm
99+
dockerfile: ci/lint_imagefile
100100
cpu: 1
101101
memory: 1G
102102
# For faster CI feedback, immediately schedule the linters
103103
<< : *CREDITS_TEMPLATE
104-
test_runner_cache:
105-
folder: "/lint_test_runner"
106-
fingerprint_script: echo $CIRRUS_TASK_NAME $(git rev-parse HEAD:test/lint/test_runner)
107-
python_cache:
108-
folder: "/python_build"
109-
fingerprint_script: cat .python-version /etc/os-release
110104
unshallow_script:
111105
- git fetch --unshallow --no-tags
112106
lint_script:
113-
- ./ci/lint_run_all.sh
107+
- ./ci/lint_run.sh
114108

115109
task:
116110
name: 'tidy'

ci/lint_run.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
set -o errexit -o pipefail -o xtrace
9+
10+
# Only used in .cirrus.yml. Refer to test/lint/README.md on how to run locally.
11+
export PATH="/python_build/bin:${PATH}"
12+
export LINT_RUNNER_PATH="/lint_test_runner"
13+
./ci/lint/06_script.sh

ci/lint_run_all.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
export LC_ALL=C.UTF-8
88

9-
# Only used in .cirrus.yml. Refer to test/lint/README.md on how to run locally.
9+
# Only used in .cirrus.yml for stale re-runs of old pull request tasks. This
10+
# file can be removed in September 2025.
1011

1112
cp "./ci/retry/retry" "/ci_retry"
1213
cp "./.python-version" "/.python-version"

ci/test/00_setup_env_native_asan.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export BITCOIN_CONFIG="\
2929
-DCMAKE_C_COMPILER=clang-${APT_LLVM_V} \
3030
-DCMAKE_CXX_COMPILER=clang++-${APT_LLVM_V} \
3131
-DCMAKE_C_FLAGS='-ftrivial-auto-var-init=pattern' \
32-
-DCMAKE_CXX_FLAGS='-ftrivial-auto-var-init=pattern -Wno-error=deprecated-declarations' \
32+
-DCMAKE_CXX_FLAGS='-ftrivial-auto-var-init=pattern' \
3333
-DAPPEND_CXXFLAGS='-std=c++23' \
3434
-DAPPEND_CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' \
3535
"

ci/test/00_setup_env_native_tidy.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export RUN_TIDY=true
2020
export GOAL="install"
2121
export BITCOIN_CONFIG="\
2222
-DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DWITH_USDT=ON -DWITH_BDB=ON -DWARN_INCOMPATIBLE_BDB=OFF \
23-
-DENABLE_HARDENING=OFF \
2423
-DCMAKE_C_COMPILER=clang-${TIDY_LLVM_V} \
2524
-DCMAKE_CXX_COMPILER=clang++-${TIDY_LLVM_V} \
2625
-DCMAKE_C_FLAGS_RELWITHDEBINFO='-O0 -g0' \

cmake/module/Maintenance.cmake

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ endfunction()
4444

4545
function(add_windows_deploy_target)
4646
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)
47+
find_program(MAKENSIS_EXECUTABLE makensis)
48+
if(NOT MAKENSIS_EXECUTABLE)
49+
add_custom_target(deploy
50+
COMMAND ${CMAKE_COMMAND} -E echo "Error: NSIS not found"
51+
)
52+
return()
53+
endif()
54+
4755
# TODO: Consider replacing this code with the CPack NSIS Generator.
4856
# See https://cmake.org/cmake/help/latest/cpack_gen/nsis.html
4957
include(GenerateSetupNsi)
@@ -58,7 +66,7 @@ function(add_windows_deploy_target)
5866
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-wallet> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-wallet>
5967
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-util> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-util>
6068
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:test_bitcoin> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:test_bitcoin>
61-
COMMAND makensis -V2 ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.nsi
69+
COMMAND ${MAKENSIS_EXECUTABLE} -V2 ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.nsi
6270
VERBATIM
6371
)
6472
add_custom_target(deploy DEPENDS ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.exe)
@@ -112,16 +120,22 @@ function(add_macos_deploy_target)
112120
DEPENDS ${PROJECT_BINARY_DIR}/dist/${macos_app}/Contents/MacOS/Bitcoin-Qt
113121
)
114122

115-
find_program(ZIP_COMMAND zip REQUIRED)
116-
add_custom_command(
117-
OUTPUT ${PROJECT_BINARY_DIR}/dist/${osx_volname}.zip
118-
WORKING_DIRECTORY dist
119-
COMMAND ${PROJECT_SOURCE_DIR}/cmake/script/macos_zip.sh ${ZIP_COMMAND} ${osx_volname}.zip
120-
VERBATIM
121-
)
122-
add_custom_target(deploy
123-
DEPENDS ${PROJECT_BINARY_DIR}/dist/${osx_volname}.zip
124-
)
123+
find_program(ZIP_EXECUTABLE zip)
124+
if(NOT ZIP_EXECUTABLE)
125+
add_custom_target(deploy
126+
COMMAND ${CMAKE_COMMAND} -E echo "Error: ZIP not found"
127+
)
128+
else()
129+
add_custom_command(
130+
OUTPUT ${PROJECT_BINARY_DIR}/dist/${osx_volname}.zip
131+
WORKING_DIRECTORY dist
132+
COMMAND ${PROJECT_SOURCE_DIR}/cmake/script/macos_zip.sh ${ZIP_EXECUTABLE} ${osx_volname}.zip
133+
VERBATIM
134+
)
135+
add_custom_target(deploy
136+
DEPENDS ${PROJECT_BINARY_DIR}/dist/${osx_volname}.zip
137+
)
138+
endif()
125139
endif()
126140
add_dependencies(deploydir bitcoin-qt)
127141
add_dependencies(deploy deploydir)

contrib/signet/miner

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import logging
99
import math
1010
import os
1111
import re
12-
import struct
12+
import shlex
1313
import sys
1414
import time
1515
import subprocess
@@ -86,7 +86,7 @@ def finish_block(block, signet_solution, grind_cmd):
8686
block.solve()
8787
else:
8888
headhex = CBlockHeader.serialize(block).hex()
89-
cmd = grind_cmd.split(" ") + [headhex]
89+
cmd = shlex.split(grind_cmd) + [headhex]
9090
newheadhex = subprocess.run(cmd, stdout=subprocess.PIPE, input=b"", check=True).stdout.strip()
9191
newhead = from_hex(CBlockHeader(), newheadhex.decode('utf8'))
9292
block.nNonce = newhead.nNonce
@@ -479,7 +479,7 @@ def do_calibrate(args):
479479
header.nTime = i
480480
header.nNonce = 0
481481
headhex = header.serialize().hex()
482-
cmd = args.grind_cmd.split(" ") + [headhex]
482+
cmd = shlex.split(args.grind_cmd) + [headhex]
483483
newheadhex = subprocess.run(cmd, stdout=subprocess.PIPE, input=b"", check=True).stdout.strip()
484484

485485
avg = (time.time() - start) * 1.0 / TRIALS
@@ -549,7 +549,7 @@ def main():
549549

550550
args = parser.parse_args(sys.argv[1:])
551551

552-
args.bcli = lambda *a, input=b"", **kwargs: bitcoin_cli(args.cli.split(" "), list(a), input=input, **kwargs)
552+
args.bcli = lambda *a, input=b"", **kwargs: bitcoin_cli(shlex.split(args.cli), list(a), input=input, **kwargs)
553553

554554
if hasattr(args, "address") and hasattr(args, "descriptor"):
555555
args.derived_addresses = {}

depends/packages/capnp.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ $(package)_file_name=$(native_$(package)_file_name)
66
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
77
$(package)_patches=abi_placement_new.patch
88

9-
define $(package)_set_vars :=
9+
define $(package)_set_vars
1010
$(package)_config_opts := -DBUILD_TESTING=OFF
1111
$(package)_config_opts += -DWITH_OPENSSL=OFF
1212
$(package)_config_opts += -DWITH_ZLIB=OFF

depends/packages/libmultiprocess.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ifneq ($(host),$(build))
88
$(package)_dependencies += native_capnp
99
endif
1010

11-
define $(package)_set_vars :=
11+
define $(package)_set_vars
1212
ifneq ($(host),$(build))
1313
$(package)_config_opts := -DCAPNP_EXECUTABLE="$$(native_capnp_prefixbin)/capnp"
1414
$(package)_config_opts += -DCAPNPC_CXX_EXECUTABLE="$$(native_capnp_prefixbin)/capnpc-c++"

doc/build-osx.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ brew install python
141141
#### Deploy Dependencies
142142

143143
You can [deploy](#3-deploy-optional) a `.zip` containing the Bitcoin Core application.
144-
It is required that you have `python` installed.
144+
It is required that you have `python` and `zip` installed.
145145

146146
## Building Bitcoin Core
147147

0 commit comments

Comments
 (0)