46690 Commits

Author SHA1 Message Date
MarcoFalke
fa0ce4c148
ci: Re-enable LINT_CI_SANITY_CHECK_COMMIT_SIG
With the move from cirrus-ci to GHA, the CIRRUS_REPO_FULL_NAME env var
was always unset, never triggering the sanity check.

Fix this by introducing a new vendor-agnostic env var and setting it
properly.
2025-11-18 20:15:06 +01:00
MarcoFalke
faa0973de2
ci: [refactor] Rename CIRRUS_PR env var to LINT_CI_IS_PR
The CIRRUS_PR env var was cirrus-specific and using a provider-agnostic
name makes more sense.

Also, enable pipefail, while touching this file.

This refactor is needed for the next commit.
2025-11-18 20:15:00 +01:00
MarcoFalke
fa1dacaebe
ci: Move lint exec snippet to stand-alone py file
Moving the python code out of the yaml string makes it easier to lint,
format, and edit.

This can be reviewed with the git options:

--color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
2025-11-17 17:34:27 +01:00
merge-script
ead849c9f1
Merge bitcoin/bitcoin#33886: test: Remove tests violating hardened std::span
fadb4f63cb0f0b544bc95e48cb42c7636c1dec15 test: Remove tests violating hardened std::span (MarcoFalke)

Pull request description:

  Also, add a test for creating a CScript from an empty byte vector.

  To test: `rm -rf ./bld-cmake && cmake -B ./bld-cmake  -DCMAKE_C_COMPILER='clang' -DCMAKE_CXX_COMPILER='clang++;-stdlib=libc++;-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG' -DBUILD_GUI=OFF -DBUILD_FUZZ_BINARY=OFF -DBUILD_BENCH=OFF -DBUILD_KERNEL_LIB=ON -DENABLE_WALLET=OFF -DENABLE_IPC=OFF && cmake --build ./bld-cmake --parallel $( nproc ) && valgrind --tool=none ./bld-cmake/bin/test_kernel --catch_system_error=no`

  Before:

  ```
  /cxx_build/include/c++/v1/span:451: libc++ Hardening assertion __count == 0 || std::to_address(__first) != nullptr failed: passed nullptr with non-zero length in span's constructor (iterator, len)
  ```

  After: (Passes)

ACKs for top commit:
  TheCharlatan:
    ACK fadb4f63cb0f0b544bc95e48cb42c7636c1dec15
  stickies-v:
    ACK fadb4f63cb0f0b544bc95e48cb42c7636c1dec15

Tree-SHA512: 47c2ee975b82978bbb226b47cde337dce5a7e25bc1d70c31f34b9a9ff38477609764c267e47ac5fd71a578fb2b2b135c698bb02dae1777a87bcc4079dcd278ef
2025-11-17 14:00:05 +00:00
merge-script
c03081fdb4
Merge bitcoin/bitcoin#33776: ci: Lint follow-ups
fae3618fd6c82dfcea2f296caa16a79182b32059 ci: Annotate all check runs with the pull request number (MarcoFalke)
faf05d637d674d945704577ab785dff0f9a6d80f ci: Retry lint image building once after failure (MarcoFalke)
fac4f6de28e7e477e005c02ddcfbe07cb27441a4 ci: Rewrite lint task Bash snippet to Python (MarcoFalke)
fa0d37a579853c402b615ecadb5c91e677180337 ci: Rewrite Bash to check inputs to Python (MarcoFalke)

Pull request description:

  This contains a few follow-ups to https://github.com/bitcoin/bitcoin/pull/33744:

  * Rewrite the actions Bash snippet to Python. I've confirmed it still works in https://github.com/maflcko/bitcoin-core-with-ci/actions/runs/19067932430 (scroll down).
  * Add a lint-build retry to avoid issues such as https://github.com/bitcoin/bitcoin/issues/33640 for the lint task as well.
  * Finally, run the `debug_pull_request_number_str` annotation on all checks, to ensure they are present even when GitHub deletes annotations on a re-run. For example, the initial attempt https://github.com/bitcoin/bitcoin/actions/runs/19041534107/attempts/1?pr=33772 has the annotations, and the lint re-run has them removed: https://github.com/bitcoin/bitcoin/actions/runs/19041534107?pr=33772

ACKs for top commit:
  m3dwards:
    ACK fae3618fd6c82dfcea2f296caa16a79182b32059
  willcl-ark:
    ACK fae3618fd6c82dfcea2f296caa16a79182b32059

Tree-SHA512: 6db147ccee622b7a640703f7e916ea662a8e42978f633046f22f8540017196250ef7771b28cd6e502368f1f3fe52b7524de0a3443f25c9659f524b4c9286ad0d
2025-11-17 12:35:17 +00:00
MarcoFalke
fadb4f63cb
test: Remove tests violating hardened std::span 2025-11-17 13:12:08 +01:00
merge-script
6e21558160
Merge bitcoin/bitcoin#33869: refactor: Avoid -W*-whitespace in git archive
fa95353902b7a6f73f094e78106088ab3c16ce14 ci: Run macos tasks in a git archive, not git checkout (MarcoFalke)
faf99ae379636d6ef8316ffb2efaa61896343de9 refactor: Avoid -W*-whitespace in git archive (MarcoFalke)

Pull request description:

  Otherwise, compilation with GCC-15+ will warn about it:

  ```
  src/clientversion.cpp:33:79: error: trailing whitespace [-Werror=trailing-whitespace=]
     33 | //! git will put "#define GIT_COMMIT_ID ..." on the next line inside archives.
  ```

  Follow-up to https://github.com/bitcoin/bitcoin/pull/32482#issuecomment-3522280482

  Can be tested via `git archive --output=/tmp/a.tar HEAD`

ACKs for top commit:
  fanquake:
    ACK fa95353902b7a6f73f094e78106088ab3c16ce14

Tree-SHA512: 73940ffc0fd83db557275bd5e993a3c47c5397682a1188447c48e077ead597ba0fc3e5ef9da7b746746ff04a26022ce35ac10768888bbd4707f25b799af43e45
2025-11-17 11:36:47 +00:00
merge-script
c8715aca95
Merge bitcoin/bitcoin#33247: build: Remove CMAKE_SKIP_BUILD_RPATH and SKIP_BUILD_RPATH settings
2594d5a189e52052c2019faccaa47f2affdc48e1 build: Remove CMAKE_SKIP_BUILD_RPATH and SKIP_BUILD_RPATH settings (Henry Romp)

Pull request description:

  Remove CMAKE_SKIP_BUILD_RPATH and SKIP_BUILD_RPATH settings that are no longer needed after reordering the Guix build script to perform binary checks after installation.

  This PR also removes the unused CMake maintenance targets (`check-security` and `check-symbols`) and updates the Guix security checks to include binaries in the `libexec/` directory (added in PR #31679).

ACKs for top commit:
  purpleKarrot:
    ACK 2594d5a189e52052c2019faccaa47f2affdc48e1
  hebasto:
    ACK 2594d5a189e52052c2019faccaa47f2affdc48e1.

Tree-SHA512: ed451a298f5aae05c177b0033b092faaa7536caeaa3d84da9b8b611e2aa905e1dd337e57aef0efd69ce6ce6ac0cf77dc57adf175079b95bf53dd96d5d0c8118b
2025-11-17 11:00:03 +00:00
merge-script
ee5de407e3
Merge bitcoin/bitcoin#33537: guix: build bitcoin-qt with static libxcb & utils
96963b888e5a10f4024fa0449c60c02e3bed6245 depends: static libxcb (fanquake)
ad06843fab06f794c98b54b6b4f47d38611a7c80 depends: avoid qdbusviewer in Qt build (fanquake)
6848ed56dc5f2c0f7cf8d67271896f81116352ec depends: apply Qt patches to fix static libxcb use (fanquake)
5f1b016bebd2fa13dd794ed633ee66d5155d5e12 depends: static libxcb-util-image (fanquake)
98a2fbbe70b87ea124aa807c7271a6a0f7c27a11 depends: static libxkbcommon (fanquake)
1412baf77295345f0649e0a6c352f516595cb21f depends: static libxcb-util-wm (fanquake)
a4009dadf466e1da41c5622d5bfc6d670d16b6e6 depends: static libxcb-keysyms (fanquake)
bcfb8679b3bab532d3075d6b643abeac9c4ab981 depends: static libxcb-render-util (fanquake)

Pull request description:

  Related to https://github.com/bitcoin/bitcoin/pull/33434.
  Tested on:
  * Fedora 42: https://github.com/bitcoin/bitcoin/pull/33537#pullrequestreview-3455373185.
  * Ubuntu 24.04: https://github.com/bitcoin/bitcoin/pull/33537#issuecomment-3533276038.
  * Debian 13.x: https://github.com/bitcoin/bitcoin/pull/33537#issuecomment-3540923567.

ACKs for top commit:
  hebasto:
    re-ACK 96963b888e5a10f4024fa0449c60c02e3bed6245, rebased, addressed my comments and adjusted formatting in `symbol-check.py` since my recent [review](https://github.com/bitcoin/bitcoin/pull/33537#pullrequestreview-3456081353).
  willcl-ark:
    utACK 96963b888e5a10f4024fa0449c60c02e3bed6245
  TheCharlatan:
    ACK 96963b888e5a10f4024fa0449c60c02e3bed6245

Tree-SHA512: e947bc5b5cb0ec97963bc3f451f8fa6afb2e3699435370798d7a2aaefea7445cbe031d3b642f946f936829fa4cbe4efd2bfacd6b15739da15c3596cc4776b362
2025-11-17 10:32:46 +00:00
merge-script
024a787350
Merge bitcoin/bitcoin#33876: doc: Update NetBSD Build Guide
c29eaeeaf9377b1e3c33e82d29597790a5388403 doc: Update NetBSD Build Guide (Hennadii Stepanov)

Pull request description:

  The `py310-zmq` binary package is not available by default on NetBSD 10.1. It has been updated to `py313-zmq`, and the `python310` package is updated accordingly.

  See: https://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/index-all.html.

ACKs for top commit:
  fanquake:
    ACK c29eaeeaf9377b1e3c33e82d29597790a5388403

Tree-SHA512: 6924a974d6ed494609c789cc3f28cf173af3a37b940520ad7b169eff87e30af8346fec07e46f8bffe14a329060c41ac46d46b91910a00994cdf8a7ace8391d1c
2025-11-17 10:23:41 +00:00
Hennadii Stepanov
c66e988754
Merge bitcoin/bitcoin#33865: cmake: Specify Windows plugin path in test_bitcoin-qt property
0dd8d5c237e2fdb0168d9ca644e7f2f5a8b6ed72 cmake: Specify Windows plugin path in `test_bitcoin-qt` property (Hennadii Stepanov)

Pull request description:

  This PR simplifies testing on Windows by removing the need to set the `QT_PLUGIN_PATH` environment variable for different build configurations. For example, the paths might otherwise be:
  - `C:/Users/hebasto/dev/bitcoin/build/vcpkg_installed/x64-windows/Qt6/plugins/` for "Release"
  - `C:/Users/hebasto/dev/bitcoin/build/vcpkg_installed/x64-windows/debug/Qt6/plugins/` for "Debug"

ACKs for top commit:
  purpleKarrot:
    ACK 0dd8d5c237e2fdb0168d9ca644e7f2f5a8b6ed72

Tree-SHA512: 0418b8fa4d74ca500aae9e36e56ebcefb566d2ac04a9d22e17d309400ad38dd5a6e75f0195c680796b761fb145444c33336b64180f15c6b1125fe190d58396b6
2025-11-15 16:19:34 +00:00
Hennadii Stepanov
c29eaeeaf9
doc: Update NetBSD Build Guide
The `py310-zmq` binary package is not available by default on
NetBSD 10.1. It has been updated to `py313-zmq`, and the `python310`
package is updated accordingly.

See: https://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/index-all.html.
2025-11-15 13:11:49 +00:00
merge-script
e221b25246
Merge bitcoin/bitcoin#33860: depends: drop Qt patches
3e9aca6f1b52169eed386849900a400e8cea431e depends: drop qtbase-moc-ignore-gcc-macro.patch qt patch (fanquake)
0da5a82700e9de825e72373f29c16e0e5418a63f depends: drop unused qt patch (fanquake)

Pull request description:

  Drop one patch that was already unused, and one that compilation succeeds without.

ACKs for top commit:
  TheCharlatan:
    ACK 3e9aca6f1b52169eed386849900a400e8cea431e

Tree-SHA512: 4416348c80d8af8530d46d4f5a02a1170f7a4e2fc8ef88cffb8888fa913ed86d1bef10efb437434ebcdac1b1ed23a3669c1ba654cf6f4395dc0a73192fe0024f
2025-11-14 09:52:36 +00:00
MarcoFalke
fa95353902
ci: Run macos tasks in a git archive, not git checkout
This confirms that compiling this way is possible at all.
2025-11-13 15:56:45 +01:00
MarcoFalke
fae3618fd6
ci: Annotate all check runs with the pull request number
On check re-runs the annotations are discarded, so all check runs
require the number to be set.
2025-11-13 12:07:55 +01:00
MarcoFalke
faf05d637d
ci: Retry lint image building once after failure
The same was done for the other CI tasks in commit fa6aa9f42fa. This may
guard against intermittent network issues to download the base image or
packages ...
2025-11-13 11:40:03 +01:00
fanquake
96963b888e
depends: static libxcb
Co-authored-by: tobtoht <tob@featherwallet.org>
2025-11-13 10:12:08 +00:00
fanquake
ad06843fab
depends: avoid qdbusviewer in Qt build
This is unused, and causes issues with static builds.
2025-11-13 10:12:08 +00:00
fanquake
6848ed56dc
depends: apply Qt patches to fix static libxcb use
Co-authored-by: tobtoht <tob@featherwallet.org>
2025-11-13 10:12:04 +00:00
merge-script
dfde31f2ec
Merge bitcoin/bitcoin#33864: scripted-diff: fix leftover references to policy/fees.h
b0a38871546dfcdd3a578c1ae4c28a88b6ee32d5 scripted-diff: fix leftover references to `policy/fees.h` (ismaelsadeeq)

Pull request description:

  Fixes #33863

  ryanofsky wrote
  > I still see some references to the src/policy/fees.h file removed by this PR:

  ```
  $ git grep -n policy/fees.h
  src/wallet/rpc/spend.cpp:206: * @param[in]     conf_target       UniValue integer; confirmation target in blocks, values between 1 and 1008 are valid per policy/fees.h;
  test/functional/rpc_estimatefee.py:39:        # max value of 1008 per src/policy/fees.h
  test/functional/rpc_psbt.py:604:                assert_raises_rpc_error(-8, "Invalid conf_target, must be between 1 and 1008",  # max value of 1008 per src/policy/fees.h
  test/functional/wallet_basic.py:337:            assert_raises_rpc_error(-8, "Invalid conf_target, must be between 1 and 1008",  # max value of 1008 per src/policy/fees.h
  test/functional/wallet_fundrawtransaction.py:851:                assert_raises_rpc_error(-8, "Invalid conf_target, must be between 1 and 1008",  # max value of 1008 per src/policy/fees.h
  test/functional/wallet_send.py:315:                expect_error=(-8, "Invalid conf_target, must be between 1 and 1008"))  # max value of 1008 per src/policy/fees.h
  ```

  This is fixed in this PR by running a script that searches for what he greps and replaces it with the right reference.

  ```
  git grep -l "policy\/fees\.h" | xargs sed -i "s/policy\/fees.h/policy\/fees\/block_policy_estimator.h/g"
  ```

ACKs for top commit:
  kevkevinpal:
    ACK [b0a3887](b0a3887154)
  janb84:
    ACK b0a38871546dfcdd3a578c1ae4c28a88b6ee32d5
  rkrux:
    lgtm ACK b0a38871546dfcdd3a578c1ae4c28a88b6ee32d5

Tree-SHA512: e24f2aaf18fcfb0ae047a53ed209135a644ff08f5a8bc162c1522be3f99d7d01d550fc2e73d8db5fec7b748902daf68e61e7a5624f5913b9824feba5641fc78c
2025-11-13 09:48:50 +00:00
fanquake
5f1b016beb
depends: static libxcb-util-image
Co-authored-by: tobtoht <tob@featherwallet.org>
2025-11-13 09:45:54 +00:00
fanquake
98a2fbbe70
depends: static libxkbcommon 2025-11-13 09:45:54 +00:00
fanquake
1412baf772
depends: static libxcb-util-wm 2025-11-13 09:45:53 +00:00
fanquake
a4009dadf4
depends: static libxcb-keysyms 2025-11-13 09:45:53 +00:00
fanquake
bcfb8679b3
depends: static libxcb-render-util 2025-11-13 09:45:53 +00:00
MarcoFalke
faf99ae379
refactor: Avoid -W*-whitespace in git archive 2025-11-13 09:33:36 +01:00
Henry Romp
2594d5a189 build: Remove CMAKE_SKIP_BUILD_RPATH and SKIP_BUILD_RPATH settings
Remove CMake settings that are no longer needed after reordering Guix build script to perform binary checks after installation.

Also removes unused CMake maintenance targets (check-security and check-symbols) and updates security checks to include libexec/ directory binaries (see PR #31679).
2025-11-12 19:50:11 -05:00
Hennadii Stepanov
0dd8d5c237
cmake: Specify Windows plugin path in test_bitcoin-qt property 2025-11-12 19:02:29 +00:00
ismaelsadeeq
b0a3887154
scripted-diff: fix leftover references to policy/fees.h
-BEGIN VERIFY SCRIPT-
git grep -l "policy\/fees\.h" | xargs sed -i "s/policy\/fees.h/policy\/fees\/block_policy_estimator.h/g"
-END VERIFY SCRIPT-
2025-11-12 17:40:47 +00:00
merge-script
48d4b936e0
Merge bitcoin/bitcoin#33511: init: Fix Ctrl-C shutdown hangs during wait calls
c25a5e670b27d3b6eb958ce437dbe89678bd1511 init: Signal m_tip_block_cv on Ctrl-C (Ryan Ofsky)
6a29f79006a9d60b476893dface5eea8f9bf271c test: Test SIGTERM handling during waitforblockheight call (Ryan Ofsky)

Pull request description:

  Signal `m_tip_block_cv` when Ctrl-C is pressed or `SIGTERM` is received, the same way it is currently signaled when the `stop` RPC is called. This lets RPC calls like `waitforblockheight` and IPC calls like `waitTipChanged` be interrupted, instead of waiting for their original timeouts and delaying shutdown.

  This issue was reported by plebhash in #33463. These hangs have been present since #30409. A similar bug was also fixed previously in Qt in #18452 and this PR simplifies that fix.

ACKs for top commit:
  Sjors:
    tACK c25a5e670b27d3b6eb958ce437dbe89678bd1511
  TheCharlatan:
    ACK c25a5e670b27d3b6eb958ce437dbe89678bd1511
  enirox001:
    Concept ACK c25a5e6

Tree-SHA512: 320aaa74fd308e826521c48c9a8aca4bd5f5530064cda2303d251d8e93e50c474bcd0db760ce04921928e73abefe4847aff797ac9ca7c89e74e5051bbed061cd
2025-11-12 10:16:29 -05:00
merge-script
3c3c6adb72
Merge bitcoin/bitcoin#33745: mining: check witness commitment in submitBlock
6eaa00fe20206baedc0d8ade5bb8d066ea615704 test: clarify submitBlock() mutates the template (Sjors Provoost)
862bd432837efeb6ab1435f75493501618ab3190 mining: ensure witness commitment check in submitBlock (Sjors Provoost)
00d1b6ef4b1203e80271c16c0d5b179525de1913 doc: clarify UpdateUncommittedBlockStructures (Sjors Provoost)

Pull request description:

  When an IPC client requests a new block template via the Mining interface, we hold on to its `CBlock`. That way when they call `submitSolution()` we can modify it in place, rather than having to reconstruct the full block like the `submitblock` RPC does.

  Before this commit however we forgot to invalidate `m_checked_witness_commitment`, which we should since the client brings a new coinbase.

  This would cause us to accept an invalid chaintip.

  Fix this and add a test to confirm that we now reject such a block. As a sanity check, we add a second node to the test and confirm that will accept our mined block.

  As first noticed in #33374 the IPC code takes the coinbase as provided, unlike the `submitblock` RPC which calls `UpdateUncommittedBlockStructures()` and adds witness commitment to the coinbase if it was missing.

  Although that could have been an alternative fix, we instead document that IPC clients are expected to provide the full coinbase including witness commitment.

  Patch to produce the original issue:

  ```diff
  diff --git a/src/node/miner.cpp b/src/node/miner.cpp
  index b988e28a3f..28e9048a4d 100644
  --- a/src/node/miner.cpp
  +++ b/src/node/miner.cpp
  @@ -450,15 +450,10 @@ void AddMerkleRootAndCoinbase(CBlock& block, CTransactionRef coinbase, uint32_t
       }
       block.nVersion = version;
       block.nTime = timestamp;
       block.nNonce = nonce;
       block.hashMerkleRoot = BlockMerkleRoot(block);
  -
  -    // Reset cached checks
  -    block.m_checked_witness_commitment = false;
  -    block.m_checked_merkle_root = false;
  -    block.fChecked = false;
   }

   std::unique_ptr<CBlockTemplate> WaitAndCreateNewBlock(ChainstateManager& chainman,
                                                         KernelNotifications& kernel_notifications,
                                                         CTxMemPool* mempool,
  diff --git a/test/functional/interface_ipc.py b/test/functional/interface_ipc.py
  index cce56e3294..bf1b7048ab 100755
  --- a/test/functional/interface_ipc.py
  +++ b/test/functional/interface_ipc.py
  @@ -216,22 +216,22 @@ class IPCInterfaceTest(BitcoinTestFramework):
               assert_equal(res.result, True)

               # The remote template block will be mutated, capture the original:
               remote_block_before = await self.parse_and_deserialize_block(template, ctx)

  -            self.log.debug("Submitted coinbase must include witness")
  +            self.log.debug("Submitted coinbase with missing witness is accepted")
               assert_not_equal(coinbase.serialize_without_witness().hex(), coinbase.serialize().hex())
               res = await template.result.submitSolution(ctx, block.nVersion, block.nTime, block.nNonce, coinbase.serialize_without_witness())
  -            assert_equal(res.result, False)
  +            assert_equal(res.result, True)

               self.log.debug("Even a rejected submitBlock() mutates the template's block")
               # Can be used by clients to download and inspect the (rejected)
               # reconstructed block.
               remote_block_after = await self.parse_and_deserialize_block(template, ctx)
               assert_not_equal(remote_block_before.serialize().hex(), remote_block_after.serialize().hex())

  -            self.log.debug("Submit again, with the witness")
  +            self.log.debug("Submit again, with the witness - does not replace the invalid block")
               res = await template.result.submitSolution(ctx, block.nVersion, block.nTime, block.nNonce, coinbase.serialize())
               assert_equal(res.result, True)

               self.log.debug("Block should propagate")
               assert_equal(self.nodes[1].getchaintips()[0]["height"], current_block_height + 1)
  ```

ACKs for top commit:
  ryanofsky:
    Code review ACK 6eaa00fe20206baedc0d8ade5bb8d066ea615704. Just documentation updates and test clarifications since last review, also splitting up a commit.
  TheCharlatan:
    Re-ACK 6eaa00fe20206baedc0d8ade5bb8d066ea615704
  ismaelsadeeq:
    Code review and tested ACK   6eaa00fe20206baedc0d8ade5bb8d066ea615704

Tree-SHA512: 3a6280345b0290fe8300ebc63c13ad4058d24ceb35b7d7a784b974d5f04f420860ac03a9bf2fc6a799ef3fc55552ce033e879fa369298f976b9a01d72bd55d9e
2025-11-12 10:03:48 -05:00
merge-script
e652b69b8d
Merge bitcoin/bitcoin#33003: test: add option to skip large re-org test in feature_block
8810642b571e1d8482375e962a1129b691d5d226 test: add option to skip large re-org test in feature_block (brunoerg)

Pull request description:

  Fixes #32877

  This PR adds a config flag `--skipreorg` which is used to skip the large re-org test. According to corecheck, `feature_block` is our slowest functional test and primarily because of this large re-org test. However, this test might not be useful for the mutation analysis of some files and could be skipped to save a huge amount of time.

  ```
  time ./build/test/functional/feature_block.py --skipreorg
  ./build/test/functional/feature_block.py --skipreorg  11.38s user 0.33s system 37% cpu 31.422 total
  time ./build/test/functional/feature_block.py
  ./build/test/functional/feature_block.py  25.87s user 3.53s system 56% cpu 52.317 total
  ```

ACKs for top commit:
  maflcko:
    review ACK 8810642b571e1d8482375e962a1129b691d5d226 🥁
  enirox001:
    tACK 8810642 – Ran tests with/without --skipreorg; saw ~40 % speedup; no regressions.
  theStack:
    Concept and code-review ACK 8810642b571e1d8482375e962a1129b691d5d226
  glozow:
    lgtm ACK 8810642b571e1d8482375e962a1129b691d5d226

Tree-SHA512: 4ef38bd32b8ad8ec2b7f30c96d2fe545d920759645ff52f632699f829b64f8d26fe878f3fdd255142235edd0a740a7feb64da8f5a10d0d740ebfa46c43ae60eb
2025-11-12 09:54:08 -05:00
merge-script
3789215f73
Merge bitcoin/bitcoin#33724: refactor: Return uint64_t from GetSerializeSize
fa6c0bedd33ac7ad27454adaf9522fd27bef6ea3 refactor: Return uint64_t from GetSerializeSize (MarcoFalke)
fad0c8680ea7ef433c2d6e7c0d5799f81fd861b9 refactor: Use uint64_t over size_t for serialized-size values (MarcoFalke)
fa4f388fc99c9ec7c3cf2bac3863c7b3004bb2ae refactor: Use fixed size ints over (un)signed ints for serialized values (MarcoFalke)
fa01f38e53cfda4155d0ea09ca8b1291b7001fe8 move-only: Move CBlockFileInfo to kernel namespace (MarcoFalke)
fa2bbc9e4cfe017436a5167ab5c443f4412efa3c refactor: [rpc] Remove cast when reporting serialized size (MarcoFalke)
fa364af89bd914ea7cd0d4a5470e0a502e0a2075 test: Remove outdated comment (MarcoFalke)

Pull request description:

  Consensus code should arrive at the same conclusion, regardless of the architecture it runs on. Using architecture-specific types such as `size_t` can lead to issues, such as the low-severity [CVE-2025-46597](https://bitcoincore.org/en/2025/10/24/disclose-cve-2025-46597/).

  The CVE was already worked around, but it may be good to still fix the underlying issue.

  Fixes https://github.com/bitcoin/bitcoin/issues/33709 with a few refactors to use explicit fixed-sized integer types in serialization-size related code and concluding with a refactor to return `uint64_t` from `GetSerializeSize`. The refactors should not change any behavior, because the CVE was already worked around.

ACKs for top commit:
  Crypt-iQ:
    crACK fa6c0bedd33ac7ad27454adaf9522fd27bef6ea3
  l0rinc:
    ACK fa6c0bedd33ac7ad27454adaf9522fd27bef6ea3
  laanwj:
    Code review ACK fa6c0bedd33ac7ad27454adaf9522fd27bef6ea3

Tree-SHA512: f45057bd86fb46011e4cb3edf0dc607057d72ed869fd6ad636562111ae80fea233b2fc45c34b02256331028359a9c3f4fa73e9b882b225bdc089d00becd0195e
2025-11-12 09:48:10 -05:00
merge-script
d4e2a45833
Merge bitcoin/bitcoin#33750: doc: document fingerprinting risk when operating node on multiple networks
e346ecae830e10310979e5f64de63e043a383ff1 Add eclipse, partitioning, and fingerprinting note to i2p.md (da1sychain)
19a6a3e75ed66608f08e97c1dbfd72f33c295146 Add eclipse, partitioning, and fingerprinting note in tor.md (da1sychain)

Pull request description:

  Operating a Bitcoin node across multiple networks poses some fingerprinting risk. [0] Currently, this is not clear from the documentation and may be causing direct harm to users who are unaware of this.

  The included documentation change indicates this risk factor but also notes that operating a node across multiple networks does provide an important benefit (increases the cost of eclipse and partitioning attacks) and is thus not discouraged outright.

  The i2p documentation did not include a privacy recommendations section, so that is added as well.

  [0] https://delvingbitcoin.org/t/fingerprinting-nodes-via-addr-requests/1786

ACKs for top commit:
  danielabrozzoni:
    ACK e346ecae830e10310979e5f64de63e043a383ff1
  rkrux:
    crACK e346ecae830e10310979e5f64de63e043a383ff1
  mzumsande:
    ACK e346ecae83
  glozow:
    lgtm ACK e346ecae830e10310979e5f64de63e043a383ff1

Tree-SHA512: d35a00f604ed70bb9d2339066612414f590d8cfe4d02eb0f586364b32016c7259aaaf059bc5162779f36b06fb06508ff7162022bdf65aa22a840bc34f69b7b50
2025-11-12 09:38:27 -05:00
merge-script
47618446a0
Merge bitcoin/bitcoin#33853: kernel: Allow null arguments for serialized data
a3ac59a4316305fb38a5338b48940682889d0dc2 ci: Enable experimental kernel stuff in ASan task (MarcoFalke)
5b89956eeb76cf8c9717152fbb0928e026fc0087 kernel: Allow null arguments for serialized data (TheCharlatan)

Pull request description:

  An empty span constructed from an empty vector may have a null data pointer depending on the implementation. Remove the BITCOINKERNEL_ARG_NONNULL requirement for these arguments and instead handle such null arguments in the implementation.

  Also cherry-picked from #33845 to show that CI task passing now.

ACKs for top commit:
  yuvicc:
    Code review ACK a3ac59a4316305fb38a5338b48940682889d0dc2
  maflcko:
    review ACK a3ac59a4316305fb38a5338b48940682889d0dc2 🥈
  laanwj:
    code review ACK a3ac59a4316305fb38a5338b48940682889d0dc2

Tree-SHA512: 629e463796f2f057df5be8e8981a45751c578ed0021be731c1d57fe849a539fe38b0a445914b0fc48f32f0408ad6d566984bd7f3a68797fcfdf1c6889e316a08
2025-11-12 14:16:12 +00:00
fanquake
3e9aca6f1b
depends: drop qtbase-moc-ignore-gcc-macro.patch qt patch
Looks like this was fixed in 6.5 or 6.6, via
https://codereview.qt-project.org/c/qt/qtbase/+/492580.
2025-11-12 13:31:12 +00:00
MarcoFalke
fac4f6de28
ci: Rewrite lint task Bash snippet to Python
The Bash snippet was shorter, but relying on implicit word splitting
(see the shellcheck SC2086 warning).

For example, the DOCKER_BUILD_CACHE_ARG shlex.split is now done
identical to how ci/test/02_run_container.py does it.

Moreover, the Python will hopefully be easier to modify in the future,
as the dev notes recommend Python over Bash.
2025-11-12 13:40:24 +01:00
MarcoFalke
fa0d37a579
ci: Rewrite Bash to check inputs to Python
This is shorter and easier to read. Also, according to the dev notes,
Bash should not be used.
2025-11-12 13:39:27 +01:00
fanquake
0da5a82700
depends: drop unused qt patch
This hasn't been applied since 5e794e62024eef612e1fbb71c76ea54d17435c14,
but the patch was never removed.
2025-11-12 12:24:57 +00:00
merge-script
d0da953773
Merge bitcoin/bitcoin#32482: build: add -W*-whitespace
40dcbf580d8eb31a067b62bf9676099919b9841e build: add -Wtrailing-whitespace=any (fanquake)
d7659cd7e6f883088081c9e782d8a3fa40da210a build: add -Wleading-whitespace=spaces (fanquake)
d86650220a16075f7739a9ae0a017df4477a4541 cmake: Disable `-Wtrailing-whitespace` warnings for RCC-generated files (Hennadii Stepanov)
aabc5ca6ed6e15e1f5c805b0e14c0c701b2b1824 cmake: Switch from AUTORCC to `qt6_add_resources` (Hennadii Stepanov)
25ae14c3391a813cdf78fb067693be0c4db06bd2 subprocess: replace tab with space (fanquake)
0c2b9dadd55453e7e730c361f88b3cae12f969cc scripted-diff: remove whitespace in sha256_sse4.cpp (fanquake)
4da084fbc93374ed07bca6d10f42a8c6aa73f3f3 scripted-diff: change whitespace to spaces in univalue (fanquake)
e6caf150b309a576ce016b589cea203c871866bc ci: add moreutils to lint job (fanquake)

Pull request description:

  GCC 15 now has options to turn leading & trailing whitespace into compile failures: https://gcc.gnu.org/gcc-15/changes.html#c-family. Fix the few cases of leading tabs, and trailing whitespace, and then enable `-Wleading-whitespace` and `-Wtrailing-whitespace`.

  We currently get PRs that are opened with various whitespace, i.e #33822, so turning that into compile-time failure where possible, seems useful, to avoid a CI roundtrip.

ACKs for top commit:
  ajtowns:
    utACK 40dcbf580d8eb31a067b62bf9676099919b9841e
  hebasto:
    re-ACK 40dcbf580d8eb31a067b62bf9676099919b9841e.

Tree-SHA512: a128001ab2abb41cd6d249dcf46be4167ebd608d6b0f1452212a3ec9a383747bea623ab0382ec7bc0ac7a232a47cca5174e1cd73d4eda6751aa3cb2365ad2ede
2025-11-12 10:53:42 +00:00
merge-script
f450761f83
Merge bitcoin/bitcoin#33842: build: Bump g++ minimum supported version to 12
fa9f29a4a79944f6ffbb58eab0ac41e243fbeb97 doc: Recommend latest Debian stable or Ubuntu LTS (MarcoFalke)
fa1711ee0d3bac12daa7fdac04af448b69cc257a doc: Add GCC-12 min release notes (MarcoFalke)
faa8be75c9470d7d28b0993b723ef1a36a6f58cd ci: Enable experimental kernel stuff in G++-12 task (previous releases) (MarcoFalke)
fabce97b303bd4aafa98ceb11c63800e7f4f11cd test: Remove gccbug_90348 test case (MarcoFalke)
fa3854e43295f71f5dad8557dd621f0f799b0ee0 test: Remove unused fs::create_directories test (MarcoFalke)
fa9dacdbde7dc18d134019bdad24f47e4dea1dda util: [refactor] Remove unused create_directories workaround (MarcoFalke)
fa807f78aede4bc59a75366899fd5752ce6a66f8 build: Bump g++ minimum supported version to 12 (MarcoFalke)

Pull request description:

  All supported operating systems that previously came with at least g++-11, also come with at least g++-12, so bumping the minimum should be fine.

  For reference:

  * https://packages.ubuntu.com/jammy/g++-12
  * https://packages.ubuntu.com/noble/g++ (g++-13)
  * https://packages.debian.org/bookworm/g++ (g++-12)
  * FreeBSD Ports ship a recent GCC
  * RHEL-based 8, and 9 ship with g++-14 via appstream (`dnf install gcc-toolset-14` -> `/opt/rh/gcc-toolset-14/`)
  * RHEL-based 10 ships with g++ (14 by default)
  * OpenSuse Leap and Tumbleweed ship with g++ 15 https://software.opensuse.org/package/gcc15-c++

  Obviously, downloading pre-compiled releases or compiling previous release branches is unaffected by this change.

ACKs for top commit:
  janb84:
    re-ACK fa9f29a4a79944f6ffbb58eab0ac41e243fbeb97
  TheCharlatan:
    Re-ACK fa9f29a4a79944f6ffbb58eab0ac41e243fbeb97
  hebasto:
    ACK fa9f29a4a79944f6ffbb58eab0ac41e243fbeb97.

Tree-SHA512: ce14ecf78ccfe4f221dcbc9147dcfc00c0512b23a6fcda5ba71b62b4f5d39a5139f083d035113f189bfbd396d485e1ebc626a9a16b6fa0b74fd95aed2041c841
2025-11-12 10:49:53 +00:00
MarcoFalke
fa9f29a4a7
doc: Recommend latest Debian stable or Ubuntu LTS 2025-11-11 22:44:18 +01:00
MarcoFalke
fa1711ee0d
doc: Add GCC-12 min release notes 2025-11-11 22:44:13 +01:00
MarcoFalke
faa8be75c9
ci: Enable experimental kernel stuff in G++-12 task (previous releases)
Base the task on --preset=dev-mode to ensure maximal coverage and add
the following:

   bitcoin-chainstate (experimental) ... ON
   libbitcoinkernel (experimental) ..... ON
   kernel-test (experimental) .......... ON

Also, shorten the name, for a less cluttered web view.
2025-11-11 22:44:09 +01:00
MarcoFalke
fabce97b30
test: Remove gccbug_90348 test case
The test case no longer detects this specific issue for GCC versions
12.1+, as explained in the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90348 thread and in this
compiler-explorer playground:
https://godbolt.org/z/Y48osrjM8

So remove the test case and update the -fstack-reuse=none cmake
docstring with the underlying affected GCC versions, and the bug URL.
2025-11-11 22:44:01 +01:00
MarcoFalke
fa3854e432
test: Remove unused fs::create_directories test
The test was added in commit ddb75c2e87a60ed24065bdf0c3bfabf4e058cef1.
After the create_directories wrapper removal, the test is redundant with
the unit test in the upstream stdlib. Also, there is a Bitcoin Core
functional test that covers this behavior in
test/functional/feature_dirsymlinks.py

So remove this unit test.

Finally, I could not find a real system that still ships a buggy stdlib
(v11.2) in their package manager. A stand-alone test is also available
in compiler-explorer under https://godbolt.org/z/aeMKraYrT.
2025-11-11 22:28:27 +01:00
MarcoFalke
fa9dacdbde
util: [refactor] Remove unused create_directories workaround
This was added in commit 1f46b6e46e1454b91ff7ceb31853bc440952f8eb, but
is no longer needed after g++-12 is the minimum required.
2025-11-11 22:28:09 +01:00
Hennadii Stepanov
138726a6f8
Merge bitcoin/bitcoin#33850: depends: drop qtbase_avoid_native_float16 qt patch
169f93d2ac887a7295e87f0a69c2407cdd0a936e depends: drop qtbase_avoid_native_float16 qt patch (fanquake)

Pull request description:

  There is no-longer a minimum required / max supported libgcc version, after https://github.com/bitcoin/bitcoin/pull/33181.

ACKs for top commit:
  laanwj:
    Code review ACK 169f93d2ac887a7295e87f0a69c2407cdd0a936e
  hebasto:
    ACK 169f93d2ac887a7295e87f0a69c2407cdd0a936e.

Tree-SHA512: 1cb3639742d1466ae4355f99bea08afd1dab89a03b10aa7c0e04c8ec18e7654913028155badbfa67fdfa39764f6e04e7a0b5d007b0b3af8606425641db01f1e3
2025-11-11 17:03:11 +00:00
merge-script
1c3d5c8ffd
Merge bitcoin/bitcoin#33840: test: [refactor] Use reference over ptr to chainman
7a4901c9029687ad2b37f6d929d4c8fe96c15db3 test, refactor: Fix `-Warray-bounds` warning (Hennadii Stepanov)
faf2759c8c4507adacf2618f23c1f445f490c012 test: [refactor] Use reference over ptr to chainman (MarcoFalke)

Pull request description:

  Just some minor test-only refactor commits to fix GCC false positive warnings, along with making the test code easier to read and understand:

  * First change requested in https://github.com/bitcoin/bitcoin/pull/33785#discussion_r2510727269
  * Second change requested in commit 3b135a8fc4451c93b3ea50b3f4621e0d19f35daf

  Those changes are required in a bunch of pulls touching the CI system, so merging them allows to drop them in all pulls.

ACKs for top commit:
  l0rinc:
    ACK 7a4901c9029687ad2b37f6d929d4c8fe96c15db3
  hebasto:
    ACK 7a4901c9029687ad2b37f6d929d4c8fe96c15db3, I have reviewed the code and it looks OK.

Tree-SHA512: 64dca52ec7b25078bf489e2d8b43e449f4968fbac14a09c66a60cdc75b513588403665f248368820694a6f72c4f7f465589d9306355239cffe35c38111929eff
2025-11-11 13:50:57 +00:00
fanquake
40dcbf580d
build: add -Wtrailing-whitespace=any
This is available in GCC 15. See
https://gcc.gnu.org/gcc-15/changes.html.
2025-11-11 11:37:11 +00:00