Commit graph

44587 commits

Author SHA1 Message Date
Hennadii Stepanov
d0cce4172c depends: Fix mv command compatibility with macOS 2025-04-03 19:03:52 +01:00
Hennadii Stepanov
690f5da15a depends: Specify Objective C/C++ compilers for native_qt package
This change fixes cross-compilation from macOS to macOS with another
architecture.
2025-04-03 19:03:27 +01:00
Prabhat Verma
c5a7ffd1e8 preserve llvm profile env
Signed-off-by: Prabhat Verma <prabhatverma329@gmail.com>
2025-04-03 21:02:21 +05:30
MarcoFalke
fac978fb21
test: Remove fragile and ancient release 0.17 wallet test 2025-04-03 14:34:06 +02:00
pablomartin4btc
42c13141b5 wallet, refactor: Decouple into HasLegacyRecords()
The new helper will be used to fix a crash in the
wallet migration process (watch-only, non-blank,
private keys disabled, empty wallet - no scripts
or addresses imported).

Co-authored-by: Matias Furszyfer <mfurszy@protonmail.com>
2025-04-03 07:55:51 -03:00
Hennadii Stepanov
c66f7dab33
Merge bitcoin/bitcoin#32211: doc: Amend Qt 6 dependency packages for Ubuntu
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / macOS 14 native, arm64, fuzz (push) Waiting to run
CI / Windows native, VS 2022 (push) Waiting to run
CI / Windows native, fuzz, VS 2022 (push) Waiting to run
CI / Linux->Windows cross, no tests (push) Waiting to run
CI / Windows, test cross-built (push) Blocked by required conditions
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
2e751f559a doc: Amend Qt 6 dependency packages for Ubuntu (Hennadii Stepanov)

Pull request description:

  On older systems, such as Ubuntu 22.04, `qt6-tools-dev-tools` and `libgl-dev` are not treated as dependencies of `qt6-tools-dev` and `qt6-base-dev`, respectively. This PR explicitly lists them in the installation documentation.

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

ACKs for top commit:
  maflcko:
    lgtm ACK 2e751f559a
  laanwj:
    Code review ACK 2e751f559a

Tree-SHA512: a6997c74c83789cb5fe5b97a719b8ff6e2180d5f6ae5502ccccfce3a22394d25eef05204ecda0a6deb368de77975e2a1da89b5749eff01a979f2f60843efebff
2025-04-03 11:54:09 +01:00
laanwj
ec81a72b36 net: Add randomized prefix to Tor stream isolation credentials
Add a class TorsStreamIsolationCredentialsGenerator that generates
unique credentials based on a randomly generated session prefix
and an atomic counter.

This makes sure that different launches of the application won't share
the same credentials, and thus circuits, even in edge cases.

Example with `-debug=proxy`:
```
2025-03-31T16:30:27Z [proxy] SOCKS5 sending proxy authentication 0afb2da441f5c105-0:0afb2da441f5c105-0
2025-03-31T16:30:31Z [proxy] SOCKS5 sending proxy authentication 0afb2da441f5c105-1:0afb2da441f5c105-1
```

Thanks to hodlinator for the idea.
2025-04-03 12:05:59 +02:00
Hennadii Stepanov
d85895e5a7
build, msvc: Build only required qtbase features
This change makes vcpkg skip unused features such as `dnslookup`,
`openssl`, etc.
2025-04-03 10:26:58 +01:00
Hennadii Stepanov
fe5a6dcc53
build, msvc: Update vcpkg manifest baseline
This change updates the vcpkg manifest baseline from the "2024.09.30
Release" to the "2025.03.19 Release", with the following package
changes:
 - boost: 1.85.0#1,2 --> 1.87.0
 - qtbase: 6.7.2#3 -> 6.8.2#1
 - qttools: 6.7.2#1 -> 6.8.2
 - sqlite3: 3.46.1 --> 3.49.1
2025-04-03 10:26:50 +01:00
MarcoFalke
fadf8f078e
test: Remove confusing and failing system time test 2025-04-03 11:12:00 +02:00
Hennadii Stepanov
2e751f559a
doc: Amend Qt 6 dependency packages for Ubuntu
On older systems, such as Ubuntu 22.04, `qt6-tools-dev-tools` and
`libgl-dev` are not treated as dependencies of `qt6-tools-dev` and
`qt6-base-dev`, respectively. This change explicitly lists them in the
installation documentation.
2025-04-03 10:11:26 +01:00
Hennadii Stepanov
df82a24508
Merge bitcoin-core/gui#863: refactor: Post Qt 6 cleanup
3aa58bea8e qt, refactor: Inline `GUIUtil::SplitSkipEmptyParts` function (Hennadii Stepanov)
d1ec6db249 qt, refactor: Inline `GUIUtil::GetImage` function (Hennadii Stepanov)
4b36ab3a6a qt, refactor: Remove outdated Qt version-specific code (Hennadii Stepanov)

Pull request description:

  This PR:
  - Removes outdated Qt version-specific code.
  - Inlines two functions from `GUIUtil`.

ACKs for top commit:
  davidgumberg:
    crACK 3aa58bea8e

Tree-SHA512: f56f6e3a219a5378d986bcb5fbfc50dcd752c080a92055da1f859433214c999905b456a12f6ac3d5b4871656dbf43a732adf04536c3479b1aa93110beafb2478
2025-04-03 08:45:37 +01:00
merge-script
77dff373a6
Merge bitcoin/bitcoin#32182: ci: Switch to dynamic library linkage in native Windows job
7967fe5bfd ci: Switch to dynamic library linkage in native Windows job (Hennadii Stepanov)

Pull request description:

  This PR significantly reduces the vcpkg binary cache size, improving CI caching performance:

  | Branch | Cache Size |
  |---|--:|
  | master | 2.6 GB |
  | this PR |  430 MB |

  Also see https://github.com/bitcoin/bitcoin/pull/31176#issuecomment-2766164288.

ACKs for top commit:
  maflcko:
    lgtm ACK 7967fe5bfd

Tree-SHA512: d52fcf9cdc95bcbbe35def4634cd94d3c934be939a486ac4740da7e5706ef813950984987a7dfef45edeca8a539438dc8fc8f3f92adb7f188af2f0088b88e4db
2025-04-03 14:03:11 +08:00
merge-script
99b9022844
Merge bitcoin/bitcoin#32177: TxGraph: Increase fuzz coverage
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / macOS 14 native, arm64, fuzz (push) Waiting to run
CI / Windows native, VS 2022 (push) Waiting to run
CI / Windows native, fuzz, VS 2022 (push) Waiting to run
CI / Linux->Windows cross, no tests (push) Waiting to run
CI / Windows, test cross-built (push) Blocked by required conditions
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
a40bd374aa Get*Union: disallow nulltpr Refs (Greg Sanders)
57433502e6 CountDistinctClusters: nullptrs disallowed (Greg Sanders)
8bca0d325a TxGraphImpl::Compact: m_main_clusterset.m_removed is always empty (Greg Sanders)
2c5cf987e9 TxGraphImpl::PullIn: only allowed when staging exists (Greg Sanders)

Pull request description:

  Was looking at my local coverage report, and noticed a few spots that will not or cannot be hit.

  CountDistinctClusters, GetAncestorsUnion, and GetDescendantsUnion accept nullptrs, but the test harness never employs them. Disallow them.

  We never call PullIn whenever there isn't staging, so just enforce that invariant via assertion.

  Remaining places that are not covered:

  1) Relinearize: Currently we seem to always start with a cold (not known to be optimal) cluster, and after one attempt at linearization result into something optimal. This means we never shortcircuit, nor run PostLinearization, nor store the quality as ACCEPTABLE. Reducing iterations causes these lines to be hit. sipa says he will take this on as varying the amount of iterations was meant to be done eventually anyways.
  2) We never do a move assignment operator when the lvalue already has a `m_graph` (so we never call UnlinkRef) 3358b1d105/src/txgraph.cpp (L2097)
  3) We never use the move constructor: 3358b1d105/src/txgraph.cpp (L2108)

ACKs for top commit:
  sipa:
    utACK a40bd374aa
  glozow:
    utACK a40bd374aa

Tree-SHA512: ca88297222e80e0d590889698899f892b9335cfa587a76a6c6ca62c8d846f208b6b0b9a9b1829bafabdb929a1a0c3a75f23edf7dd2b4f5e2dad0235e5bc68ba3
2025-04-03 09:51:28 +08:00
Hennadii Stepanov
3aa58bea8e
qt, refactor: Inline GUIUtil::SplitSkipEmptyParts function 2025-04-02 20:49:18 +01:00
Hennadii Stepanov
d1ec6db249
qt, refactor: Inline GUIUtil::GetImage function 2025-04-02 20:48:36 +01:00
Hennadii Stepanov
4b36ab3a6a
qt, refactor: Remove outdated Qt version-specific code
Since bitcoin/bitcoin#30997, the minimum supported Qt version is 6.2.
2025-04-02 20:48:11 +01:00
MarcoFalke
faa807bdf8
ci: Merge master in test-each-commit task 2025-04-02 20:46:43 +02:00
Hennadii Stepanov
7967fe5bfd
ci: Switch to dynamic library linkage in native Windows job
This change significantly reduces the vcpkg binary cache size, improving
CI caching performance.
2025-04-02 17:47:10 +01:00
merge-script
639279e86a
Merge bitcoin/bitcoin#30997: build: Switch to Qt 6
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / macOS 14 native, arm64, fuzz (push) Waiting to run
CI / Windows native, VS 2022 (push) Waiting to run
CI / Windows native, fuzz, VS 2022 (push) Waiting to run
CI / Linux->Windows cross, no tests (push) Waiting to run
CI / Windows, test cross-built (push) Blocked by required conditions
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
f00345727b doc: Update `dependencies.md` for Qt 6 (Hennadii Stepanov)
80b917991e build, msvc: Update `vcpkg.json` for Qt 6 (Hennadii Stepanov)
30dd1f1644 ci: Update for Qt 6 (Hennadii Stepanov)
629d292f4d test: Update sanitizer suppressions for Qt 6 (Hennadii Stepanov)
551e13abf8 guix: Adjust for Qt 6 (Hennadii Stepanov)
c3e9bd086c qt: Fix compiling for Windows (Hennadii Stepanov)
ab399c4db2 depends: Add `native_qt` package (Hennadii Stepanov)
248613eb3e depends: Factor out Qt modules' details (Hennadii Stepanov)
0268f52a4c depends: Introduce customizable `$(package)_patches_path` variables (Hennadii Stepanov)
5e794e6202 depends: Bump `qt` package up to 6.7.3 (Hennadii Stepanov)
6d4214925f cmake: Require Qt 6 to build GUI (Hennadii Stepanov)

Pull request description:

  The currently used Qt 5.15 is approaching [EOL](https://www.qt.io/blog/qt-5.15-extended-support-for-subscription-license-holders) and will reach it before the Bitcoin Core v30 release. The recent migration of the build system to CMake makes it possible to switch to Qt 6.

  This PR updates the OS runtime compatibility requirements for the Bitcoin Core GUI as follows:

  ### 1. Linux

  Starting with Qt 6.5.0, the `libxcb-cursor0` package is required to be installed at runtime.

  ### 2. Windows

  Cross-compiling does not support LTO. We have to re-add it in a follow-up.

  A new style plugin causes minor visual glitches, such as
  ![image](https://github.com/user-attachments/assets/e06f8685-aa79-49e7-9e61-4d54563f6d04)
  which will be fixed in follow-ups.

  ### 3. macOS

  `bitcoin-qt` now uses the [Metal](https://developer.apple.com/metal/) backend.

  ---

  **IMPORTANT.** Don't forget to install [Ninja](https://ninja-build.org/).

  ---

  For historical context, please refer to:
  - https://github.com/bitcoin/bitcoin/issues/20627
  - https://github.com/bitcoin/bitcoin/pull/24798

  ---

  UPD 2024-10-09. Qt 6.8 has been [released](https://www.qt.io/blog/qt-6.8-released), but it has some [drawbacks](https://github.com/bitcoin/bitcoin/pull/30997#issuecomment-2402990346) for us. As a result, this PR will stick to Qt 6.7.

  UPD 2025-03-18: [Standard support for Qt 5.15 will end after 26th of May 2025](https://www.qt.io/blog/extended-security-maintenance-for-qt-5.15-begins-may-2025)

ACKs for top commit:
  laanwj:
    re-ACK f00345727b
  hodlinator:
    re-ACK f00345727b

Tree-SHA512: 367f722e6c3ea4700b5395871c40b6df8c8062fdc822107090449ea4ae4ad2db75cc53a982a678f4c48ce8f9b2d43ed10e6d23b06165ab78713f161db712d895
2025-04-02 21:41:16 +08:00
Cory Fields
babb9f5db6 depends: remove non-native libmultiprocess build
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2025-04-02 13:41:16 +00:00
Ryan Ofsky
5d105fb8c3 depends: Switch libmultiprocess packages to use local git subtree
With newly introduced libmultiprocess subtree, there's no need for depends
system to download and track changes to the upstream repository.

Note that adding the libmultiprocess subtree does not allow dropping
libmultiprocess packages from the depends build, because libmultiprocess
includes a code generation tool called mpgen, and in cross-compiled builds,
bitcoin core's cmake build system doesn't have access to a native toolchain and
can't build mpgen itself, so the depends system (or the native environment if
not using depends) needs to supply it.
2025-04-02 08:41:16 -05:00
Ryan Ofsky
9b35518d2f depends, moveonly: split up int_get_build_id function
Move parts of the int_get_build_id into a new int_get_build_properties
function. There is no change in behavior. This just organizes assignments
better so some build properties can be used to help compute build ids in the
next commit.
2025-04-02 08:41:16 -05:00
Ryan Ofsky
2d373e2707 lint: Add exclusions for libmultiprocess subtree
Without this change linter produces errors about:

- Use of std::filesystem the libmultiprocess example program.
- Use of locale-dependent functions in example program, in the build time code
  generator, and in the runtime library for debug logging.
- Include guards not beginning with BITCOIN_
2025-04-02 08:41:16 -05:00
Ryan Ofsky
e88ab394c1 doc: Update documentation to explain libmultiprocess subtree
Co-authored-by: Cory Fields <cory-nospam-@coryfields.com>
2025-04-02 08:41:16 -05:00
Ryan Ofsky
d4bc563982 cmake: Fix clang-tidy "no input files" errors
This change is technically not needed to add libmultiprocess as a subtree, but
it avoids a CI failure in followup PR #30975 which enables multiprocess build
option in more CI jobs. In that PR, clang-tidy job fails due to missing
generated example files as reported
https://github.com/bitcoin/bitcoin/pull/30975#issuecomment-2627116832

Different fixes were suggested
https://github.com/bitcoin/bitcoin/pull/30975#issuecomment-2627152623 and
https://github.com/bitcoin/bitcoin/pull/30975#issuecomment-2627403382

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2025-04-02 08:41:16 -05:00
Ryan Ofsky
abdf3cb645 cmake: Fix warnings from boost headers
This change is technically not needed to add libmultiprocess as a subtree, but
it avoids a CI failure in followup PR #30975 which enables multiprocess build
option in more CI jobs. In that PR, the "macOS 14 native no depends job" fails
due to warnings in boost headers treated as errors, reported in
https://github.com/bitcoin/bitcoin/pull/30975#issuecomment-2623801480 and
https://github.com/chaincodelabs/libmultiprocess/issues/138
2025-04-02 08:41:16 -05:00
Ryan Ofsky
8532fcb1c3 cmake: Fix ctest mptest "Unable to find executable" errors
This change is technically not needed to add libmultiprocess as a subtree, but
it avoids a CI failure in followup PR #30975 which enables multiprocess build
option in more CI jobs. In that PR, several jobs fail due to the mptest
executable not being built by default, as reported
https://github.com/bitcoin/bitcoin/pull/30975#issuecomment-2623801480

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2025-04-02 08:41:16 -05:00
Ryan Ofsky
d597ab1dee cmake: Support building with libmultiprocess subtree
When ENABLE_IPC option is on, build with libmultiprocess subtree and
`add_subdirectory(src/ipc/libmultiprocess)` instead of external package
and `find_package(Libmultiprocess)` by default.

Behavior can be toggled with `WITH_EXTERNAL_LIBMULTIPROCESS` option. Using a
subtree should be more convenient for most bitcoin developers, but using an
external package is more convenient for developing in the libmultiprocess
repository.

The `WITH_EXTERNAL_LIBMULTIPROCESS` option is also used to avoid needing to
changing the depends build here. But in later commits, the depends build is
switched to use the add_subdirectory build as well.

Co-authored-by: Cory Fields <cory-nospam-@coryfields.com>
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2025-04-02 08:41:16 -05:00
Ryan Ofsky
69f0d4adb7 scripted-diff: s/WITH_MULTIPROCESS/ENABLE_IPC/ in cmake
Rename WITH_MULTIPROCESS to ENABLE_IPC, because ENABLE_IPC is a more accurate
name for the feature. It controls whether the src/ipc/ directory is built and
whether IPC features like -ipcbind, -ipcconnect, and -ipcfd are available. It
does NOT currently enable multiprocess features which are implemented in #10102
building on top of the IPC features. It will also no longer (as of the next
commit), control whether a find_package call is made so the "WITH_" prefix is
also inappropriate.

-BEGIN VERIFY SCRIPT-
git grep -l WITH_MULTIPROCESS | xargs sed -i s/WITH_MULTIPROCESS/ENABLE_IPC/g
-END VERIFY SCRIPT-
2025-04-02 08:41:16 -05:00
Ryan Ofsky
3f6fb40114 Merge commit 'a2f28e4be96e92079a219567cf20214996aefc53' as 'src/ipc/libmultiprocess' 2025-04-02 21:41:16 +08:00
Ryan Ofsky
d6244f85c5 depends: Update libmultiprocess library to simplify cmake subtree build
Bump libmultiprocess library to include MP_INCLUDE_DIR definition from
https://github.com/chaincodelabs/libmultiprocess/pull/168 which can simplify
the IPC cmake build as described
https://github.com/bitcoin/bitcoin/pull/31741#discussion_r2021118543

This update brings in the following changes:

https://github.com/bitcoin-core/libmultiprocess/pull/166 doc: rename from chaincodelabs to bitcoin-core
https://github.com/bitcoin-core/libmultiprocess/pull/168 Switch `MP_INCLUDE_DIR` to global property
2025-04-02 09:41:16 -04:00
Ryan Ofsky
a2f28e4be9 Squashed 'src/ipc/libmultiprocess/' content from commit 35944ffd23fa
git-subtree-dir: src/ipc/libmultiprocess
git-subtree-split: 35944ffd23fa26652b82210351d50e896ce16c8f
2025-04-02 21:41:16 +08:00
laanwj
b639417b39 net: Add Tor extended SOCKS5 error codes
Add support for reporting Tor extended SOCKS5 error codes as defined
here:

- https://spec.torproject.org/socks-extensions.html#extended-error-codes
- https://gitlab.torproject.org/tpo/core/arti/-/blob/main/crates/tor-socksproto/src/msg.rs?ref_type=heads#L183

These give a more direct indication of the problem in case of errors
connecting to hidden services, for example:
```
2025-04-02T10:34:13Z [net] Socks5() connect to [elided].onion:8333 failed: onion service descriptor can not be found
```

In the C Tor implementation, to get these one should set the
"ExtendedErrors" flag on the "SocksPort" definition, introduced in
version 0.4.3.1.

In Arti, extended error codes are always enabled.

Also, report the raw error code in case of unknown reply values.
2025-04-02 12:48:14 +02:00
Hennadii Stepanov
f00345727b
doc: Update dependencies.md for Qt 6 2025-04-02 09:15:50 +01:00
Hennadii Stepanov
80b917991e
build, msvc: Update vcpkg.json for Qt 6 2025-04-02 09:15:37 +01:00
Hennadii Stepanov
30dd1f1644
ci: Update for Qt 6 2025-04-02 09:15:25 +01:00
Hennadii Stepanov
629d292f4d
test: Update sanitizer suppressions for Qt 6 2025-04-02 09:15:13 +01:00
Hennadii Stepanov
551e13abf8
guix: Adjust for Qt 6
1. Do not set `C{PLUS}_INCLUDE_PATH` variables

The build system for Qt 6 differs entirely from that of Qt 5. Building a
set of native Qt 6 tools now forms a separate step when cross-compiling.
Under these new circumstances, the `C{PLUS}_INCLUDE_PATH` environment
variables may alter the default include directories for both native and
cross compilers.

Previously, we explicitly unset these variables when invoking clang for
cross-compiling; however, that approach proved suboptimal (see #30451).

This change sets the native toolchain for dependencies explicitly,
rather than relying on the `C{PLUS}_INCLUDE_PATH` environment variables.
Additionally, it facilitates the transition towards using clang for
building native tools when cross-compiling for macOS.

2. Add `ninja` package.

3. Adjust allowed symbol lists.
2025-04-02 09:15:01 +01:00
Hennadii Stepanov
c3e9bd086c
qt: Fix compiling for Windows
Static builds for Windows now require Qt 6.7 or newer. This holds
automatically to cross-compiled builds.
2025-04-02 09:14:49 +01:00
Hennadii Stepanov
ab399c4db2
depends: Add native_qt package
Unlike Qt 5, Qt 6 requires a separate native Qt build for
cross-building.

See: https://www.qt.io/blog/qt-6-build-system.
2025-04-02 09:14:40 +01:00
Hennadii Stepanov
248613eb3e
depends: Factor out Qt modules' details 2025-04-02 09:14:07 +01:00
Hennadii Stepanov
0268f52a4c
depends: Introduce customizable $(package)_patches_path variables
This change helps avoid patch duplication between a package and its
native counterpart.
2025-04-02 09:13:31 +01:00
Hennadii Stepanov
5e794e6202
depends: Bump qt package up to 6.7.3 2025-04-02 09:12:27 +01:00
Hennadii Stepanov
6d4214925f
cmake: Require Qt 6 to build GUI 2025-04-02 09:11:48 +01:00
merge-script
cfa7f70f6c
Merge bitcoin/bitcoin#31933: doc: Add Clang/LLVM based coverage report generation
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / Windows native, VS 2022 (push) Waiting to run
CI / Windows native, fuzz, VS 2022 (push) Waiting to run
CI / Linux->Windows cross, no tests (push) Waiting to run
CI / Windows, test cross-built (push) Blocked by required conditions
CI / macOS 14 native, arm64, fuzz (push) Waiting to run
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
b96f1a696a add clang/llvm based coverage report generation (Prabhat Verma)

Pull request description:

  Followed up from the [comment](https://github.com/bitcoin/bitcoin/issues/31927#issuecomment-2674522975) on the issue [#31927](https://github.com/bitcoin/bitcoin/issues/31927) , issues have been observed building coverage reports with `gcov` in MacOs and NixOs. This PR adds the steps to generate a coverage report based on the default llvm/clang tooling.

ACKs for top commit:
  Crypt-iQ:
    tACK b96f1a696a
  hodlinator:
    re-ACK b96f1a696a
  janb84:
    Re ACK [b96f1a6](b96f1a696a)

Tree-SHA512: bc54f170e84bb76b3eba7285bd49f051c0b99b784d583a550d8e51511497bcc4df8964bbe3991777648d2f829809db8eabb0cbf0d25f9da5e49e1cfc62f6d8d0
2025-04-02 14:15:09 +08:00
merge-script
772996ac8b
Merge bitcoin/bitcoin#32158: fuzz: Make partially_downloaded_block more deterministic
fa51310121 contrib: Warn about using libFuzzer for coverage check (MarcoFalke)
fa17cdb191 test: Avoid script check worker threads while fuzzing (MarcoFalke)
fa900bb2dc contrib: Only print fuzz output on failure (MarcoFalke)
fa82fe2c73 contrib: Use -Xdemangler=llvm-cxxfilt in deterministic-*-coverage (MarcoFalke)
fa7e931130 contrib: Add optional parallelism to deterministic-fuzz-coverage (MarcoFalke)

Pull request description:

  This should make the `partially_downloaded_block` fuzz target even more deterministic.

  Follow-up to https://github.com/bitcoin/bitcoin/pull/31841. Tracking issue: https://github.com/bitcoin/bitcoin/issues/29018.

  This bundles several changes:

  * First, speed up the `deterministic-fuzz-coverage` helper by introducing parallelism.
  * Then, a fix to remove spawned test threads or spawn them deterministically. (While testing this, high parallelism and thread contention may be needed)

  ### Testing

  It can be tested via (setting 32 parallel threads):

  ```
  cargo run --manifest-path ./contrib/devtools/deterministic-fuzz-coverage/Cargo.toml -- $PWD/bld-cmake/ $PWD/../b-c-qa-assets/fuzz_corpora/ partially_downloaded_block 32
  ```

  Locally, on a failure, the output would look like:

  ```diff
   ....
  -  150|      0|            m_worker_threads.emplace_back([this, n]() {
  -  151|      0|                util::ThreadRename(strprintf("scriptch.%i", n));
  +  150|      1|            m_worker_threads.emplace_back([this, n]() {
  +  151|      1|                util::ThreadRename(strprintf("scriptch.%i", n));
   ...
  ```

  This excerpt likely indicates that the script threads were started after the fuzz init function returned.

  Similarly, for the scheduler thread, it would look like:

  ```diff
   ...
     227|      0|        m_node.scheduler = std::make_unique<CScheduler>();
  -  228|      1|        m_node.scheduler->m_service_thread = std::thread(util::TraceThread, "scheduler", [&] { m_node.scheduler->serviceQueue(); });
  +  228|      0|        m_node.scheduler->m_service_thread = std::thread(util::TraceThread, "scheduler", [&] { m_node.scheduler->serviceQueue(); });
     229|      0|        m_node.validation_signals =
   ...
  ```

ACKs for top commit:
  Prabhat1308:
    re-ACK [`fa51310`](fa51310121)
  hodlinator:
    re-ACK fa51310121
  janb84:
    Re-ACK [fa51310](fa51310121)

Tree-SHA512: 1a935eb19da98c7c3810b8bcc5287e5649ffb55bf50ab78c414a424fef8e703839291bb24040a552c49274a4a0292910a00359bdff72fa29a4f53ad36d7a8720
2025-04-02 13:22:00 +08:00
merge-script
40de19164c
Merge bitcoin/bitcoin#32118: fuzz: wallet: fix crypter target
28dc118001 fuzz: wallet: fix crypter target (brunoerg)

Pull request description:

  The crypter target has an issue, it's calling `DecryptKey` with a random secret and a random public key that will unlikely be related to the key used to encrypt, so it won't have any effect. This PR changes fixes it and also removes the `DecryptSecret` call since this function is already (and only) called within `DecryptKey`.

ACKs for top commit:
  maflcko:
    lgtm ACK 28dc118001 🥊

Tree-SHA512: e96b7d33879bf06eeec0726e74e8e0d7020997659bf97dfca5d7c1a7ba65c4d93c78e666b97eebde110564cef2eefc7209d3e3586e4658145827b14d1b01dfc9
2025-04-02 13:17:49 +08:00
merge-script
5541f7ced7
Merge bitcoin/bitcoin#32187: refactor: Remove spurious virtual from final ~CZMQNotificationInterface
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / macOS 14 native, arm64, fuzz (push) Waiting to run
CI / Windows native, VS 2022 (push) Waiting to run
CI / Windows native, fuzz, VS 2022 (push) Waiting to run
CI / Linux->Windows cross, no tests (push) Waiting to run
CI / Windows, test cross-built (push) Blocked by required conditions
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
fa69c42fdf refactor: Remove spurious virtual from final ~CZMQNotificationInterface (MarcoFalke)

Pull request description:

  `virtual` does not make sense here, because:

  * The class is `final`, thus the destructor isn't overridden in a derived class
  * The destructor also isn't overriding the destructor of the base, clarified in commit 2b3ea39de4
  * Clang 21 may warn about this

  ```
  src/zmq/zmqnotificationinterface.h:25:13: error: virtual method '~CZMQNotificationInterface' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
     25 |     virtual ~CZMQNotificationInterface();
        |             ^
  ```

  Fix all issues by removing it.

ACKs for top commit:
  davidgumberg:
    crACK fa69c42fdf
  janb84:
    ACK [fa69c42](fa69c42fdf)
  TheCharlatan:
    ACK fa69c42fdf

Tree-SHA512: 26ea977f31fe24c116d68dea6c583de7c6fc480877e1baefcde11db4ac191e352027d492ee6ad69a60fe4ff537e0841c638b3a3e81356d9e00c60030845fc96e
2025-04-02 09:56:08 +08:00
merge-script
6f6f83a8ca
Merge bitcoin/bitcoin#32193: test: fix spelling in Python code comment
4774a0c923 test: fix spelling in Python code comment (John Bampton)

Pull request description:

  Fixed a couple of typos

Top commit has no ACKs.

Tree-SHA512: 5334995672b2c7d4a9cb916f71dff6a2ce13dc7ced6bbc30ddb0fe8e0ae0b4094b675b3dfced1ffc1b92e3a33ee22df07af3032b8c2928f27051b6376dca3361
2025-04-02 09:49:21 +08:00