Skip to content

Commit f236a50

Browse files
committed
Squashed 'libbitcoinkernel-sys/bitcoin/' changes from 9f83f8b46c84..d9e030d56343
d9e030d56343 kernel: Fix bitcoin-chainstate for windows cc4ac564cc38 kernel: Add Purpose section to header documentation bfdf605296ce kernel: Add pure kernel bitcoin-chainstate 35099f39b7ea kernel: Add functions to get the block hash from a block fae94070a72e kernel: Add block index utility functions to C header d5d377859785 kernel: Add function to read block undo data from disk to C header 43f6039b7b48 kernel: Add functions to read block from disk to C header 54cdfcdc68e6 kernel: Add function for copying block data to C header 18cab45358c3 kernel: Add functions for the block validation state to C header 033e86a06cbc kernel: Add validation interface to C header 9398f9ea4e14 kernel: Add interrupt function to C header 86340a490541 kernel: Add import blocks function to C header f11dc01bba94 kernel: Add chainstate load options for in-memory dbs in C header be9fc18dd54f kernel: Add options for reindexing in C header 7947a9b500fc kernel: Add block validation to C header d5ace1f8ea96 kernel: Add chainstate loading when instantiating a ChainstateManager 47ff652cf08f kernel: Add chainstate manager option for setting worker threads 106898e0c25f kernel: Add chainstate manager object to C header 3eadf1ccbe1c kernel: Add notifications context option to C header 98b1454a987a kernel: Add chain params context option to C header ca8d6ee344b7 kernel: Add kernel library context object 96f5ebe97748 kernel: Add logging to kernel library C header 906a19748152 kernel: Introduce initial kernel C header API 4b8ac9eacd1b Merge bitcoin/bitcoin#32680: ci: Rewrite test-each-commit as py script 157bbd0a07c0 Merge bitcoin/bitcoin#32425: config: allow setting -proxy per network ebec7bf3895c Merge bitcoin/bitcoin#32572: doc: Remove stale sections in dev notes 011a8c5f0168 Merge bitcoin/bitcoin#32696: doc: make `-DWITH_ZMQ=ON` explicit on `build-unix.md` fe39050a66c7 Merge bitcoin/bitcoin#32678: guix: warn and abort when SOURCE_DATE_EPOCH is set 692fe280c232 Merge bitcoin/bitcoin#32713: doc: fuzz: fix AFL++ link c1d4253d316e Merge bitcoin/bitcoin#32711: doc: add missing packages for BSDs (cmake, gmake, curl) to depends/README.md 89526deddf87 doc: add missing packages for BSDs (cmake, gmake, curl) to depends/README.md a39b7071cfb4 doc: fuzz: fix AFL++ link dff208bd5a14 Merge bitcoin/bitcoin#32708: rpc, doc: update `listdescriptors` RCP help d978a43d054d Merge bitcoin/bitcoin#32408: tests: Expand HTTP coverage to assert libevent behavior f3bbc746647d Merge bitcoin/bitcoin#32406: policy: uncap datacarrier by default b44514b87633 rpc, doc: update `listdescriptors` RCP help 32d4e92b9ac8 doc: make `-DWITH_ZMQ=ON` explicit on `build-unix.md` e2174378aa8a Merge bitcoin/bitcoin#32539: init: Configure reachable networks before we start the RPC server 2053c4368472 Merge bitcoin/bitcoin#32675: test: wallet: cover wallet passphrase with a null char fa9cfdf3be75 ci: [doc] fix url redirect fac60b9c4839 ci: Rewrite test-each-commit as py script ae024137bda9 Merge bitcoin/bitcoin#32496: depends: drop `ltcg` for Windows Qt 6a2ff6790929 Merge bitcoin/bitcoin#32679: doc: update tor docs to use bitcoind binary from path fd4399cb9c69 Merge bitcoin/bitcoin#32602: fuzz: Add target for coins database f94167512dc9 Merge bitcoin/bitcoin#32676: test: apply microsecond precision to test framework logging 0dcb45290cf8 Merge bitcoin/bitcoin#32607: rpc: Note in fundrawtransaction doc, fee rate is for package 4ce53495e5e1 doc: update tor docs to use bitcoind binary from path a5e98dc3ae63 Merge bitcoin/bitcoin#32651: cmake: Replace deprecated `qt6_add_translation` with `qt6_add_lrelease` 9653ebc05360 depends: remove support for Windows Qt LTO builds 7cfbb8575e1f test: wallet: cover wallet passphrase with a null char 5c4a0f8009ce guix: warn and abort when SOURCE_DATE_EPOCH is set 4af72d8b0892 Merge bitcoin/bitcoin#32647: build: add -Wthread-safety-pointer a980918f51d7 Merge bitcoin/bitcoin#32568: depends: use "mkdir -p" when installing xproto ed179e0a6528 test: apply microsecond precision to test framework logging e872a566f251 Merge bitcoin/bitcoin#32644: doc: miscellaneous changes e50312eab0b5 doc: fix typos c797e50ddae9 ci: update codespell to 2.4.1 21ee656337b0 doc: Remove obselete link in notificator.cpp ee4406c04af0 doc: update URLs 2d819fa4dff9 Merge bitcoin/bitcoin#29032: signet: omit commitment for some trivial challenges f999c3775c12 Merge bitcoin/bitcoin#32449: wallet: init, don't error out when loading legacy wallets f98e1aaf34e3 rpc: Note in fundrawtransaction doc, fee rate is for package 1c6602399be6 Merge bitcoin/bitcoin#32662: doc: Remove build instruction for running `clang-tidy` 4b1b36acb48f doc: Remove build instruction for running `clang-tidy` 9e105107bf52 Merge bitcoin/bitcoin#32656: depends: don't install & then delete sqlite pkgconf 72a5aa9b791e depends: don't install & then delete sqlite pkgconf 18cf727429e9 cmake: Replace deprecated `qt6_add_translation` with `qt6_add_lrelease` 83bfe1485c37 build: add -Wthread-safety-pointer e639ae05315e Update leveldb subtree to latest upstream 240a4fb95d5b Squashed 'src/leveldb/' changes from 113db4962b..aba469ad6a a189d636184b add release note for datacarriersize default change a141e1bf501b Add more OP_RETURN mempool acceptance functional tests 0b4048c73385 datacarrier: deprecate startup arguments for future removal 63091b79e70b test: remove unnecessary -datacarriersize args from tests 9f36962b07ef policy: uncap datacarrier by default 4b1d48a6866b Merge bitcoin/bitcoin#32598: walletdb: Log additional exception error messages for corrupted wallets b933813386ef Merge bitcoin/bitcoin#32619: wallet, rpc, gui: List legacy wallets with a message about migration 053bda5d9fb3 Merge bitcoin/bitcoin#32460: fs: remove `_POSIX_C_SOURCE` defining 9393aeeca4b1 Merge bitcoin/bitcoin#32641: Update libmultiprocess subtree to fix clang-tidy errors 5471e29d0570 Merge bitcoin/bitcoin#32304: test: test MAX_SCRIPT_SIZE for block validity 9f6565488fc1 Merge commit '154af1eea1170f5626aa1c5f19cc77d1434bcc9d' into HEAD 154af1eea117 Squashed 'src/ipc/libmultiprocess/' changes from 35944ffd23fa..27c7e8e5a581 c540ede1cbca Merge bitcoin/bitcoin#32633: windows: Use predefined `RC_INVOKED` macro instead of custom one cfc42ae5b7ef fuzz: add a target for the coins database 55f1c2ac8beb windows: Use predefined `RC_INVOKED` macro instead of custom one 14c16e81598a Merge bitcoin/bitcoin#32582: log: Additional compact block logging aad5938c49f9 Merge bitcoin/bitcoin#32516: test: add MAX_DISCONNECTED_TX_POOL_BYTES, chainlimits coverage 1062df81eec7 Merge bitcoin/bitcoin#32634: build: Add resource file and manifest to `bitcoin.exe` 83df64d7491b log: Stats when fulfilling GETBLOCKTXN 370c59261269 Merge bitcoin/bitcoin#32630: test: fix sync function in rpc_psbt.py dbb2d4c3d547 windows: Add application manifest to `bitcoin.exe` df82c2dc17e3 windows: Add resource file for `bitcoin.exe` 3733ed2dae3d log: Size of missing tx'es when reconstructing compact block 4df4df45d7bc test: fix sync function in rpc_psbt.py 84aa484d45e2 test: fix transaction_graph_test reorg test eaf44f376784 test: check chainlimits respects on reorg 47894367b583 functional test: add MAX_DISCONNECTED_TX_POOL_BYTES coverage f3a444c45fb4 gui: Disallow loading legacy wallets 09955172f38a wallet, rpc: Give warning in listwalletdir for legacy wallets ad9a13fc424e walletdb: Log additional exception error messages for corrupted wallets 46e14630f7fe fuzz: move the coins_view target's body into a standalone function 56d878c4650c fuzz: avoid underflow in coins_view target 36bcee05dc71 log: Log start of compact block initialization. 24e5fd3bedce fs: remove _POSIX_C_SOURCE defining f16c8c67bf13 tests: Expand HTTP coverage to assert libevent behavior fac00d4ed361 doc: Move CI-must-pass requirement into readme section fab79c1a250d doc: Clarify and move "hygienic commit" note fac8b0519799 doc: Clarify strprintf size specifier note faaf34ad7253 doc: Remove section about RPC alias via function pointer 2222d61e1ce5 doc: Remove section about RPC arg names in table fa00b8c02c9d doc: Remove section about include guards fad6cd739b63 doc: Remove dev note section on includes fa6623d85af1 doc: Remove file name section 7777fb8bc749 doc: Remove shebang section faf65f05312b doc: Remove .gitignore section faf2094f2511 doc: Remove note about removed ParsePrechecks fa69c5b170f5 doc: Remove -disablewallet from dev notes df9ebbf659d5 depends: use "mkdir -p" when installing xproto 6ee32aaaca4a test: signet tool genpsbt and solvepsbt commands 0a99d99fe4cb signet: miner skips PSBT step for OP_TRUE cdfb70e5a6a9 signet: split decode_psbt miner helper 86e1111239cd test: verify node skips loading legacy wallets during startup 12ff4be9c724 test: ensure -rpcallowip is compatible with RFC4193 c02bd3c1875a config: Explain RFC4193 and CJDNS interaction in help and init error f728b6b11100 init: Configure reachable networks before we start the RPC server 9f94de5bb54f wallet: init, don't error out when loading legacy wallets e98c51fcce9a doc: update tor.md to mention the new -proxy=addr:port=tor ca5781e23a8f config: allow setting -proxy per network b1ea542ae651 test: test MAX_SCRIPT_SIZE for block validity REVERT: 9f83f8b46c84 kernel: build monolithic static lib REVERT: 1417e0b3b1b0 kernel: Fix bitcoin-chainstate for windows REVERT: 4f07590a8bd6 kernel: Add Purpose section to header documentation REVERT: 58c01a82c163 kernel: Add pure kernel bitcoin-chainstate REVERT: 0416a292f545 kernel: Add functions to get the block hash from a block REVERT: 8d25dfd1b2a2 kernel: Add block index utility functions to C header REVERT: eacf99dd3c28 kernel: Add function to read block undo data from disk to C header REVERT: 3c012048c2f1 kernel: Add functions to read block from disk to C header REVERT: 85f5264462e0 kernel: Add function for copying block data to C header REVERT: f136ca589153 kernel: Add functions for the block validation state to C header REVERT: 9d7e19ee522d kernel: Add validation interface to C header REVERT: 51555301a882 kernel: Add interrupt function to C header REVERT: 61c4ac9c8e1f kernel: Add import blocks function to C header REVERT: 4153ab77084e kernel: Add chainstate load options for in-memory dbs in C header REVERT: cb128288a0d9 kernel: Add options for reindexing in C header REVERT: 7ead2a92be50 kernel: Add block validation to C header REVERT: 9262ce715448 kernel: Add chainstate loading when instantiating a ChainstateManager REVERT: 594b060da476 kernel: Add chainstate manager option for setting worker threads REVERT: 7384b7325d5f kernel: Add chainstate manager object to C header REVERT: 7920e23c22b8 kernel: Add notifications context option to C header REVERT: c0a86769e784 kernel: Add chain params context option to C header REVERT: 3769d12882f9 kernel: Add kernel library context object REVERT: f7b435493bd7 kernel: Add logging to kernel library C header REVERT: 62d0122c7ed0 kernel: Introduce initial kernel C header API git-subtree-dir: libbitcoinkernel-sys/bitcoin git-subtree-split: d9e030d56343bb452d86169f77ddfb64f7160235
1 parent be473fa commit f236a50

File tree

124 files changed

+1356
-599
lines changed

Some content is hidden

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

124 files changed

+1356
-599
lines changed

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

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/usr/bin/env python3
2+
# Copyright (c) The Bitcoin Core developers
3+
# Distributed under the MIT software license, see the accompanying
4+
# file COPYING or https://opensource.org/license/mit/.
5+
6+
import subprocess
7+
import sys
8+
import shlex
9+
10+
11+
def run(cmd, **kwargs):
12+
print("+ " + shlex.join(cmd), flush=True)
13+
try:
14+
return subprocess.run(cmd, check=True, **kwargs)
15+
except Exception as e:
16+
sys.exit(e)
17+
18+
19+
def main():
20+
print("Running test-one-commit on ...")
21+
run(["git", "log", "-1"])
22+
23+
num_procs = int(run(["nproc"], stdout=subprocess.PIPE).stdout)
24+
25+
# Use clang++, because it is a bit faster and uses less memory than g++
26+
run([
27+
"cmake",
28+
"-B",
29+
"build",
30+
"-DCMAKE_C_COMPILER=clang",
31+
"-DCMAKE_CXX_COMPILER=clang++",
32+
"-DWERROR=ON",
33+
"-DWITH_ZMQ=ON",
34+
"-DBUILD_GUI=ON",
35+
"-DBUILD_BENCH=ON",
36+
"-DBUILD_FUZZ_BINARY=ON",
37+
"-DWITH_USDT=ON",
38+
"-DBUILD_KERNEL_LIB=ON",
39+
"-DBUILD_KERNEL_TEST=ON",
40+
"-DCMAKE_CXX_FLAGS=-Wno-error=unused-member-function",
41+
])
42+
run(["cmake", "--build", "build", "-j", str(num_procs)])
43+
run([
44+
"ctest",
45+
"--output-on-failure",
46+
"--stop-on-failure",
47+
"--test-dir",
48+
"build",
49+
"-j",
50+
str(num_procs),
51+
])
52+
run([
53+
sys.executable,
54+
"./build/test/functional/test_runner.py",
55+
"-j",
56+
str(num_procs * 2),
57+
"--combinedlogslen=99999999",
58+
])
59+
60+
61+
if __name__ == "__main__":
62+
main()

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

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

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copyright (c) 2023-present The Bitcoin Core developers
22
# Distributed under the MIT software license, see the accompanying
3-
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
3+
# file COPYING or https://opensource.org/license/mit.
44

55
name: CI
66
on:
@@ -81,7 +81,7 @@ jobs:
8181
- name: Compile and run tests
8282
run: |
8383
# Run tests on commits after the last merge commit and before the PR head commit
84-
git rebase --exec "git merge --no-commit origin/${GITHUB_BASE_REF} && ./.github/ci-test-each-commit-exec.sh && git reset --hard" ${{ env.TEST_BASE }}
84+
git rebase --exec "git merge --no-commit origin/${GITHUB_BASE_REF} && python3 ./.github/ci-test-each-commit-exec.py && git reset --hard" ${{ env.TEST_BASE }}
8585
8686
macos-native-arm64:
8787
name: ${{ matrix.job-name }}

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ else()
445445
try_append_cxx_flags("-Wvla" TARGET warn_interface SKIP_LINK)
446446
try_append_cxx_flags("-Wshadow-field" TARGET warn_interface SKIP_LINK)
447447
try_append_cxx_flags("-Wthread-safety" TARGET warn_interface SKIP_LINK)
448+
try_append_cxx_flags("-Wthread-safety-pointer" TARGET warn_interface SKIP_LINK)
448449
try_append_cxx_flags("-Wloop-analysis" TARGET warn_interface SKIP_LINK)
449450
try_append_cxx_flags("-Wredundant-decls" TARGET warn_interface SKIP_LINK)
450451
try_append_cxx_flags("-Wunused-member-function" TARGET warn_interface SKIP_LINK)

CONTRIBUTING.md

Lines changed: 5 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

@@ -115,13 +115,14 @@ fixes or code moves with actual code changes.
115115

116116
Make sure each individual commit is hygienic: that it builds successfully on its
117117
own without warnings, errors, regressions, or test failures.
118+
This means tests must be updated in the same commit that changes the behavior.
118119

119120
Commit messages should be verbose by default consisting of a short subject line
120121
(50 chars max), a blank line and detailed explanatory text as separate
121122
paragraph(s), unless the title alone is self-explanatory (like "Correct typo
122123
in init.cpp") in which case a single title line is sufficient. Commit messages should be
123124
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/).
125+
your decisions. Further explanation [here](https://cbea.ms/git-commit/).
125126

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

184185
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)
186+
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)
186187
in the body of the pull request to indicate tasks are pending.
187188

188189
### Address Feedback
@@ -401,7 +402,7 @@ about:
401402
- It may be because your code is too complex for all but a few people, and those people
402403
may not have realized your pull request even exists. A great way to find people who
403404
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
405+
[Git Blame feature](https://docs.github.com/en/repositories/working-with-files/using-files/viewing-and-understanding-files). Simply
405406
look up who last modified the code you are changing and see if you can find
406407
them and give them a nudge. Don't be incessant about the nudging, though.
407408
- Finally, if all else fails, ask on IRC or elsewhere for someone to give your pull request

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ in Python.
5656
These tests can be run (if the [test dependencies](/test) are installed) with: `build/test/functional/test_runner.py`
5757
(assuming `build` is your build directory).
5858

59-
The CI (Continuous Integration) systems make sure that every pull request is built for Windows, Linux, and macOS,
60-
and that unit/sanity tests are run automatically.
59+
The CI (Continuous Integration) systems make sure that every pull request is tested on Windows, Linux, and macOS.
60+
The CI must pass on all commits before merge to avoid unrelated CI failures on new pull requests.
6161

6262
### Manual Quality Assurance (QA) Testing
6363

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 \

cmake/introspection.cmake

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,6 @@ check_cxx_source_compiles("
5555

5656
# Check for posix_fallocate().
5757
check_cxx_source_compiles("
58-
// same as in src/util/fs_helpers.cpp
59-
#ifdef __linux__
60-
#ifdef _POSIX_C_SOURCE
61-
#undef _POSIX_C_SOURCE
62-
#endif
63-
#define _POSIX_C_SOURCE 200112L
64-
#endif // __linux__
6558
#include <fcntl.h>
6659
6760
int main()

cmake/module/AddWindowsResources.cmake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ include_guard(GLOBAL)
77
function(add_windows_resources target rc_file)
88
if(WIN32)
99
target_sources(${target} PRIVATE ${rc_file})
10-
set_property(SOURCE ${rc_file}
11-
APPEND PROPERTY COMPILE_DEFINITIONS WINDRES_PREPROC
12-
)
1310
endif()
1411
endfunction()
1512

contrib/guix/guix-build

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,24 @@ fi
6969

7070
mkdir -p "$VERSION_BASE"
7171

72+
################
73+
# SOURCE_DATE_EPOCH should not unintentionally be set
74+
################
75+
76+
if [ -n "$SOURCE_DATE_EPOCH" ] && [ -z "$FORCE_SOURCE_DATE_EPOCH" ]; then
77+
cat << EOF
78+
ERR: Environment variable SOURCE_DATE_EPOCH is set which may break reproducibility.
79+
80+
Aborting...
81+
82+
Hint: You may want to:
83+
1. Unset this variable: \`unset SOURCE_DATE_EPOCH\` before rebuilding
84+
2. Set the 'FORCE_SOURCE_DATE_EPOCH' environment variable if you insist on
85+
using your own epoch
86+
EOF
87+
exit 1
88+
fi
89+
7290
################
7391
# Build directories should not exist
7492
################

0 commit comments

Comments
 (0)