Skip to content

Commit b82132c

Browse files
committed
Squashed 'depend/bitcoin/' changes from 81cec737e6..5c5704e730
5c5704e730 Merge bitcoin/bitcoin#33791: kernel: Use enumeration type for flags argument ed5720509f kernel: Use enumeration type for flags argument 50d106a4d6 Merge bitcoin/bitcoin#33781: clang-tidy: Remove no longer needed NOLINT ffd7ca3c46 Merge bitcoin/bitcoin#33780: guix: disable libsanitizer in Linux GCC build 33389f1144 Merge bitcoin-core/gui#899: Modernize custom filtering 038849e2e0 clang-tidy: Remove no longer needed NOLINT 5c41fa2918 guix: disable libsanitizer in Linux GCC build 4da01123df Merge bitcoin/bitcoin#30595: kernel: Introduce C header API 96614fff63 Merge bitcoin/bitcoin#33714: random: scope environ extern to macOS, BSDs and Illumos 4e9bd579d3 Merge bitcoin/bitcoin#33045: depends: disable variables, rules and suffixes. 5ffa63d681 Merge bitcoin/bitcoin#33626: ci: run native fuzz with MSAN job 75baff98fc Merge bitcoin/bitcoin#33744: ci: Fix lint runner selection (and docker cache) 2593ed1b5f Merge bitcoin/bitcoin#33574: doc: update Guix INSTALL.md 1cd8d9fe5c Merge bitcoin/bitcoin#33445: ci: Update Clang in "tidy" job 56329beaee Merge bitcoin/bitcoin#32301: test: cover invalid codesep positions for signature in taproot 1e6e32fa8a ci: run native fuzz with MSAN job 3784d15bcd ci: use LLVM libcxx 21.1.5 6c7a34f3b0 kernel: Add Purpose section to header documentation 7e9f00bcc1 kernel: Allowing reducing exports 7990463b10 kernel: Add pure kernel bitcoin-chainstate 36ec9a3ea2 Kernel: Add functions for working with outpoints 5eec7fa96a kernel: Add block hash type and block tree utility functions to C header f5d5d1213c kernel: Add function to read block undo data from disk to C header 09d0f62638 kernel: Add functions to read block from disk to C header a263a4caf2 kernel: Add function for copying block data to C header b30e15f432 kernel: Add functions for the block validation state to C header aa262da7bc kernel: Add validation interface to C header d27e27758d kernel: Add interrupt function to C header 1976b13be9 kernel: Add import blocks function to C header a747ca1f51 kernel: Add chainstate load options for in-memory dbs in C header 070e77732c kernel: Add options for reindexing in C header ad80abc73d kernel: Add block validation to C header cb1590b05e kernel: Add chainstate loading when instantiating a ChainstateManager e2c1bd3d71 kernel: Add chainstate manager option for setting worker threads 65571c36a2 kernel: Add chainstate manager object to C header c62f657ba3 kernel: Add notifications context option to C header 9e1bac4585 kernel: Add chain params context option to C header 337ea860df kernel: Add kernel library context object 28d679bad9 kernel: Add logging to kernel library C header 2cf136dec4 kernel: Introduce initial kernel C header API e15e8cbada qt: Modernize custom filtering 745eb053a4 Merge bitcoin-core/gui#901: Add createwallet, createwalletdescriptor, and migratewallet to history filter 52b1595850 depends: disable builtin variables 8b5a28fa78 depends: disable builtin rules and suffixes. 7632e0ba31 ci: fix configure docker action inputs 746d36cc80 Merge bitcoin/bitcoin#33754: ci: gha: Set debug_pull_request_number_str annotation 25c45bb0d0 Merge bitcoin/bitcoin#33567: node: change a tx-relay on/off flag to enum 422b468229 Merge bitcoin/bitcoin#33683: refactor/doc: Add blockman param to GetTransaction doc comment da6f041e39 Merge bitcoin/bitcoin#31645: [IBD] coins: increase default UTXO flush batch size to 32 MiB 832a57673a Merge bitcoin/bitcoin#33749: test: ipc: resolve symlinks in `which capnp` 3cd4263bf6 Merge bitcoin/bitcoin#33753: test: Format strings in `test_runner` 78d4d36730 test: Format strings in `*.rs` fa9d0f994b ci: gha: Set debug_pull_request_number_str annotation 305384a037 Merge bitcoin/bitcoin#33746: ci: Add missing python3-dev package for riscv64 8eda7210eb Merge bitcoin/bitcoin#33743: fuzz: refactor memcpy to std::ranges::copy to work around ubsan warn 51093d6ae1 test: resolve symlinks in which result for capnp 6f359695c3 Merge bitcoin/bitcoin#33698: test: Use same rpc timeout for authproxy and cli c281bb6837 Merge bitcoin/bitcoin#32924: test: add valid tx test with minimum-sized ECDSA signature (8 bytes DER-encoded) facf8b771a ci: Add missing python3-dev package for riscv64 b4d0288c46 doc: update Guix INSTALL.md 0b3b8a3be1 ci: fix lint docker caching fa4b52bd16 fuzz: refactor memcpy to std::ranges::copy to work around ubsan warn 72511fd02e Merge bitcoin/bitcoin#33555: build: Bump clang minimum supported version to 17 79d6f458e2 random: scope environ extern to macOS, BSDs and Illumos 292ea0eb89 Merge bitcoin/bitcoin#33677: ci: Retry image building once on failure dd82c6c5d0 Merge bitcoin/bitcoin#33693: ci: use pycapnp 2.2.1 3bb30658e6 Merge bitcoin/bitcoin#32380: Modernize use of UTF-8 in Windows code 5a58d4915e Merge bitcoin/bitcoin#33546: test: add functional test for `TestShell` (matching doc example) 1abc8fa308 Merge bitcoin/bitcoin#33218: refactor: rename `fees.{h,cpp}` to `fees/block_policy_estimator.{h,cpp}` de15e52f09 Merge bitcoin/bitcoin#32867: doc: mention key removal in rpc interface modification 5d784bebaf clang-tidy: Disable `ArrayBound` check in src/ipc and src/test 5efdb0ef30 ci: Update Clang in "tidy" job 24434c1284 Merge bitcoin/bitcoin#31308: ci, iwyu: Treat warnings as errors for specific directories 27cd7f5049 Merge bitcoin/bitcoin#33185: guix: update time-machine to 5cb84f2013c5b1e48a7d0e617032266f1e6059e2 80bb7012be Merge bitcoin/bitcoin#31514: wallet: allow label for non-ranged external descriptor (if `internal=false`) & disallow label for ranged descriptors 5e1f626ac3 Merge bitcoin/bitcoin#32504: test: descriptor: cover invalid multi/multi_a cases 56e9703968 Merge bitcoin/bitcoin#29640: Fix tiebreak when loading blocks from disk (and add tests for comparing chain ties) 53b34c80c6 ci: use pycapnp 2.2.1 in mac native job 865432869c ci: remove Python version comment from mac config 9bd9ec00b2 Merge bitcoin/bitcoin#33688: test: Update BIP324 test vectors 1a7fb5eeee fees: return current block height in estimateSmartFee ab49480d9b fees: rename fees_args to block_policy_estimator_args 06db08a435 fees: refactor: rename fees to block_policy_estimator 6dfdd7e034 fees: refactor: rename policy_fee_tests.cpp to feerounder_tests.cpp f54ffb4bc1 Merge bitcoin/bitcoin#32813: clang-format: make formatting deterministic for different formatter versions 1916c51cd8 Merge bitcoin/bitcoin#33210: fuzz: enhance wallet_fees by mocking mempool stuff 0eb554728c Merge bitcoin/bitcoin#33336: log: print every script verification state change c6c4edf324 Merge bitcoin/bitcoin#32983: rpc: refactor: use string_view in Arg/MaybeArg 00ad998d95 Merge bitcoin/bitcoin#33252: p2p: add `DifferenceFormatter` fuzz target and invariant check 1a1f46c228 refactor/doc: Add blockman param to `GetTransaction` doc comment and reorder out param 66667d6512 test: Use same rpc timeout for authproxy and cli 5555bce994 ci: Document why IN_GETOPT_BIN env var is needed on macOS fabe516440 ci: Export the container id in python script f6ba97cea1 Merge bitcoin/bitcoin#33666: ci: Drop libFuzzer from msan fuzz task af78d36512 Merge bitcoin/bitcoin#32588: util: Abort on failing CHECK_NONFATAL in debug builds 51877f2fc5 test: Update BIP324 test vectors 161864a038 Merge bitcoin/bitcoin#32579: p2p: Correct unrealistic headerssync unit test behavior 70a6fb5e5a Merge bitcoin/bitcoin#33172: test: p2p block malleability 99cb2054bd Merge bitcoin/bitcoin#33600: refactor: Construct g_verify_flag_names on first use 211bf6c975 Merge bitcoin/bitcoin#33566: miner: fix empty mempool case for waitNext() 944e5ff848 doc: mention key removal in rpc interface modification d32f9525e4 Merge bitcoin/bitcoin#33679: test: set number of RPC server threads to 2 1c85d06232 Merge bitcoin/bitcoin#32266: depends: Avoid `warning: "_FORTIFY_SOURCE" redefined` for `libevent` 11684c9ce2 Merge bitcoin/bitcoin#33674: ci: Doc ASLR workaround for sanitizer tasks e9cd45e3d3 test: set number of RPC server threads to 2 fa6aa9f42f ci: Retry image building once on failure fa4dbe04d7 ci: Allow overwriting check option in run() helper fa8e4de5c3 ci: Use os.environ[key] access when value must be set 7d27af98c7 Merge bitcoin/bitcoin#33461: ci: add Valgrind fuzz 1569bcc387 Merge bitcoin/bitcoin#33639: ci: Only write docker build images to Cirrus cache 98c4994d0f Merge bitcoin/bitcoin#33570: randomenv: Fix MinGW dllimport warning for `environ` c211d18322 Merge bitcoin/bitcoin#33670: test: Use unassigned p2p_port instead of hardcoded 60000 in p2p_i2p_ports.py e4b04630bc ci: add Valgrind fuzz 3fee0754a2 Merge bitcoin/bitcoin#33550: Fix windows libc++ `fs::path` `fstream` compile errors fa0e36156c ci: Doc ASLR workaround for sanitizer tasks fa20275db3 test: Use unassigned p2p_port instead of hardcoded 60000 in p2p_i2p_ports.py c862936d16 Merge bitcoin/bitcoin#33370: ci: use Mold linker for asan-lsan-ubsan-integer-no-depends-usdt workflow fabe0e07de ci: Only write docker build images to Cirrus cache fab64a5d6f ci: Move buildx command to python script fa72a2bd5c ci: Remove unused MAYBE_CPUSET fa70e23de7 ci: Drop libFuzzer from msan fuzz task abe7cbfe1a Merge bitcoin/bitcoin#33470: build: Move CMAKE_SKIP_INSTALL_RPATH from CMake to Guix script 689ec28d1d Merge bitcoin/bitcoin#33633: test: [move-only] binary utils to utils.py 0eeae4d174 Merge bitcoin/bitcoin#33625: Update secp256k1 subtree to latest master 4b41f99d57 build: Move CMAKE_SKIP_INSTALL_RPATH from CMake to Guix script d30f149360 Merge bitcoin/bitcoin#33630: doc: correct topology requirements in submitpackage helptext 3d22282564 [doc] correct topology requirements in submitpackage helptext e744fd1249 Merge bitcoin/bitcoin#33641: Update leveldb subtree to latest master 4371740beb Merge bitcoin/bitcoin#33642: doc: archive release notes for v28.3 ceea24b921 doc: archive release notes for v28.3 54ffe3de5b Update leveldb subtree to latest master f21162d819 Squashed 'src/leveldb/' changes from aba469ad6a..cad64b151d e14451ac87 Merge bitcoin/bitcoin#33469: TxGraph: change m_excluded_clusters f76e1ae389 Merge bitcoin/bitcoin#32313: coins: fix `cachedCoinsUsage` accounting in `CCoinsViewCache` 59c4898994 guix: remove python-pydantic-core input from LIEF 9f2a6927d3 guix: use Clang & LLVM 19 for macOS build 9570ddbec9 guix: update time-machine to 5cb84f2013c5b1e48a7d0e617032266f1e6059e2 7b5cc276aa guix: patch around riscv issue with newer (2.40+) binutils 91b5cbaabb ci: use Debian Trixie for macOS cross job fa75ef4328 test: Move export_env_build_path to util.py fa9f495308 test: Move get_binary_paths and Binaries to util.py 40e7d4cd0d Merge bitcoin/bitcoin#33549: ci: Add macOS cross task for arm64-apple-darwin ea17618c11 Merge bitcoin/bitcoin#33480: ci: Turn CentOS config into Alpine musl config b1f8a13702 Merge bitcoin/bitcoin#33624: test: P2SH sig ops are only counted with `SCRIPT_VERIFY_P2SH` 879c21045e Update secp256k1 subtree to latest master 3cbf7cb3e6 Squashed 'src/secp256k1/' changes from b9313c6e1a..d543c0d917 2f7a50f67c Merge bitcoin/bitcoin#33462: ci: add libcpp hardening flags to macOS fuzz job 07a926474b node: change a tx-relay on/off flag to enum 48aa0e98d0 Merge bitcoin/bitcoin#29675: wallet: Be able to receive and spend inputs involving MuSig2 aggregate keys db4bde0b03 Merge bitcoin/bitcoin#33517: multiprocess: Fix high overhead from message logging 3a10d700bc test: P2SH sig ops are only counted with `SCRIPT_VERIFY_P2SH` flag 9314113b29 Merge bitcoin/bitcoin#33610: doc: archive release notes for v29.2 9b43428c96 TxGraph: change m_excluded_clusters 6e1adbbaa1 Merge bitcoin/bitcoin#33612: test: change log rate limit version gate fdcf67de80 Merge bitcoin/bitcoin#33157: cluster mempool: control/optimize TxGraph memory usage 7b544341c0 test: change log rate limit version gate from 299900 to 290100 9610b0d1e2 randomenv: Fix MinGW dllimport warning for `environ` 6c4fe401e9 Merge bitcoin/bitcoin#33508: ci: fix buildx gha cache authentication on forks 8f7673257a miner: fix empty mempool case for waitNext() c11a3dcc88 doc: archive release notes for v29.2 64a7c7cbb9 Merge bitcoin/bitcoin#33558: ci: Use native platform for win-cross task 93b56e95c0 Merge bitcoin/bitcoin#33601: doc: archive release notes for v30.0 563747971b Merge bitcoin/bitcoin#33580: depends: Use $(package)_file_name when downloading from the fallback 24d861da78 coins: only adjust `cachedCoinsUsage` on `EmplaceCoinInternalDANGER` insert d7c9d6c291 coins: fix `cachedCoinsUsage` accounting to prevent underflow 39cf8bb3d0 refactor: remove redundant usage tracking from `CoinsViewCacheCursor` 67cff8bec9 refactor: assert newly-created parent cache entry has zero memory usage 023cd5a546 txgraph: add SingletonClusterImpl (mem optimization) e346250732 txgraph: give Clusters a range of intended tx counts (preparation) e93b0f09cc txgraph: abstract out creation of empty Clusters (refactor) 6baf12621f txgraph: comment fixes (doc fix) 726b995739 txgraph: make Cluster an abstract class (refactor) 2602d89edd txgraph: avoid accessing other Cluster internals (refactor) 04c808ac4c txgraph: expose memory usage estimate function (feature) 7680bb8fd4 txgraph: keep track of Cluster memory usage (preparation) 4ba562e5f4 txgraph: keep data structures compact (mem optimization) bb5cb222ae depgraph: add memory usage control (feature) b1637a90de txgraph: avoid holes in DepGraph positions (mem optimization) 2b1d302508 txgraph: move some sanity checks from Cluster to TxGraphImpl (refactor) d40302fbaf txgraph: Make level of Cluster implicit (optimization) 8d6e49158e doc: archive release notes for v30.0 4e352efa2c qt: add createwallet, createwalletdescriptor, and migratewallet to history filter 0626b90f50 multiprocess: align our logging with libmultiprocess's 9d068225ee multiprocess: update multiprocess EventLoop construction to use options d2987102dd Merge bitcoin/bitcoin#33573: doc: bump the template macOS version f6567527d8 doc: bump the template macOS version faa9d10c84 refactor: Construct g_verify_flag_names on first use becf150013 Merge bitcoin/bitcoin#33518: Update libmultiprocess subtree to support reduced logging cd1b7fa1ff Merge bitcoin/bitcoin#33577: Revert "depends: Update URL for `qrencode` package source tarball" fa0fa0f700 refactor: Revert "disable self-assign warning for tests" faed118fb3 build: Bump clang minimum supported version to 17 6b4a92b0fa Merge bitcoin/bitcoin#33568: doc: how to update a subtree 90b2884ce4 Merge bitcoin/bitcoin#33581: ci: Properly include $FILE_ENV in DEPENDS_HASH d44b860cd0 Merge bitcoin/bitcoin#33584: ci: upgrade GitHub Action to download-artifact@v5 57f7c68821 test: add functional test for `TestShell` (matching doc example) 53874f7934 doc: test: update TestShell example instructions/options b35341b9ba Update ci.yml ceeb53adcd ci: Properly include $FILE_ENV in DEPENDS_HASH 671b774d1b depends: Use $(package)_file_name when downloading from the fallback e4335a3192 Revert "depends: Update URL for `qrencode` package source tarball" a89a822e6e Revert "depends: Use hash instead of file name for package download stamp" fad5a7101c ci: Add macOS cross task for arm64 fa8c750a0a ci: Refactor get_previous_releases step in win-test-cross task e4c04f7759 ci: add libcpp hardening flags to macOS fuzz job a1226bc760 doc: how to update a subtree eda91b07fd Merge commit '0f01e1577f7c6734eb345139a12aba329ef22a5f' into pr/subtree-6 0f01e1577f Squashed 'src/ipc/libmultiprocess/' changes from 47d79db8a552..a4f929696490 fa6fd16f36 ci: Use native platform for win-cross task 53e4951a5b Switch to ANSI Windows API in `fsbridge::fopen()` function dbe770d921 Switch to ANSI Windows API in `Win32ErrorString()` function 06d0be4e22 Remove no longer necessary `WinCmdLineArgs` class f366408492 cmake: Set process code page to UTF-8 on Windows dccbb17806 Set minimum supported Windows version to 1903 (May 2019 Update) c864a4c194 Simplify fs::path by dropping filename() and make_preferred() overloads b0113afd44 Fix windows libc++ fs::path fstream compile errors b63428ac9c rpc: refactor: use more (Maybe)Arg<std::string_view> 037830ca0d refactor: increase string_view usage b3bf18f0ba rpc: refactor: use string_view in Arg/MaybeArg 45bd891465 log: split assumevalid ancestry-failure-reason message 6c13a38ab5 log: separate script verification reasons f2ea6f04e7 refactor: untangle assumevalid decision branches 9bc298556c validation: log initial script verification state 4fad4e992c test: add assumevalid scenarios scaffold ac599c4a9c test: Test MuSig2 in the wallet 68ef954c4c wallet: Keep secnonces in DescriptorScriptPubKeyMan 4a273edda0 sign: Create MuSig2 signatures for known MuSig2 aggregate keys 258db93889 sign: Add CreateMuSig2AggregateSig bf69442b3f sign: Add CreateMuSig2PartialSig 512b17fc56 sign: Add CreateMuSig2Nonce 82ea67c607 musig: Add MuSig2AggregatePubkeys variant that validates the aggregate d99a081679 psbt: MuSig2 data in Fill/FromSignatureData 4d8b4f5336 signingprovider: Add musig2 secnonces c06a1dc86f Add MuSig2SecNonce class for secure allocation of musig nonces 9baff05e49 sign: Include taproot output key's KeyOriginInfo in sigdata 4b24bfeab9 pubkey: Return tweaks from BIP32 derivation bc706955d7 ci: expose all ACTIONS_* vars 444409ff2b ci: Reduce Alpine musl task to md runner size fa6b2e9efe ci: Turn centos config into alpine musl config 91ac64b0a6 log: reword `signature validations` to `script verification` in `assumevalid` log f14876213a musig: Move synthetic xpub construction to its own function f031536f2d ci: use Mold linker for asan-lsan-ubsan-integer-no-depends-usdt workflow cc5dda1de3 headerssync: Make HeadersSyncState more flexible and move constants 8fd1c2893e test(headerssync): Test returning of pow_validated_headers behavior 7b00643ef5 test(headerssync): headers_sync_chainwork test improvements 04eeb9578c doc(test): Improve comments fe896f8faa refactor(test): Store HeadersSyncState on the stack f03686892a refactor(test): Break up headers_sync_state e984618d0b refactor(headerssync): Process spans of headers a4ac9915a9 refactor(headerssync): Extract test constants ahead of breakup into functions 02d2b5a11c ci, iwyu: Treat warnings as errors for specific directories 57a3eac387 refactor: Fix includes in `index` directory bdb8eadcdc refactor: Fix includes in `crypto` directory 56f2a689a2 ci: Do not patch `leveldb` to workaround UB in "tidy" CI job 65a10fc3c5 p2p: add assertion for BlockTransactionsRequest indexes 58be359f6b fuzz: add a target for DifferenceFormatter Class 13f36c020f clang-format: regenerate configs 5ded99a7f0 fuzz: MockMempoolMinFee in wallet_fees c9a7a198d9 test: move MockMempoolMinFee to util/txmempool adf67eb21b fuzz: create FeeEstimatorTestingSetup to set fee_estimator ff10a37e99 fuzz: mock CBlockPolicyEstimator in wallet_fuzz f591c3beca fees: make estimateSmartFee/HighestTargetTracked virtual for mocking b6f8c48946 coins: increase default `dbbatchsize` to 32 MiB 8bbb7b8bf8 refactor: Extract default batch size into kernel d0e1bbad01 test: repeat block malleability test with relayable block over P2P 19273d0705 fuzz: set mempool options in wallet_fees 81e5c8385b test: cover invalid codesep positions for signature in taproot fb8720f1e0 sign: Refactor Schnorr sighash computation out of CreateSchnorrSig a4cfddda64 tests: Clarify why musig derivation adds a pubkey and xpub 39a63bf2e7 descriptors: Add a doxygen comment for has_hardened output_parameter 2320184d0e descriptors: Fix meaning of any_key_parsed 0465574c12 test: Fixes send_blocks_and_test docs 09c95f21e7 test: Adds block tiebreak over restarts tests 18524b072e Make nSequenceId init value constants 8b91883a23 Set the same best tip on restart if two candidates have the same work 5370bed21e test: add functional test for complex reorgs ab145cb3b4 Updates CBlockIndexWorkComparator outdated comment fa37153288 util: Abort on failing CHECK_NONFATAL in debug builds fa0dc4bdff test: Allow testing of check failures faeb58fe66 refactor: Set G_ABORT_ON_FAILED_ASSUME when G_FUZZING_BUILD 5fa81e239a test: add valid tx test with minimum-sized ECDSA signature (8 bytes DER-encoded) 58e55b17e6 test: descriptor: cover invalid multi/multi_a cases 664657ed13 bugfix: disallow label for ranged descriptors & allow external non-ranged descriptors to have label fe71a4b139 depends: Avoid `warning: "_FORTIFY_SOURCE" redefined` for `libevent` REVERT: 81cec737e6 kernel: Fix bitcoin-chainstate for windows REVERT: 1826c485dd kernel: Add Purpose section to header documentation REVERT: d7e618aa98 kernel: Allowing reducing exports REVERT: fb7f524133 kernel: Add pure kernel bitcoin-chainstate REVERT: dd0bdf279e Kernel: Add functions for working with outpoints REVERT: eaa6abfc73 kernel: Add block hash type and block tree utility functions to C header REVERT: 824ddf2885 kernel: Add function to read block undo data from disk to C header REVERT: 76cab0768b kernel: Add functions to read block from disk to C header REVERT: e41f6f459a kernel: Add function for copying block data to C header REVERT: 39c647647a kernel: Add functions for the block validation state to C header REVERT: 8a19a9d607 kernel: Add validation interface to C header REVERT: 38a990dd48 kernel: Add interrupt function to C header REVERT: fee8f6ff38 kernel: Add import blocks function to C header REVERT: c29a6b87cc kernel: Add chainstate load options for in-memory dbs in C header REVERT: e788b3ba06 kernel: Add options for reindexing in C header REVERT: 2707fc515c kernel: Add block validation to C header REVERT: 51a24c4004 kernel: Add chainstate loading when instantiating a ChainstateManager REVERT: ea01a8caf3 kernel: Add chainstate manager option for setting worker threads REVERT: add5904e0a kernel: Add chainstate manager object to C header REVERT: 37a3395d27 kernel: Add notifications context option to C header REVERT: d838a934be kernel: Add chain params context option to C header REVERT: dc58ae9fc0 kernel: Add kernel library context object REVERT: 7744997596 kernel: Add logging to kernel library C header REVERT: dc504f57b3 kernel: Introduce initial kernel C header API git-subtree-dir: depend/bitcoin git-subtree-split: 5c5704e730796c6f31e2d7891bf6334674a04219
1 parent f74b275 commit b82132c

File tree

334 files changed

+6937
-2890
lines changed

Some content is hidden

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

334 files changed

+6937
-2890
lines changed

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ body:
7878
id: os
7979
attributes:
8080
label: Operating system and version
81-
placeholder: e.g. "MacOS Ventura 13.2" or "Ubuntu 22.04 LTS"
81+
placeholder: e.g. "MacOS 26.0" or "Ubuntu 26.04 LTS"
8282
validations:
8383
required: true
8484
- type: textarea
@@ -90,4 +90,3 @@ body:
9090
e.g. OS/CPU and disk type, network connectivity
9191
validations:
9292
required: false
93-

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

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,21 @@ inputs:
44
cache-provider:
55
description: 'gha or cirrus cache provider'
66
required: true
7-
options:
8-
- gh
9-
- cirrus
107
runs:
118
using: 'composite'
129
steps:
10+
- name: Check inputs
11+
shell: bash
12+
run: |
13+
# We expect only gha or cirrus as inputs to cache-provider
14+
case "${{ inputs.cache-provider }}" in
15+
gha|cirrus)
16+
;;
17+
*)
18+
echo "::warning title=Unknown input to configure docker action::Provided value was ${{ inputs.cache-provider }}"
19+
;;
20+
esac
21+
1322
- name: Set up Docker Buildx
1423
uses: docker/setup-buildx-action@v3
1524
with:
@@ -22,8 +31,12 @@ runs:
2231
uses: actions/github-script@v6
2332
with:
2433
script: |
25-
core.exportVariable('ACTIONS_CACHE_URL', process.env['ACTIONS_CACHE_URL'])
26-
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN'])
34+
Object.keys(process.env).forEach(function (key) {
35+
if (key.startsWith('ACTIONS_')) {
36+
core.info(`Exporting ${key}`);
37+
core.exportVariable(key, process.env[key]);
38+
}
39+
});
2740
2841
- name: Construct docker build cache args
2942
shell: bash
@@ -44,8 +57,8 @@ runs:
4457
# Always optimistically --cache‑from in case a cache blob exists
4558
args=(--cache-from "type=gha${url_args:+,${url_args}},scope=${CONTAINER_NAME}")
4659
47-
# If this is a push to the default branch, also add --cache‑to to save the cache
48-
if [[ ${{ github.event_name }} == "push" && ${{ github.ref_name }} == ${{ github.event.repository.default_branch }} ]]; then
60+
# Only add --cache-to when using the Cirrus cache provider and pushing to the default branch.
61+
if [[ ${{ inputs.cache-provider }} == 'cirrus' && ${{ github.event_name }} == "push" && ${{ github.ref_name }} == ${{ github.event.repository.default_branch }} ]]; then
4962
args+=(--cache-to "type=gha${url_args:+,${url_args}},mode=max,ignore-error=true,scope=${CONTAINER_NAME}")
5063
fi
5164

.github/actions/configure-environment/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ runs:
1717
- name: Set cache hashes
1818
shell: bash
1919
run: |
20-
echo "DEPENDS_HASH=$(git ls-tree HEAD depends "ci/test/$FILE_ENV" | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
20+
echo "DEPENDS_HASH=$(git ls-tree HEAD depends "$FILE_ENV" | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
2121
echo "PREVIOUS_RELEASES_HASH=$(git ls-tree HEAD test/get_previous_releases.py | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
2222
2323
- name: Get container name

.github/workflows/ci.yml

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ jobs:
3535
outputs:
3636
provider: ${{ steps.runners.outputs.provider }}
3737
steps:
38+
- name: Annotate with pull request number
39+
# This annotation is machine-readable and can be used to assign a check
40+
# run to its corresponding pull request. Running in one check run is
41+
# sufficient for each check suite.
42+
run: |
43+
if [ "${{ github.event_name }}" = "pull_request" ]; then
44+
echo "::notice title=debug_pull_request_number_str::${{ github.event.number }}"
45+
fi
3846
- id: runners
3947
run: |
4048
if [[ "${REPO_USE_CIRRUS_RUNNERS}" == "${{ github.repository }}" ]]; then
@@ -157,11 +165,6 @@ jobs:
157165
brew install --quiet python@3 || brew link --overwrite python@3
158166
brew install --quiet coreutils ninja pkgconf gnu-getopt ccache boost libevent zeromq qt@6 qrencode capnp
159167
160-
- name: Install Python packages
161-
run: |
162-
git clone -b v2.1.0 https://github.com/capnproto/pycapnp
163-
pip3 install ./pycapnp -C force-bundled-libcapnp=True --break-system-packages
164-
165168
- name: Set Ccache directory
166169
run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV"
167170

@@ -202,7 +205,7 @@ jobs:
202205
job-type: [standard, fuzz]
203206
include:
204207
- job-type: standard
205-
generate-options: '-DBUILD_GUI=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DBUILD_KERNEL_LIB=ON -DBUILD_UTIL_CHAINSTATE=ON -DBUILD_KERNEL_TEST=OFF -DWERROR=ON'
208+
generate-options: '-DBUILD_GUI=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DBUILD_KERNEL_LIB=ON -DBUILD_UTIL_CHAINSTATE=ON -DWERROR=ON'
206209
job-name: 'Windows native, VS 2022'
207210
- job-type: fuzz
208211
generate-options: '-DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="wallet" -DBUILD_GUI=OFF -DBUILD_FOR_FUZZING=ON -DWERROR=ON'
@@ -381,7 +384,7 @@ jobs:
381384
- *CHECKOUT
382385

383386
- name: Download built executables
384-
uses: actions/download-artifact@v4
387+
uses: actions/download-artifact@v5
385388
with:
386389
name: x86_64-w64-mingw32-executables-${{ github.run_id }}
387390

@@ -433,8 +436,7 @@ jobs:
433436
echo "PREVIOUS_RELEASES_DIR=${{ runner.temp }}/previous_releases" >> "$GITHUB_ENV"
434437
435438
- name: Get previous releases
436-
working-directory: test
437-
run: ./get_previous_releases.py --target-dir $PREVIOUS_RELEASES_DIR
439+
run: ./test/get_previous_releases.py --target-dir $PREVIOUS_RELEASES_DIR
438440

439441
- name: Run functional tests
440442
env:
@@ -472,12 +474,18 @@ jobs:
472474
timeout-minutes: 120
473475
file-env: './ci/test/00_setup_env_native_asan.sh'
474476

475-
- name: 'macOS-cross, gui, no tests'
477+
- name: 'macOS-cross to arm64'
476478
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-sm'
477479
fallback-runner: 'ubuntu-24.04'
478480
timeout-minutes: 120
479481
file-env: './ci/test/00_setup_env_mac_cross.sh'
480482

483+
- name: 'macOS-cross to x86_64'
484+
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-sm'
485+
fallback-runner: 'ubuntu-24.04'
486+
timeout-minutes: 120
487+
file-env: './ci/test/00_setup_env_mac_cross_intel.sh'
488+
481489
- name: 'No wallet, libbitcoinkernel'
482490
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-sm'
483491
fallback-runner: 'ubuntu-24.04'
@@ -496,17 +504,23 @@ jobs:
496504
timeout-minutes: 240
497505
file-env: './ci/test/00_setup_env_native_fuzz.sh'
498506

507+
- name: 'Valgrind, fuzz'
508+
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md'
509+
fallback-runner: 'ubuntu-24.04'
510+
timeout-minutes: 240
511+
file-env: './ci/test/00_setup_env_native_fuzz_with_valgrind.sh'
512+
499513
- name: 'previous releases, depends DEBUG'
500514
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md'
501515
fallback-runner: 'ubuntu-24.04'
502516
timeout-minutes: 120
503517
file-env: './ci/test/00_setup_env_native_previous_releases.sh'
504518

505-
- name: 'CentOS, depends, gui'
506-
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg'
519+
- name: 'Alpine (musl), depends, gui'
520+
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md'
507521
fallback-runner: 'ubuntu-24.04'
508522
timeout-minutes: 120
509-
file-env: './ci/test/00_setup_env_native_centos.sh'
523+
file-env: './ci/test/00_setup_env_native_alpine_musl.sh'
510524

511525
- name: 'tidy'
512526
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md'
@@ -520,6 +534,12 @@ jobs:
520534
timeout-minutes: 120
521535
file-env: './ci/test/00_setup_env_native_tsan.sh'
522536

537+
- name: 'MSan, fuzz'
538+
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md'
539+
fallback-runner: 'ubuntu-24.04'
540+
timeout-minutes: 150
541+
file-env: './ci/test/00_setup_env_native_fuzz_with_msan.sh'
542+
523543
- name: 'MSan, depends'
524544
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg'
525545
fallback-runner: 'ubuntu-24.04'
@@ -548,7 +568,7 @@ jobs:
548568
run: sed -i "s|\${INSTALL_BCC_TRACING_TOOLS}|true|g" ./ci/test/00_setup_env_native_asan.sh
549569

550570
- name: Set mmap_rnd_bits
551-
if: ${{ env.CONTAINER_NAME == 'ci_native_tsan' || env.CONTAINER_NAME == 'ci_native_msan' }}
571+
if: ${{ env.CONTAINER_NAME == 'ci_native_tsan' || env.CONTAINER_NAME == 'ci_native_msan' || env.CONTAINER_NAME == 'ci_native_fuzz_msan' }}
552572
# Prevents crashes due to high ASLR entropy
553573
run: sudo sysctl -w vm.mmap_rnd_bits=28
554574

@@ -561,7 +581,7 @@ jobs:
561581
lint:
562582
name: 'lint'
563583
needs: runners
564-
runs-on: ${{ needs.runners.outputs.use-cirrus-runners == 'true' && 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-xs' || 'ubuntu-24.04' }}
584+
runs-on: ${{ needs.runners.outputs.provider == 'cirrus' && 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-xs' || 'ubuntu-24.04' }}
565585
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
566586
timeout-minutes: 20
567587
env:

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
632632
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
633633
else()
634634
set(CMAKE_SKIP_BUILD_RPATH TRUE)
635-
set(CMAKE_SKIP_INSTALL_RPATH TRUE)
636635
endif()
637636
add_subdirectory(test)
638637
add_subdirectory(doc)

ci/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ requires `bash`, `docker`, and `python3` to be installed. To run on different ar
2020
sudo apt install bash docker.io python3 qemu-user-static
2121
```
2222

23+
For some sanitizer builds, the kernel's address-space layout randomization
24+
(ASLR) entropy can cause sanitizer shadow memory mappings to fail. When running
25+
the CI locally you may need to reduce that entropy by running:
26+
27+
```
28+
sudo sysctl -w vm.mmap_rnd_bits=28
29+
```
30+
2331
It is recommended to run the ci system in a clean env. To run the test stage
2432
with a specific configuration,
2533

ci/test/00_setup_env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export BASE_OUTDIR=${BASE_OUTDIR:-$BASE_SCRATCH_DIR/out}
6464
# The folder for previous release binaries.
6565
# This folder exists only on the ci guest, and on the ci host as a volume.
6666
export PREVIOUS_RELEASES_DIR=${PREVIOUS_RELEASES_DIR:-$BASE_ROOT_DIR/prev_releases}
67-
export CI_BASE_PACKAGES=${CI_BASE_PACKAGES:-build-essential pkgconf curl ca-certificates ccache python3 rsync git procps bison e2fsprogs cmake ninja-build}
67+
export CI_BASE_PACKAGES=${CI_BASE_PACKAGES:-build-essential pkgconf curl ca-certificates ccache python3-dev rsync git procps bison e2fsprogs cmake ninja-build}
6868
export GOAL=${GOAL:-install}
6969
export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_SCRATCH_DIR}/qa-assets}
7070
export CI_RETRY_EXE=${CI_RETRY_EXE:-"retry --"}

ci/test/00_setup_env_mac_cross.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ export LC_ALL=C.UTF-8
99
export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
1010

1111
export CONTAINER_NAME=ci_macos_cross
12-
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
13-
export HOST=x86_64-apple-darwin
12+
export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:trixie" # Check that https://packages.debian.org/trixie/clang (version 19, similar to guix) can cross-compile
13+
export HOST=arm64-apple-darwin
1414
export PACKAGES="clang lld llvm zip"
1515
export XCODE_VERSION=15.0
1616
export XCODE_BUILD_ID=15A240d
1717
export RUN_UNIT_TESTS=false
1818
export RUN_FUNCTIONAL_TESTS=false
1919
export GOAL="deploy"
20-
export BITCOIN_CONFIG="-DBUILD_GUI=ON -DREDUCE_EXPORTS=ON"
20+
export BITCOIN_CONFIG="-DBUILD_GUI=ON -DBUILD_KERNEL_LIB=ON -DREDUCE_EXPORTS=ON"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 2019-present 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 SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
10+
11+
export CONTAINER_NAME=ci_macos_cross_intel
12+
export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:trixie" # Check that https://packages.debian.org/trixie/clang (version 19, similar to guix) can cross-compile
13+
export HOST=x86_64-apple-darwin
14+
export PACKAGES="clang lld llvm zip"
15+
export XCODE_VERSION=15.0
16+
export XCODE_BUILD_ID=15A240d
17+
export RUN_UNIT_TESTS=false
18+
export RUN_FUNCTIONAL_TESTS=false
19+
export GOAL="deploy"
20+
export BITCOIN_CONFIG="-DBUILD_GUI=ON -DREDUCE_EXPORTS=ON"

ci/test/00_setup_env_mac_native.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@
66

77
export LC_ALL=C.UTF-8
88

9-
# Homebrew's [email protected] is marked as externally managed (PEP 668).
10-
# Therefore, `--break-system-packages` is needed.
119
export CONTAINER_NAME="ci_mac_native" # macos does not use a container, but the env var is needed for logging
12-
export PIP_PACKAGES="--break-system-packages zmq"
10+
export PIP_PACKAGES="--break-system-packages pycapnp zmq"
1311
export GOAL="install deploy"
1412
export CMAKE_GENERATOR="Ninja"
15-
export BITCOIN_CONFIG="-DBUILD_GUI=ON -DWITH_ZMQ=ON -DBUILD_KERNEL_LIB=ON -DBUILD_KERNEL_TEST=ON -DREDUCE_EXPORTS=ON -DCMAKE_EXE_LINKER_FLAGS='-Wl,-stack_size -Wl,0x80000'"
13+
export BITCOIN_CONFIG="-DBUILD_GUI=ON -DWITH_ZMQ=ON -DBUILD_KERNEL_LIB=ON -DBUILD_UTIL_CHAINSTATE=ON -DBUILD_KERNEL_TEST=ON -DREDUCE_EXPORTS=ON -DCMAKE_EXE_LINKER_FLAGS='-Wl,-stack_size -Wl,0x80000'"
1614
export CI_OS_NAME="macos"
1715
export NO_DEPENDS=1
1816
export OSX_SDK=""

0 commit comments

Comments
 (0)