955 Commits

Author SHA1 Message Date
Hennadii Stepanov
28160c1e3d Merge bitcoin/bitcoin#34421: ci: add Chimera Linux LTO config
d79249d279 ci: add chimera Linux LTO CI job (fanquake)

Pull request description:

  Adds a CI config based on using [Chimera Linux](https://chimera-linux.org/). This might be interesting for any of the following:
  * Chimera is based on LLVM & musl libc - we test both of these in isolation, but not together.
  * No GNU components. I don't think we have an existing Linux CI job that doesn't have a gcc/stdlibc++ install. This exercises the depends logic for a fully LLVM/Clang/lld only build, including building the native tools (related to #33902).
  * We don't currently have a job with LTO enabled (here using CMakes `CMAKE_INTERPROCEDURAL_OPTIMIZATION`, which is `-flto=thin` for LLVM/Clang). I think this is worth having generally (we do use LTO in some other places, like oss-fuzz). If runtime is too much of an issue, then it could also be dropped. (Chimera itself is also compiled with LTO).

  QT in depends doesn't build (#32744), so is excluded for now.

  Chimera has pointed out at least a few quirks, i.e #34390, #34408 and https://github.com/bitcoin/bitcoin/pull/29963#discussion_r2707922298.

ACKs for top commit:
  maflcko:
    lgtm ACK d79249d279
  hebasto:
    ACK d79249d279.

Tree-SHA512: 1174a7462bf2e7433a2c27a6cf398e94b05db42bb414629c71cf9f9a297ca269e173ae1b7517b30510b494b4397f918eef706d3c75c4286767c5557aeb6db4c7
2026-02-06 14:11:04 +00:00
merge-script
46e1288df2 Merge bitcoin/bitcoin#34498: iwyu: Fix patch to prefer <cstdint>
b65a3d8009 iwyu: Fix patch to prefer `<cstdint>` (Hennadii Stepanov)

Pull request description:

  The goal of the [patch](https://github.com/bitcoin/bitcoin/blob/master/ci/test/01_iwyu.patch) is to suggest C++ headers rather than their C counterparts. However, for fixed width integer types, the patched IWYU currently suggests `<cinttypes>` where `<cstdint>` is sufficient.

  This PR fixes this behavior.

ACKs for top commit:
  maflcko:
    lgtm ACK b65a3d8009
  furszy:
    utACK b65a3d8009
  willcl-ark:
    utACK b65a3d8009

Tree-SHA512: 695efdd44b92a642401738572e49c8b6591aa4463d387107fdf3d2f7c9c4b39f4097cb82413752caf9e8890dcca7246a894e562a1dd17023b05a7e455705beac
2026-02-06 13:37:14 +00:00
fanquake
d79249d279 ci: add chimera Linux LTO CI job 2026-02-06 12:03:18 +00:00
fanquake
322c4ec442 build: replace WERROR with CMAKE_COMPILE_WARNING_AS_ERROR
-Werror is added to the previous releases job, given it runs on Ubuntu
22.04, which uses an older CMake.

`--compile-no-warning-as-error` can be used, if needed, in future, to
suppress the `CMAKE_COMPILE_WARNING_AS_ERROR` behaviour from a CI
config.

CMAKE_COMPILE_WARNING_AS_ERROR was added to CMake in 3.24.
See https://cmake.org/cmake/help/latest/prop_tgt/COMPILE_WARNING_AS_ERROR.html.

Co-authored-by: willcl-ark <will8clark@gmail.com>
2026-02-05 16:39:14 +00:00
Hennadii Stepanov
b65a3d8009 iwyu: Fix patch to prefer <cstdint>
The goal of the patch is to suggest C++ headers rather than their C
counterparts. However, for fixed width integer types, the patched IWYU
currently suggests `<cinttypes>` where `<cstdint>` is sufficient.

This change fixes this behavior.
2026-02-04 08:28:10 +00:00
merge-script
b58eebf152 Merge bitcoin/bitcoin#34470: Bump leveldb subtree and remove UB workaround in CI
fad7d86d8d ci: Remove unused workaround after leveldb subtree bump (MarcoFalke)
2f2952c5f2 Squashed 'src/leveldb/' changes from cad64b151d..ab6c84e6f3 (MarcoFalke)

Pull request description:

  Bump leveldb subtree and remove UB workaround in CI. This also fixes a GCC-16 warning.

ACKs for top commit:
  l0rinc:
    code review ACK fad7d86d8d
  fanquake:
    ACK fad7d86d8d

Tree-SHA512: dccd53ca638f1acbd72187032d858453e1cc58b156a52e24356c075ac85be0db47d7b73965131b5fbc7b188cbc34cbfd72a8286e860c3b28258daaf5437546f2
2026-02-03 11:26:40 +00:00
merge-script
8bb277c123 Merge bitcoin/bitcoin#34481: Update secp256k1 subtree to latest master
d405713197 ci: use Alpine 3.23 (fanquake)
1cee0e4cd3 ci: detect apk usage generally (fanquake)
9d4c9b0035 Squashed 'src/secp256k1/' changes from 14e56970cb..57315a6985 (fanquake)

Pull request description:

  Updates the secp256k1 subtree to latest master (57315a6985), which includes https://github.com/bitcoin-core/secp256k1/pull/1813.

ACKs for top commit:
  maflcko:
    lgtm ACK d405713197
  hebasto:
    ACK d405713197.

Tree-SHA512: 6f01f85c309d7b823f41f215a9c856871dcd3d4113ac38cf2cf8e2f2c8a4c9d5f3c9f0e12b95cd9140045c66523eeb49aa536c0e91f9d17d5bf81fc95a2ad689
2026-02-03 11:11:18 +00:00
merge-script
a4941132d3 Merge bitcoin/bitcoin#34461: ci: Print verbose build error message in test-each-commit
bbbb78a4f2 ci: Print verbose build error message in test-each-commit (MarcoFalke)
2222dadabb ci: [refactor] Allow overwriting check option in run helper (MarcoFalke)

Pull request description:

  Currently, the build error in the test-each-commit task is not too nice. E.g. https://github.com/bitcoin/bitcoin/actions/runs/21509735101/job/61973587699#step:8:10464:

  ```
  ...
  [ 75%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/txvalidation_tests.cpp.o
  [ 75%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/txvalidationcache_tests.cpp.o
  [ 75%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/validation_block_tests.cpp.o
  [ 75%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/validation_chainstate_tests.cpp.o
  [ 75%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/validation_chainstatemanager_tests.cpp.o
  [ 76%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/validation_flush_tests.cpp.o
  [ 76%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/validation_tests.cpp.o
  [ 76%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/wallet_test_fixture.cpp.o
  [ 76%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/db_tests.cpp.o
  [ 76%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/coinselector_tests.cpp.o
  [ 76%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/coinselection_tests.cpp.o
  [ 76%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/feebumper_tests.cpp.o
  [ 76%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/group_outputs_tests.cpp.o
  [ 76%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/ismine_tests.cpp.o
  [ 76%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/psbt_wallet_tests.cpp.o
  [ 76%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/scriptpubkeyman_tests.cpp.o
  [ 76%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/spend_tests.cpp.o
  [ 76%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/wallet_rpc_tests.cpp.o
  [ 76%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/wallet_tests.cpp.o
  [ 76%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/wallet_transaction_tests.cpp.o
  [ 76%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/walletdb_tests.cpp.o
  [ 76%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/walletload_tests.cpp.o
  [ 76%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/ipc/test/ipc_tests.cpp.o
  [ 77%] Linking CXX executable ../../bin/test_bitcoin
  [ 87%] Built target test_bitcoin
  gmake: *** [Makefile:146: all] Error 2
  Command '['cmake', '--build', 'ci_build', '-j', '4']' returned non-zero exit status 2.
  error: cannot rebase: Your index contains uncommitted changes.
  warning: execution failed: git merge --no-commit origin/master && python3 ./.github/ci-test-each-commit-exec.py && git reset --hard
  and made changes to the index and/or the working tree.
  You can fix the problem, and then run

    git rebase --continue

  Error: Process completed with exit code 1.
  ```

  Fix it by just using the same approach that the other CI tasks are using:

  01651324f4/ci/test/03_test_script.sh (L143-L146)

ACKs for top commit:
  willcl-ark:
    ACK bbbb78a4f2

Tree-SHA512: ae54ee62f53e060ed42f76ca59daf7a017bd12495e171efed03d1f5dda969db4f7e2e2c9ed7a178ff5fa9a5baa55ab6a7b30b3ab6b81d5279fe937006ac8228f
2026-02-03 10:49:26 +00:00
MarcoFalke
fad7d86d8d ci: Remove unused workaround after leveldb subtree bump 2026-02-03 11:19:34 +01:00
merge-script
be35408c5a Merge bitcoin/bitcoin#34474: ci: update ccache to improve hitrate
7528d18796 ci: show more verbose ccache stats (will)
580e9eefe3 ci: bump CCACHE_MAXSIZE to 2G (will)

Pull request description:

  Currently some CI jobs don't have great ccache hitrates which we should try to improve: https://willcl-ark.github.io/bitcoin-core-ci-stats/graph/ccache/

  - bump ccache maxsize to 2GB in all jobs. We have 150GB shared cache to use, so this should be OK at maximum of 36GB total (current jobset).
  - print more verbose ccache stats in the CI logs

  The idea is that increasing the cache size to > 2x needed size should eliminate any cache thrashing which might be taking place on master builds when we save the cache. Additionally, larger caches result in more hits in general.

ACKs for top commit:
  maflcko:
    lgtm ACK 7528d18796

Tree-SHA512: ae00a05159e3f38d24aebc50a2576c5f11241b1196058a4ca2f5f78909795b891bef20cdc4412f512a2ba09cc9ec65afa5132ac0509b54845dd84f933528500c
2026-02-03 10:16:43 +00:00
will
7528d18796 ci: show more verbose ccache stats
...and inline function used only once
2026-02-03 09:49:52 +00:00
fanquake
d405713197 ci: use Alpine 3.23 2026-02-02 15:22:01 +00:00
fanquake
1cee0e4cd3 ci: detect apk usage generally
Rather than listing image names, which makes it less easy to
run custom CI jobs.
2026-02-02 15:21:53 +00:00
merge-script
9f8764c814 Merge bitcoin/bitcoin#34475: ci: Treat SHA1 LLVM signing key as warning
3c8f5e48f7 ci: Treat SHA1 LLVM signing key as warning (will)

Pull request description:

  The current SHA1 LLVM signing key is considered not secure since
  2026-02-01T00:00:00Z which makes this run fail when downloading
  packages.

  See: https://github.com/llvm/llvm-project/issues/153385

  Apply the fix from the issue to temporarily to treat this error as a
  warning, until the upstream key can be updated.

  This PR should be reverted once the upstream key is updated.

ACKs for top commit:
  hebasto:
    ACK 3c8f5e48f7, tested by running the "iwyu" CI job locally on Ubuntu 25.10 after burning all podman's caches.

Tree-SHA512: fbccf98bfd73cb338670f1ceea994d277d746acbc88b9b90a403d9a59d82abda0f3ba34c4d484b70926340c2d0c873259f930c36ccd4f9d18bb1d22d49ee70c4
2026-02-02 12:32:27 +00:00
will
3c8f5e48f7 ci: Treat SHA1 LLVM signing key as warning
The current SHA1 LLVM signing key is considered not secure since
2026-02-01T00:00:00Z which makes this run fail when downloading
packages.

See: https://github.com/llvm/llvm-project/issues/153385

Apply the fix from the issue to temporarily to treat this error as a
warning, until the upstream key can be updated.

This PR should be reverted once the upstream key is updated.
2026-02-02 11:55:01 +00:00
merge-script
5cb4cf9b42 Merge bitcoin/bitcoin#34036: contrib: update macOS SDK to Xcode-26.1.1-17B100
a89e1618dd contrib: update macOS SDK to Xcode-26.1.1-17B100 (fanquake)
57a778ed25 depends: use -Xclang -fno-cxx-modules in macOS cross build (fanquake)

Pull request description:

  Updates the macOS SDK used for Guix builds to `Xcode-26.1.1-17B100`.
  Closes #34034.

ACKs for top commit:
  hebasto:
    ACK a89e1618dd.
  sedited:
    ACK a89e1618dd
  janb84:
    concept ACK a89e1618dd

Tree-SHA512: 4f8f9afee6fca594a0d30fbb3c150f5ed120b40f707954678ff69951bc806acc154aed4b5986d8642160f7b37523933c87c5734f296ff881555093188e29549e
2026-02-02 10:45:06 +00:00
will
580e9eefe3 ci: bump CCACHE_MAXSIZE to 2G
With 15 runners we get 150GB of cache space to use, and we currently
have 18 jobs using ccache.

Although each run only generates ~ 200-300 MB of cache data on each run,
the small the small size may be contributing to poor hitrate.

Bump ccache to 2GB per job ~ --> 36GB of the total 150GB cache space to
try and reduce any thrashaing and generally increase hitrate.
2026-02-02 09:50:19 +00:00
Hennadii Stepanov
1bf3842223 ci, iwyu: Fix warnings in src/univalue and treat them as errors 2026-01-31 10:41:50 +00:00
merge-script
101daa4163 Merge bitcoin/bitcoin#34338: ci, iwyu: Fix warnings in src/zmq and treat them as errors
efcbf79448 ci, iwyu: Fix warnings in `src/zmq` and treat them as errors (Hennadii Stepanov)

Pull request description:

  This PR [continues](https://github.com/bitcoin/bitcoin/pull/33725#issuecomment-3466897433) the ongoing effort to enforce IWYU warnings.

  See [Developer Notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#using-iwyu).

  Additionally, this adds a new include category to `src/.clang-format`.

ACKs for top commit:
  maflcko:
    review ACK efcbf79448 🐼
  janb84:
    re ACK efcbf79448
  sedited:
    ACK efcbf79448

Tree-SHA512: 5396719d4a9f7fff7b57be7284af5b25ff055edbaba417187e29106c9e310f19f361fbeea74e2448ef1e883a8658028762a38664858a863e5019fcb0cbb346a2
2026-01-31 09:37:03 +01:00
MarcoFalke
2222dadabb ci: [refactor] Allow overwriting check option in run helper
Also, use str(e) consistently in all run helpers.

This refactor does not change any behavior.

This can be reviewed by checking that all instances are exactly
identical code now:
$ git grep --function-context 'def run(cmd'
2026-01-30 12:57:58 +01:00
MarcoFalke
fad2876ec3 ci: Always print low ccache hit rate notice 2026-01-29 21:35:29 +01:00
fanquake
a89e1618dd contrib: update macOS SDK to Xcode-26.1.1-17B100 2026-01-29 16:27:04 +00:00
Hennadii Stepanov
efcbf79448 ci, iwyu: Fix warnings in src/zmq and treat them as errors 2026-01-29 14:38:35 +00:00
merge-script
8f9ad534a5 Merge bitcoin/bitcoin#34352: ci, iwyu: Fix warnings in src/primitives and treat them as errors
fdc9fe2da6 ci, iwyu: Fix warnings in `src/primitives` and treat them as errors (Hennadii Stepanov)

Pull request description:

  This PR [continues](https://github.com/bitcoin/bitcoin/pull/33725#issuecomment-3466897433) the ongoing effort to enforce IWYU warnings.

  See [Developer Notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#using-iwyu).

ACKs for top commit:
  maflcko:
    review ACK fdc9fe2da6 📀
  janb84:
    ACK fdc9fe2da6
  sedited:
    ACK fdc9fe2da6

Tree-SHA512: d290545c7aab477b4a5bf121b694899a78e0526be72efa31fa4205b0fd840e6e8240d32f9134a18c9dc58c5f91e7847d7f20ca34f8d2edc4d541ac858ec0dccc
2026-01-28 17:08:34 +01:00
fanquake
ddae1b4efa ci: remove gnu-getopt usage
This is used for argument parsing in the retry script, however we don't
use the script with any arguments. So remove the unused code, and the
dependency on gnu-getopt.

This came up in the context of adding new CI jobs, where gnu-getopt
might not be available, or working properly. It seemed easier to just
remove the unused code, than look for more workarounds.
2026-01-27 16:20:55 +00:00
merge-script
a6e8cd306e Merge bitcoin/bitcoin#34310: iwyu: Add missed line to IWYU patch
de509c6df9 iwyu: Add missed line to IWYU patch (Hennadii Stepanov)

Pull request description:

  This PR makes IWYU suggest `<cassert>` over `<assert.h>`.

  Fixes https://github.com/bitcoin/bitcoin/issues/34237.

ACKs for top commit:
  maflcko:
    lgtm ACK de509c6df9

Tree-SHA512: edba91eaf36992f684be2920f5da8c13a25ba6d79b879b92193e2af106cd454a64d7c4cf9dabc25675490df9edbccff1fd54c9f393e984a3a7a628b1c65f6c53
2026-01-20 14:57:09 +00:00
Hennadii Stepanov
fdc9fe2da6 ci, iwyu: Fix warnings in src/primitives and treat them as errors 2026-01-20 14:46:00 +00:00
MarcoFalke
faf66673ac refactor: [move-only] Merge core_io module
This can be reviewed with the git option
--color-moved=dimmed-zebra
2026-01-19 12:57:16 +01:00
Hennadii Stepanov
a5a8c4139c ci, iwyu: Fix warnings in src/kernel and treat them as errors 2026-01-16 14:25:45 +00:00
Hennadii Stepanov
de509c6df9 iwyu: Add missed line to IWYU patch
This makes IWYU suggest `<cassert>` over `<assert.h>`.
2026-01-15 17:23:09 +00:00
MarcoFalke
fa2959e16d test: Fail on self-check warnings in test_runner.py 2026-01-14 10:49:11 +01:00
merge-script
8e8d8f29a8 Merge bitcoin/bitcoin#33775: guix: use GCC 14.3.0 over 13.3.0
2a746500fa ci: migrate some jobs to Debian Trixie, use GCC 14 (fanquake)
fb0e6edfe8 guix: Apply SSA generation patch to maintain determinism (Mara van der Laan)
34909799fe guix: use GCC 14.3.0 over 13.3.0 (fanquake)
47be9122a7 guix: disable gprofng in GCC (fanquake)
ea29329eb7 guix: build GCC with --enable-host-bind-now (fanquake)
6f54e267d0 guix: disable libquadmath in GCC (fanquake)
7735901ed2 guix: disable building libgomp in GCC (fanquake)

Pull request description:

  Switching to using GCC 14.x for release builds has come up multiple times recently. It will eventually be needed for #25573, and could also be useful for #30210.

ACKs for top commit:
  hebasto:
    ACK 2a746500fa. I have reviewed the code and it looks OK. The new GCC patch looks reasonable.
  theuni:
    utACK 2a746500fa
  sedited:
    ACK 2a746500fa

Tree-SHA512: 56912bed19386f06d52fb94e0ef6d96f5415ab2de8b5e94890806d7cc0b937a3c4b11cc161aa2e06ca2fd3c392ef7501c91688e0897e1c1c51aafa963f3e50d9
2026-01-13 15:32:23 -08:00
Ava Chow
c352d3c51c Merge bitcoin/bitcoin#34168: qa: Require --exclude for each excluded test
c5825d4b7f qa: Require `--exclude` for each excluded test (Hennadii Stepanov)

Pull request description:

  This PR allows a long `--exclude ...` argument in the `test/functional/test_runner.py` invocation to be split across multiple lines, with optional per-line explanatory comments. I found this useful for the CI scripts in https://github.com/hebasto/bitcoin-core-nightly.

ACKs for top commit:
  l0rinc:
    tested ACK c5825d4b7f
  maflcko:
    review ACK c5825d4b7f 🛄
  achow101:
    ACK c5825d4b7f
  rkrux:
    ACK c5825d4b7f

Tree-SHA512: bcf42848516197978b65df8a8bc68e036a62c9afc6158274eac74a325dc01991eb063a042f940c53ea15a7feb18d4bdfc45d8c71f0ef20c76140b12e07ba3ac5
2026-01-13 14:40:43 -08:00
fanquake
2a746500fa ci: migrate some jobs to Debian Trixie, use GCC 14 2026-01-06 10:19:00 +00:00
merge-script
755f0900a2 Merge bitcoin/bitcoin#34136: test: Allow mempool_updatefromblock.py to run on 32-bit
fac5a1b10a test: Allow mempool_updatefromblock.py to run on 32-bit (MarcoFalke)

Pull request description:

  The number of dropped parent transactions in the `test_max_disconnect_pool_bytes` test was hard-coded to `2`.

  This happens to work fine on 64-bit for now. However, it seems to fail on 32-bit (https://github.com/bitcoin/bitcoin/issues/34108).

  I don't think we care about the exact number, as long as it is at least `1`.

  So hard-code `1` for an initial sanity check, and then calculate the exact value at runtime via `len(mempool) // 2`.

  Also, enable the functional tests in 32-bit CI, to confirm the regression test.

  Fixes https://github.com/bitcoin/bitcoin/issues/34108

ACKs for top commit:
  bensig:
    ACK fac5a1b10a
  instagibbs:
    ACK fac5a1b10a

Tree-SHA512: 8d468f306d95e52cbfac1803293e3b8e9575c9010200010c7833382112509e0d51827dc9681b0b68eeae742af2c14d12da5fd4cf0e1d871a02f91fc80e6720d1
2026-01-05 14:51:24 +00:00
Hennadii Stepanov
c5825d4b7f qa: Require --exclude for each excluded test
Co-authored-by: Lőrinc <pap.lorinc@gmail.com>
2026-01-02 13:24:56 +00:00
Hennadii Stepanov
5bbc7c8cc1 Merge bitcoin/bitcoin#33810: ci: Add IWYU job
56750c4f87 iwyu, clang-format: Sort includes (Hennadii Stepanov)
2c78814e0e ci: Add IWYU job (Hennadii Stepanov)
94e4f04d7c cmake: Fix target name (Hennadii Stepanov)
0f81e00519 cmake: Make `codegen` target dependent on `generate_build_info` (Hennadii Stepanov)
73f7844cdb iwyu: Add patch to prefer C++ headers over C counterparts (Hennadii Stepanov)
7a65437e23 iwyu: Add patch to prefer angled brackets over quotes for includes (Hennadii Stepanov)

Pull request description:

  This PR separates the IWYU checks into its own CI job to provide faster feedback to developers. No other changes are made to the treatment of IWYU warnings. The existing “tidy” CI job will no longer run IWYU.

  See also the discussion of https://github.com/bitcoin/bitcoin/pull/33779, specifically this [comment](https://github.com/bitcoin/bitcoin/pull/33779#issuecomment-3491515263):
  > Maybe a better approach would be to run the enforced sections in a separate, faster job? Some of the linters are already a bit annoying to invoke locally, so I usually just run the lint job. Doing the same for the includes seems fine to me.

  Based on ideas from https://github.com/bitcoin/bitcoin/pull/32953.

ACKs for top commit:
  maflcko:
    review ACK 56750c4f87 🌄
  sedited:
    ACK 56750c4f87

Tree-SHA512: af15326b6d0c5d1e11346ac64939644936c65eb9466cd1a17ab5da347d39aef10f7ab33b39fbca31ad291b0b4b54639b147b24410f4f86197e4a776049882694
2025-12-22 17:38:50 +00:00
MarcoFalke
fac5a1b10a test: Allow mempool_updatefromblock.py to run on 32-bit 2025-12-22 11:54:59 +01:00
TheCharlatan
d3a479cb07 kernel: Move BlockInfo to a kernel file
This should avoid having to include interfaces/chain.h from a kernel
module. interfaces/chain.h in turn includes a bunch of non-kernel
headers, that break the desired library topology and might introduce
entanglement regressions.
2025-12-21 10:24:36 +01:00
TheCharlatan
d69a582e72 kernel: Remove some unnecessary non-kernel includes
Specifically gets rid of batchpriority, chainparams, script/sign.h and
system includes.

Also take the opportunity of cleaning up the headers for the effected
files and adding them to the iwyu-enforced set.
2025-12-21 10:24:09 +01:00
merge-script
c80fd910f9 Merge bitcoin/bitcoin#33732: ci: Call docker exec from Python script to fix word splitting
fa336053aa Move ci_exec to the Python script (MarcoFalke)
fa83555d16 ci: Require rsync to pass (MarcoFalke)
eeee02ea53 ci: Untangle CI_EXEC bash function (MarcoFalke)
fa21fd1dc2 ci: Move macos snippet under DANGER_RUN_CI_ON_HOST (MarcoFalke)
fa37559ac5 ci: Document the retry script in PATH (MarcoFalke)
666675e95f ci: Move folder creation and docker kill to Python script (MarcoFalke)

Pull request description:

  The remaining `ci/test/02_run_container.sh` is fine, but has a bunch of shellcheck SC2086 word splitting violations.

  This is fine currently, because the only place that needed them had additional escaping, and all other commands happened to split fine on spaces.

  However, this may change in the future. So fix it now, by rewriting it in Python, which is recommended in the dev notes.

ACKs for top commit:
  frankomosh:
    Code Review ACK [fa33605](fa336053aa)
  m3dwards:
    ACK fa336053aa

Tree-SHA512: 472decb13edca75566dffe49b9b3f554ab977fa60ec7902d5a060fe53381aee8606a10ff0c990a62ee2454dc6d9430cc064f58320b9043070b7bf08845413bf4
2025-12-19 15:40:27 +00:00
Hennadii Stepanov
56750c4f87 iwyu, clang-format: Sort includes 2025-12-17 20:29:36 +00:00
Hennadii Stepanov
2c78814e0e ci: Add IWYU job
The change in `src/crypto/hex_base.cpp` is because GCC 14 is not
affected by an IWYU bug.
See: https://github.com/include-what-you-use/include-what-you-use/issues/1763.
2025-12-17 20:29:25 +00:00
Hennadii Stepanov
73f7844cdb iwyu: Add patch to prefer C++ headers over C counterparts 2025-12-17 20:28:55 +00:00
Hennadii Stepanov
7a65437e23 iwyu: Add patch to prefer angled brackets over quotes for includes 2025-12-17 20:28:42 +00:00
merge-script
9a29b2d331 Merge bitcoin/bitcoin#33857: doc: Add x86_64-w64-mingw32ucrt triplet to depends/README.md
ec8eb013a9 doc: Add `x86_64-w64-mingw32ucrt` triplet to `depends/README.md` (Hennadii Stepanov)
48496caa12 ci: Remove redundant `DEP_OPTS` from “Windows-cross UCRT” job (Hennadii Stepanov)

Pull request description:

  This PR is part of the ongoing effort to migrate to the modern UCRT runtime for cross-compiled Windows binaries, including release builds.

  For more details about this migration, see:
  - https://github.com/bitcoin/bitcoin/issues/30210
  - https://github.com/bitcoin/bitcoin/pull/33593
  - https://github.com/bitcoin/bitcoin/pull/33764

  Can be tested on the following systems:
  -  Debian Trixie x86_64 (requires the [`g++-mingw-w64-ucrt64`](https://packages.debian.org/trixie/g++-mingw-w64-ucrt64) package, as documented).
  -  Fedora 42 or 43 (requires the [`ucrt64-gcc-c++`](https://packages.fedoraproject.org/pkgs/mingw-gcc/ucrt64-gcc-c++/) package).

  Also see related upstream issues:
  - https://bugs.launchpad.net/ubuntu/+source/gcc-mingw-w64/+bug/2132114
  - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1121403

ACKs for top commit:
  m3dwards:
    ACK ec8eb013a9
  hodlinator:
    ACK ec8eb013a9

Tree-SHA512: 26e6e0354fedd8cc79d186b519124c306a7de328ced7247804c6e6d546e9c71cd5b92af878ab0f9a3c1e506a339944acaeb0ac99cd56bed896fd77b952788ae0
2025-12-03 13:50:19 +00:00
merge-script
af0e6a65c9 Merge bitcoin/bitcoin#33702: contrib: Remove brittle, confusing and redundant UTF8 encoding from Python IO
fad6118586 test: Fix "typo" in written invalid content (MarcoFalke)
fab085c15f contrib: Use text=True in subprocess over manual encoding handling (MarcoFalke)
fa71c15f86 scripted-diff: Bump copyright headers after encoding changes (MarcoFalke)
fae612424b contrib: Remove confusing and redundant encoding from IO (MarcoFalke)
fa7d72bd1b lint: Drop check to enforce encoding to be specified in Python scripts (MarcoFalke)
faf39d8539 test: Clarify that Python UTF-8 mode is the default today for most systems (MarcoFalke)
fa83e3a81d lint: Do not allow locale dependent shell scripts (MarcoFalke)

Pull request description:

  Historically, there was an attempt via `test/lint/lint-python-utf8-encoding.py` to enforce explicit UTF8 in every Python IO statement (`open`, `subprocess`, ...). However, the lint check has many problems:

  * The check is incomplete and many IO statements lack the explicit UTF8 specification.
  * It was added at a time when some systems were not UTF8 by default.
  * The check is brittle, as it depends on a fragile regex.

  In theory, now that the minimum Python version is 3.10 (since commit 2123c94448), the check could be replaced by `PYTHONWARNDEFAULTENCODING=1` from https://docs.python.org/3/whatsnew/3.10.html#optional-encodingwarning-and-encoding-locale-option. However, this comes with many other problems:

  * All our Python scripts already assume and require UTF8 to be set externally. On almost all modern systems, this is already the default. Some Windows versions do not have UTF8 by default and require `PYTHONUTF8=1` to be set for the tests to run already today (with or without the changes in this pull). Also, the CI and many other Bash scripts force UTF8 via `LC_ALL`. Finally, Python 3.15 will likely enable UTF8 on *all* systems by default, per https://peps.python.org/pep-0686/#abstract.
  * So adding UTF8 to every single IO call is redundant, verbose, and confusing, given that it is the expected default.

  So fix all issues, by:

  * Removing the `test/lint/lint-python-utf8-encoding.py` check.
  * Removing the encoding on the individual IO calls.
  * Clarifying the existing docs around the existing UTF8 requirement and assumption.

  Obviously, every IO call is still free to specify UTF8 or any other encoding explicitly, if there is a documented need for it in the future.

ACKs for top commit:
  theStack:
    re-ACK fad6118586
  laanwj:
    Re-ACK fad6118586

Tree-SHA512: 78025ea3508597d2299490347614f0ee3e4c66e3ba559ff50e498045a9c8bbd92f3a5ced18719d8fcebbd1e47bdbb56a0c85a5b73b425adb0ea4f02fe69c3149
2025-12-03 09:54:47 +00:00
Hennadii Stepanov
48496caa12 ci: Remove redundant DEP_OPTS from “Windows-cross UCRT” job
GCC-based tools already follow the standard naming convention for the
`x86_64-w64-mingw32ucrt` target.
2025-11-30 11:27:17 +00:00
merge-script
f6acbef108 Merge bitcoin/bitcoin#33764: ci: Add Windows + UCRT jobs for cross-compiling and native testing
2e27bd9c3a ci: Add Windows + UCRT jobs for cross-compiling and native testing (Hennadii Stepanov)
bd130db994 ci: Rename items specific to Windows + MSVCRT (Hennadii Stepanov)

Pull request description:

  This PR is part of the ongoing effort to migrate to the modern UCRT runtime for cross-compiled Windows binaries, including release builds.

  For more details about this migration, see:
  - https://github.com/bitcoin/bitcoin/issues/30210
  - https://github.com/bitcoin/bitcoin/pull/33593

  MSVCRT-related CI jobs should be removed from the CI framework once the migration to UCRT is complete.

ACKs for top commit:
  maflcko:
    review ACK 2e27bd9c3a 🖊
  fanquake:
    ACK 2e27bd9c3a

Tree-SHA512: 222ca5e54646bcce9db6e20191d5891e988274e18b2f30085de6435a3b288a9d0fc414e8f76342e275ae58ee6603f751933d1faa8bdff446edf2695091f8ca4c
2025-11-28 16:42:44 +00:00
fanquake
c1213a35ab macdeploy: disable compression in macOS gen-sdk script
Starting with Python 3.11, Pythons gzip might delegate to zlib.
Depending on the OS, i.e Ubuntu vs Fedora, the underlying zlib
implementation might differ, resulting in different output.

For now, or until a better solution exists, disable compression. This
results in the SDK increasing in size to ~157mb. Which is not
unreasonable, to regain determinism (and would be significantly worse
without the previous commit).

See: https://docs.python.org/3/library/gzip.html#gzip.compress

Co-authored-by: stickies-v <stickies-v@protonmail.com>
2025-11-26 11:07:48 +00:00