Commit graph

44375 commits

Author SHA1 Message Date
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
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
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
merge-script
16b084f88d
Merge bitcoin/bitcoin#32194: ci, windows: Do not exclude wallet_migration.py in command line
4a679936bb ci, windows: Do not exclude `wallet_migration.py` in command line (Hennadii Stepanov)

Pull request description:

  This PR amends the recently merged https://github.com/bitcoin/bitcoin/pull/31176 to resolve a silent merge conflict with the previously merged https://github.com/bitcoin/bitcoin/pull/31248.

  Since https://github.com/bitcoin/bitcoin/pull/31248, it is no longer necessary to use `--exclude wallet_migration.py`, as the test is skipped due to not using previous releases.

  The `wallet_migration.py` test itself still needs to be fixed for Windows by someone who will work on https://github.com/bitcoin/bitcoin/issues/32192.

ACKs for top commit:
  davidgumberg:
    crACK 4a679936bb

Tree-SHA512: f42428016958cdaccb509cc49341e726eaf1314d85989a7b49888f3862dc4ea0c2988a4792ae62dd925302d0073906397801c8dd2fb06c23381d7cad38730249
2025-04-02 09:47:10 +08:00
Hennadii Stepanov
4a679936bb
ci, windows: Do not exclude wallet_migration.py in command line
Since https://github.com/bitcoin/bitcoin/pull/31248, it is no longer
necessary to use `--exclude wallet_migration.py`, as the test is skipped
due to not using previous releases.
2025-04-01 22:37:49 +01:00
Hennadii Stepanov
449e2eb7e4
Merge bitcoin/bitcoin#32184: ci: Add workaround for vcpkg's libevent package
30c59adda4 ci: Drop confusing comment (Hennadii Stepanov)
ef00a28414 ci: Add workaround for vcpkg's libevent package (Hennadii Stepanov)

Pull request description:

  This PR is necessary for Windows GHA [images](https://github.com/actions/runner-images/blob/win22/20250330.1/images/windows/Windows2022-Readme.md), which provide CMake >= 4.0.

  The idea has been taken from https://github.com/microsoft/vcpkg/pull/44273#discussion_r2009140242.

ACKs for top commit:
  maflcko:
    lgtm ACK 30c59adda4
  pinheadmz:
    ACK 30c59adda4

Tree-SHA512: 898a616a40c1aaec69d8a329d56f887cacec71b9588842feef2b689fbd21a12d8f8b3b4053a6373332008668960b9df7c71a44fcd97e637e250705daf1215c7f
2025-04-01 22:27:14 +01:00
John Bampton
4774a0c923 test: fix spelling in Python code comment 2025-04-02 07:20:41 +10:00
merge-script
1a6fc04d81
Merge bitcoin/bitcoin#29500: test: create assert_not_equal util
Some checks are pending
CI / test each commit (push) Waiting to run
CI / ASan + LSan + UBSan + integer, no depends, USDT (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
7bb83f6718 test: create assert_not_equal util and add to where imports are needed (kevkevin)

Pull request description:

  In the functional tests there are lots of cases where we assert != which we now swap with assert_not_equal to be more readable

  This is motivated/uses logic from this PR which was closed https://github.com/bitcoin/bitcoin/pull/28528
  This partially helps https://github.com/bitcoin/bitcoin/issues/23119

  I've broken it up to just `assert_not_equal` to keep the PR smaller as suggested in https://github.com/bitcoin/bitcoin/pull/28528#issuecomment-1959945805

  I can create follow up PR's if this is wanted

ACKs for top commit:
  hodlinator:
    re-ACK 7bb83f6718
  ryanofsky:
    Code review ACK 7bb83f6718. Only change since last review is fixing error message formatting and passing it as a keyword argument
  janb84:
    Re-ACK [7bb83f6](7bb83f6718)

Tree-SHA512: de09f41a690033a5b61e6f861d3bd69a32b889d6655a28fbc0d5cfac9f7ec9c642432967d33913970882b4cfdd47bdd377d0ddc44e25976cbaa49f7f9d8f7b10
2025-04-01 13:52:41 -04:00
Ryan Ofsky
6af68bb84b
Merge bitcoin/bitcoin#32166: torcontrol: Define tor reply code as const to improve our maintainability
8e4a0ddd50 torcontrol: Add comment explaining Proxy credential randomization for Tor privacy (Eval EXEC)
ec5c0b26ce torcontrol: Define tor reply code as const to improve maintainability (Eval EXEC)

Pull request description:

  This PR want to:
  1. replace tor repy code with const to improve out maintainability.
  2. cherry-picked https://github.com/bitcoin/bitcoin/pull/31973 , add comment to explain Proxy credential randomization for Tor privacy

ACKs for top commit:
  hodlinator:
    re-ACK 8e4a0ddd50
  laanwj:
    re-ACK 8e4a0ddd50

Tree-SHA512: 038daa6508ca88fceed5c8e155430614cb56976f36d1f8baee5114bca1141122cf94f51814a869848b3442691ee765cbf609cf946b2b35d5135015a9b749d917
2025-04-01 13:16:27 -04:00
Ryan Ofsky
6593293e47
Merge bitcoin/bitcoin#32110: contrib: document asmap-tool commands more thoroughly
6afffba34e contrib: (asmap) add docs about encode and decode commands (jurraca)
67d5cc2a06 contrib: (asmap) add documentation on diff and diff-addrs commands (jurraca)
e047b1deca contrib: (asmap) add diff-addrs example to README (jurraca)

Pull request description:

  This README was a little sparse in my opinion, and was missing a mention of the `diff-addrs` command.

  The README updates add background and examples for each command, split in two sections (encode/decode and diff/diff-addrs). This is intended to help people know how and when to run the commands available in the `asmap-tool.py` script.

  However, I could use some confirmation on the behavior of the `--fill` flag. It's true that files generated with this flag set cannot be used to diff files after the fact, but i don't quite follow what the fill flag does to make that true. sipa could you maybe provide some insight?

ACKs for top commit:
  fjahr:
    re-ACK 6afffba34e
  brunoerg:
    reACK 6afffba34e
  laanwj:
    re-ACK 6afffba34e

Tree-SHA512: 073e8d7255f7270aa2f5a070332872f5fa6fbe6532eee1f7e3e4158ac0125a49c155f4933bf00655ff3a89f666f3f3bea521e70c516ab09a448845016d2b880a
2025-04-01 12:43:23 -04:00
Ryan Ofsky
c8ade107c8
Merge bitcoin/bitcoin#31806: fuzz: coinselection: cover SetBumpFeeDiscount
0ff66b1c4a fuzz: coinselection: cover `SetBumpFeeDiscount` (brunoerg)

Pull request description:

  `SetBumpFeeDiscount` sets the bump fee discount which is used to calculate the waste. We currently have no fuzz coverage for this function, so this PR adds it by calling `SetBumpFeeDiscount` before `RecalculateWaste`.

ACKs for top commit:
  marcofleon:
    ACK 0ff66b1c4a

Tree-SHA512: d5c1d97daaeb7f9b096bf9bdf6374b8a674a75f464e2b9bb3e1e1774a5805b22840ca1f31bae63f106640d9ce27a99432c3034524340be91c235f6ec3b185cff
2025-04-01 12:40:01 -04:00
MarcoFalke
fa69c42fdf
refactor: Remove spurious virtual from final ~CZMQNotificationInterface 2025-04-01 18:33:33 +02:00
Ryan Ofsky
ea36d2720a
Merge bitcoin/bitcoin#31340: test: add missing segwitv1 test cases to script_standard_tests
8284229a28 refactor: deduplicate anchor witness program bytes (`0x4e,0x73`) (Sebastian Falbesoner)
41f2f058d0 test: add missing segwitv1 test cases to `script_standard_tests` (Sebastian Falbesoner)

Pull request description:

  Currently we have two segwitv1 output script types that are considered standard:
  - `TxoutType::WITNESS_V1_TAPROOT` (P2TR): witness program has size 32 (introduced with taproot soft-fork)
  - `TxoutType::ANCHOR` (P2A): witness program is {0x4e, 0x7e} (introduced with #30352)

  This PR adds them to the script standardness unit tests where missing, i.e. for using them with the `ExtractDestination` and `GetScriptForDestination` functions.

ACKs for top commit:
  rkrux:
    ACK  8284229a28
  instagibbs:
    reACK 8284229a28
  hodlinator:
    Code Review ACK 8284229a28

Tree-SHA512: d4a3b47fd31ba33f62d4367811e72a7f442c01b046b0a7217a66be0b9dea5c9041eebfe812c31839ec0f0b14c56948c7c016d3d2de79283583ad8e32c192c6ff
2025-04-01 12:32:27 -04:00
Ryan Ofsky
80e47b1920
Merge bitcoin/bitcoin#32096: Move some tests and documentation from testnet3 to testnet4
aa7a898c23 doc: use testnet4 in developer docs (Sjors Provoost)
6c217d22fd test: use testnet4 in argsman test (Sjors Provoost)
7c200ece80 test: use testnet4 in key_io_valid.json (Sjors Provoost)
d424bd5941 test: drop unused testnet3 magic bytes (Sjors Provoost)
8cfc09fafe test: cover testnet4 magic in assumeutxo.py (Sjors Provoost)
4281e3603a zmq: use testnet4 in zmq_sub.py example (Sjors Provoost)

Pull request description:

  In preparation for dropping testnet3 entirely in #31974 this PR migrates a few things to testnet4:

  * the ZMQ examples
  * developer docs
  * various unit tests
  * the snapshot magic byte check in `feature_assumeutxo.py`

  It drops `testnet3` from `MAGIC_BYTES` in the test framework, since no test uses it.

ACKs for top commit:
  fjahr:
    re-ACK aa7a898c23
  maflcko:
    lgtm ACK aa7a898c23 🔊
  hodlinator:
    re-ACK aa7a898c23

Tree-SHA512: 235f74273234e8fb2aedf0017dea5c16bb9813ec7a1f89a51abe85691f09830a5ead834115d7db0936e12e55a40bc81888856a8002fe507c1474407e77f8b9fb
2025-04-01 11:54:41 -04:00
Hennadii Stepanov
30c59adda4
ci: Drop confusing comment
GHA updates images anyway.
2025-04-01 15:14:57 +01:00
Hennadii Stepanov
ef00a28414
ci: Add workaround for vcpkg's libevent package
This change is necessary for Windows GHA images, which provide
CMake >= 4.0.
2025-04-01 15:02:47 +01:00
kevkevin
7bb83f6718
test: create assert_not_equal util and add to where imports are needed
In the functional tests there are lots of cases where we assert != which
this new util will replace, we also are adding the imports and the new assertion
2025-04-01 08:39:24 -04:00
MarcoFalke
fa51310121
contrib: Warn about using libFuzzer for coverage check 2025-04-01 11:34:29 +02:00
MarcoFalke
fa17cdb191
test: Avoid script check worker threads while fuzzing
Threads may execute their function any time after they are spawned, so
coverage could be non-deterministic.

Fix this,

* for the script check worker threads by disabling them while fuzzing.
* for the scheduler thread by waiting for it to fully start and run the
  service queue.
2025-04-01 10:22:20 +02:00
MarcoFalke
fa900bb2dc
contrib: Only print fuzz output on failure
This makes it humanly possible to track progress as only "[N/M]"-lines are printed as long as we succeed.

Also, use char (a, b) to indicate run_id instead of u8 (0, 1).
Also, use emojis to indicate final success or error.

Co-Authored-By: Hodlinator <172445034+hodlinator@users.noreply.github.com>
2025-04-01 10:22:16 +02:00
Ryan Ofsky
74d9598bfb
Merge bitcoin/bitcoin#32134: descriptors: Multipath/PR 22838 follow-ups
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
56f271e9b9 descriptors refactor: Clarify multipath data relationships through local struct (Hodlinator)
7e974f474e descriptors refactor: Use range-for and limit scope of seen_multipath (Hodlinator)
99a92efdd9 descriptors doc: Correct Markdown format + wording (Hodlinator)

Pull request description:

  Follows up on unresolved suggestions from #22838. In order of priority:

  1. Fixes a couple of typos [^1][^2] and indentation to conform to Markdown.
  2. Solves `for`-loop nit [^3] and also limits variable scope.
  3. Clarifies data relationships [^4][^5] by introducing `struct` rather than comments.

  [^1]: https://github.com/bitcoin/bitcoin/pull/22838#discussion_r1713711352
  [^2]: https://github.com/bitcoin/bitcoin/pull/22838#discussion_r1735039600
  [^3]: https://github.com/bitcoin/bitcoin/pull/22838#discussion_r1735041704
  [^4]: https://github.com/bitcoin/bitcoin/pull/22838#discussion_r1715150336
  [^5]: https://github.com/bitcoin/bitcoin/pull/22838#discussion_r1715151078

ACKs for top commit:
  Prabhat1308:
    re-ACK [`56f271e`](56f271e9b9)
  mabu44:
    tACK 56f271e9b9
  l0rinc:
    utACK 56f271e9b9
  rkrux:
    crACK 56f271e9b9

Tree-SHA512: 75777c911640038a3e0ea48601c0f55463a5f8ff5b3462d81e8992d9fc8f988d5a240e2166befa67a2a246696b0863f8e2508524c14697c490d3b229fe048996
2025-03-31 16:08:15 -04:00
MarcoFalke
fa82fe2c73
contrib: Use -Xdemangler=llvm-cxxfilt in deterministic-*-coverage
This makes the result more readable.
2025-03-31 17:48:28 +02:00
MarcoFalke
fa7e931130
contrib: Add optional parallelism to deterministic-fuzz-coverage
Co-Authored-By: Hodlinator <172445034+hodlinator@users.noreply.github.com>
2025-03-31 17:48:12 +02:00
merge-script
3358b1d105
Merge bitcoin/bitcoin#31176: ci: Test cross-built Windows executables on Windows natively
25b56fd9b4 ci: Test cross-built Windows executables on Windows natively (Hennadii Stepanov)
3501bca8c7 ci: Move "Windows cross" job from Cirrus CI to GHA CI (Hennadii Stepanov)
f8619196ce ci: Use `bash` by default for all platforms (Hennadii Stepanov)

Pull request description:

  This PR enables on the CI tests of cross-compiled Windows binaries on Windows.

  It is important to have such tests in CI because the release binaries for Windows are also cross-compiled.

  Two functional tests, `wallet_migration.py` and `wallet_multiwallet.py`, are temporarily disabled. They require fixes, such as https://github.com/bitcoin/bitcoin/pull/31410, and adjustments for error message handling. Re-enabling these tests will be addressed in follow-up PRs.

  Resolves https://github.com/bitcoin/bitcoin/issues/31071.

ACKs for top commit:
  davidgumberg:
    tested reACK 25b56fd9b4
  hodlinator:
    re-ACK 25b56fd9b4
  willcl-ark:
    utACK 25b56fd9b4
  maflcko:
    review-only ACK 25b56fd9b4 🍎

Tree-SHA512: fb9150807b7ebb248e8f4fe7b16e5179251e7be9336459287787f27e542583d73d937e6969667fd836378b676bb9be7f66756dc1abca8a01364bc9ee3e3720a5
2025-03-31 21:57:34 +08:00
Eval EXEC
8e4a0ddd50
torcontrol: Add comment explaining Proxy credential randomization for Tor privacy
Signed-off-by: Eval EXEC <execvy@gmail.com>
2025-03-31 21:14:08 +08:00
Eval EXEC
ec5c0b26ce
torcontrol: Define tor reply code as const to improve maintainability
Signed-off-by: Eval EXEC <execvy@gmail.com>
2025-03-31 14:20:30 +08:00
Hodlinator
56f271e9b9
descriptors refactor: Clarify multipath data relationships through local struct 2025-03-29 20:46:54 +01:00
Hodlinator
7e974f474e
descriptors refactor: Use range-for and limit scope of seen_multipath
* Range-for avoids ++i/i++ debate and decreases linecount.
* seen_multipath is only used if multipath_segment_index hasn't already been set. Rename it to seen_substitutes to better describe what it does, now that the context implies its involved in multipath.
2025-03-29 20:43:48 +01:00
Hennadii Stepanov
4c1906a500
Merge bitcoin/bitcoin#31992: cmake: Avoid fuzzer "multiple definition of `main'" errors
Some checks failed
CI / test each commit (push) Has been cancelled
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Has been cancelled
CI / macOS 14 native, arm64, fuzz (push) Has been cancelled
CI / Win64 native, VS 2022 (push) Has been cancelled
CI / Win64 native fuzz, VS 2022 (push) Has been cancelled
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Has been cancelled
57d8b1f1b3 cmake: Avoid fuzzer "multiple definition of `main'" errors (Ryan Ofsky)

Pull request description:

  This change builds libraries with `-fsanitize=fuzzer-no-link` instead of `-fsanitize=fuzzer` when the cmake `-DSANITIZERS=fuzzer` option is specified. This is necessary to make fuzzing and IPC cmake options compatible with each other and avoid CI failures in #30975 which enables IPC in the fuzzer CI build:

  https://cirrus-ci.com/task/5366255504326656?logs=ci#L2817
  https://cirrus-ci.com/task/5233064575500288?logs=ci#L2384

  The failures can also be reproduced by checking out #31741 and building with `cmake -B build -DBUILD_FOR_FUZZING=ON -DSANITIZERS=fuzzer -DENABLE_IPC=ON` with this fix reverted.

  The fix updates the cmake build so when `-DSANITIZERS=fuzzer` is specified, the fuzz test binary is built with `-fsanitize=fuzzer` (so it can use libFuzzer's main function), and libraries are built with `-fsanitize=fuzzer-no-link` (so they can be linked into other executables with their own main functions).

  Previously when `-DSANITIZERS=fuzzer` was specified, `-fsanitize=fuzzer` was applied to ALL libraries and executables. This was inappropriate because it made it impossible to build any executables other than the fuzz test executable without triggering link errors:

  - `` multiple definition of `main' ``
  - `` "undefined reference to `LLVMFuzzerTestOneInput' ``

  if they depended on any libraries instrumented for fuzzing.

  This was especially a problem when the `ENABLE_IPC` option was set because it made building the `mpgen` code generator impossible so nothing else that depended on generated sources, including the fuzz test binary, could be built either.

  This commit was previously part of https://github.com/bitcoin/bitcoin/pull/31741 and had some discussion there starting in https://github.com/bitcoin/bitcoin/pull/31741#pullrequestreview-2619682385

  ---

  This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/issues/28722).

ACKs for top commit:
  hebasto:
    ACK 57d8b1f1b3, tested on Ubuntu 24.04.

Tree-SHA512: 4011adbc0b08742e83cf7c0560d3d5b5694a863358e6ac9a21239626b4a8fedceca66db34b5a46136a7b26849bb1d8710c894689322ae97e1c407687c3f57d50
2025-03-29 10:09:38 +00:00
Ryan Ofsky
9acc25bcb6
Merge bitcoin/bitcoin#32153: wallet: remove redundant Assert call when block is disconnected
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 / Win64 native, VS 2022 (push) Waiting to run
CI / Win64 native fuzz, VS 2022 (push) Waiting to run
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
ae6b6ea296 wallet: remove redundant `Assert` call when block is disconnected (rkrux)

Pull request description:

  It was highlighted in a PR discussion previously that the recently moved `Assert` macro call inside the block disconnected loop had been redundant for quite a while because of the presence of the `assert` macro call at the start of the function. Therefore, it is removed now.

  refs #https://github.com/bitcoin/bitcoin/pull/31757#discussion_r1995416821

ACKs for top commit:
  fjahr:
    utACK ae6b6ea296
  l0rinc:
    crACK ae6b6ea296
  hodlinator:
    Code Review ACK ae6b6ea296
  Prabhat1308:
    Code Review ACK [`ae6b6ea`](ae6b6ea296)

Tree-SHA512: 6bbced88f4b39afcacefb7babe97c180a397d9cd55f18c4c2875bd594547dcdccb2059ac32495e0e8d4e7263b4c1349ca80b2f0fbd46b4450d1d847ba5abd903
2025-03-28 11:14:20 -04:00
merge-script
0a1e36effa
Merge bitcoin/bitcoin#32151: Follow-ups for txgraph #31363
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 / Win64 native, VS 2022 (push) Waiting to run
CI / Win64 native fuzz, VS 2022 (push) Waiting to run
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
a52b53926b clusterlin: add GetConnectedComponent (Pieter Wuille)
c7d5dcaa61 clusterlin: fix typos (Pieter Wuille)
777179bc27 txgraph: rename group_data in ApplyDependencies (Pieter Wuille)

Pull request description:

  This addresses a few review comments in #31363 after merge:
  * https://github.com/bitcoin/bitcoin/pull/31363#discussion_r2012730654 (rename `group_data` to `group_entry`)
  * https://github.com/bitcoin/bitcoin/pull/31363#discussion_r2015001561 (introduce `GetConnectedComponent` and use it in the txgraph fuzz test).
  * https://github.com/bitcoin/bitcoin/pull/31363#discussion_r2015003889 (typo in `FixLinearization`)
  * https://github.com/bitcoin/bitcoin/pull/32151#discussion_r2015764185 (more typos)

ACKs for top commit:
  instagibbs:
    ACK a52b53926b
  glozow:
    ACK a52b53926b

Tree-SHA512: e8a98101ecb9c09b860306c7fbd22cf20bd12990768879753680dfbf7db31283506d9f30bb7ee726daebd90c34a1c565d07b3e1147b2a87426247acb19058ed3
2025-03-28 10:32:45 +08:00
merge-script
e3c4bb12ba
Merge bitcoin/bitcoin#32058: test: get rid of redundant TODO tag
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 / Win64 native, VS 2022 (push) Waiting to run
CI / Win64 native fuzz, VS 2022 (push) Waiting to run
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
d065208f0f test: get rid of redundant TODO tag (Chandra Pratap)

Pull request description:

  The `FEE` parameter in `test/functional/feature_dbcrash.py::generate_small_transaction()` is not a fee rate, but an absolute fee. Hence, it doesn't make sense to replace it with node relay based fee calculation. Get rid of the TODO comment suggesting otherwise.

ACKs for top commit:
  maflcko:
    lgtm ACK d065208f0f

Tree-SHA512: f2b7f51ffb23de8e14ca071edd731410176a20750115a65db0ae67714389e03ffe1593ce88368e96d211329bd93c772f665de7c3a59b932681bc5b80db908d9f
2025-03-28 10:07:55 +08:00
Ryan Ofsky
930b237f16
Merge bitcoin/bitcoin#31874: qa wallet: Activate dormant checks in wallet_multisig_descriptor_psbt.py
35d17cd5ee qa wallet: Actually make use of expressions (Hodlinator)

Pull request description:

  Conditions had virtually no effect, lets activate them.

ACKs for top commit:
  maflcko:
    lgtm ACK 35d17cd5ee
  ryanofsky:
    Code review ACK 35d17cd5ee
  l0rinc:
    ACK 35d17cd5ee

Tree-SHA512: 852e325714e4f3083e28ef1a91c68250ee536d1c0ed09cac15d2ea74d47cefeffba19df4efe3d25d359ec8bc1588ce5bcf263efbcc2b392d102f5ff5c90307d4
2025-03-27 16:18:52 -04:00
Pieter Wuille
a52b53926b clusterlin: add GetConnectedComponent
This abstracts out the finding of the connected component that includes
a given element from FindConnectedComponent (which just finds any connected
component).

Use this in the txgraph fuzz test, which was effectively reimplementing this
logic. At the same time, improve its performance by replacing a vector with a
set.
2025-03-27 15:48:44 -04:00
jurraca
6afffba34e contrib: (asmap) add docs about encode and decode commands 2025-03-27 19:46:38 +00:00