47729 Commits

Author SHA1 Message Date
stratospher
fb3e1bf9c9 test: check LoadBlockIndex correctly recomputes invalidity flags
Add a test for block index transitioning from legacy
BLOCK_FAILED_CHILD to BLOCK_FAILED_VALID behavior.

In the scenario where a valid block has a BLOCK_FAILED_CHILD
parent and a BLOCK_FAILED_VALID grandparent, ensure that all
three blocks are correctly marked as BLOCK_FAILED_VALID
after reloading the block index.
2026-02-17 21:40:46 +05:30
stratospher
29740c06ac validation: remove BLOCK_FAILED_MASK
since it's the same as BLOCK_FAILED_VALID now
2026-02-17 21:40:46 +05:30
stratospher
b5b2956bda validation: reset BLOCK_FAILED_CHILD to BLOCK_FAILED_VALID when loading from disk
- there maybe existing block indexes stored in disk with
  BLOCK_FAILED_CHILD
- since they don't exist anymore, clean up block index entries with
  BLOCK_FAILED_CHILD and reset it to BLOCK_FAILED_VALID.
2026-02-17 21:40:46 +05:30
stratospher
37bc207852 validation: stop using BLOCK_FAILED_CHILD
even though we have a distinction between BLOCK_FAILED_VALID
and BLOCK_FAILED_CHILD in the codebase, we don't use it for
anything. since there's no functional difference between them
and it's unnecessary code complexity to categorise them correctly,
just mark as BLOCK_FAILED_VALID instead.
2026-02-17 21:40:28 +05:30
stratospher
120c631e16 refactor: use clearer variables in InvalidateBlock()
Improve upon the variable name for `invalid_walk_tip` to make the
InvalidateBlock logic easier to read. Block tip before disconnection
is now tracked directly via `disconnected_tip`, and `new_tip`
is the tip after the disconnect.

Co-authored-by: stickies-v <stickies-v@protonmail.com>
2026-02-17 21:39:39 +05:30
stratospher
18f11695c7 validation: don't update BLOCK_FAILED_VALID to BLOCK_FAILED_CHILD in InvalidateBlock
- there is no functional difference between BLOCK_FAILED_VALID and BLOCK_FAILED_CHILD
and it's unnecessary code complexity to correctly categorise them.
2026-02-09 18:36:24 +05:30
merge-script
acefdce083
Merge bitcoin/bitcoin#34469: consensus/test/doc: cover errors in CheckTxInputs with unit tests
8c03318387f6b3d1520a539f426b300bae316fc3 consensus/doc: explain `GetValueOut()` precondition (Lőrinc)
82ef92c8d006b3f5c3baaf00e5f8200d289d85d2 consensus/doc: explain unreachable `bad-txns-fee-outofrange` check (Lőrinc)
232a2bce90a96720f5c8d31413f1d14b4c9d90f2 consensus/test: add out-of-range output unit tests for `CTransaction::GetValueOut` (Lőrinc)
aa87aae14f9eee79e3a0fb9c0f5ff3eaa97433e2 consensus/test: add `MoneyRange` unit tests for `CheckTxInputs` (Lőrinc)

Pull request description:

  ### Problem
  Coverage reports indicate that a few consensus related validations aren't exercised in unit-, and some not even in the functional-tests:
  Inspired by the coverage reports:
  * ["bad-txns-premature-spend-of-coinbase"](https://maflcko.github.io/b-c-cov/test_bitcoin.coverage/src/consensus/tx_verify.cpp.gcov.html#L180): Only covered in functional tests
  * ["bad-txns-inputvalues-outofrange"](https://maflcko.github.io/b-c-cov/test_bitcoin.coverage/src/consensus/tx_verify.cpp.gcov.html#L187): Unreachable in functional tests [1], uncovered in unit tests
  * ["bad-txns-in-belowout"](https://maflcko.github.io/b-c-cov/test_bitcoin.coverage/src/consensus/tx_verify.cpp.gcov.html#L193): Only covered in functional tests
  * ["GetValueOut: value out of range"](https://maflcko.github.io/b-c-cov/test_bitcoin.coverage/src/primitives/transaction.cpp.gcov.html#L103) and [total coverage report](https://maflcko.github.io/b-c-cov/total.coverage/src/primitives/transaction.cpp.gcov.html#L103)

  Replacing them with explicit throws still passes all unit (and sometimes even functional) tests, confirming those branches are not being exercised, see: https://github.com/l0rinc/bitcoin/pull/112

  ### Fixes

  Add minimal unit test coverage for `Consensus::CheckTxInputs` invalid outcomes for `bad-txns-premature-spend-of-coinbase`, `bad-txns-inputvalues-outofrange`, `bad-txns-in-belowout`.
  Add a unit test covering `CTransaction::GetValueOut()` throwing for out of range values.
  After the prerequisits are tested, document why `bad-txns-fee-outofrange` is unreachable - while keeping the check in place because it is consensus-critical code.

ACKs for top commit:
  maflcko:
     lgtm ACK 8c03318387f6b3d1520a539f426b300bae316fc3 🍴
  darosior:
    utACK 8c03318387f6b3d1520a539f426b300bae316fc3
  sedited:
    ACK 8c03318387f6b3d1520a539f426b300bae316fc3

Tree-SHA512: 91c65dda99b42d12de99c58b02df0f861203f97d268329a3ecce79bd681fcaf847f508c1d9f2256b2b92a953a94d868cbae647f378def92484681d771722ea27
2026-02-09 13:13:19 +01:00
merge-script
7e5e0b20ea
Merge bitcoin/bitcoin#32773: cmake: Create subdirectories in build tree in advance
76dae5d6911b600fafa3a417a740f14b299284f3 cmake: Replace recursive globbing with explicit globbing in folders (Hennadii Stepanov)
88d909257104124bee3fc810f7fa32e5802b92fe cmake: Create subdirectories in build tree in advance (Hennadii Stepanov)

Pull request description:

  While reviewing https://github.com/bitcoin/bitcoin/pull/32697, I noticed that symlink creation fails when the target subdirectory does not exist. In such cases, `file(CREATE_LINK ... COPY_ON_ERROR SYMBOLIC)` falls back to copying, which implicitly creates the required path. As a result, a single file is copied instead of symlinked for subdirectories in `test/functional`.

  This PR ensures that necessary subdirectories are created in advance, so that subsequent symlink creation does not fail due to missing paths.

  For example:
  - on the master branch:
  ```
  $ cmake -B build
  $ ls -l build/test/functional/mocks/
  total 8
  -rwxrwxr-x 1 hebasto hebasto 2683 Jul  3 14:11 invalid_signer.py
  lrwxrwxrwx 1 hebasto hebasto   64 Jul  3 14:11 multi_signers.py -> /home/hebasto/dev/bitcoin/test/functional/mocks/multi_signers.py
  lrwxrwxrwx 1 hebasto hebasto   60 Jul  3 14:11 no_signer.py -> /home/hebasto/dev/bitcoin/test/functional/mocks/no_signer.py
  lrwxrwxrwx 1 hebasto hebasto   57 Jul  3 14:11 signer.py -> /home/hebasto/dev/bitcoin/test/functional/mocks/signer.py
  ```
  - with this PR:
  ```
  $ cmake -B build
  $ ls -l build/test/functional/mocks/
  total 4
  lrwxrwxrwx 1 hebasto hebasto 65 Jul  3 13:51 invalid_signer.py -> /home/hebasto/dev/bitcoin/test/functional/mocks/invalid_signer.py
  lrwxrwxrwx 1 hebasto hebasto 64 Jul  3 13:51 multi_signers.py -> /home/hebasto/dev/bitcoin/test/functional/mocks/multi_signers.py
  lrwxrwxrwx 1 hebasto hebasto 60 Jul  3 13:51 no_signer.py -> /home/hebasto/dev/bitcoin/test/functional/mocks/no_signer.py
  lrwxrwxrwx 1 hebasto hebasto 57 Jul  3 13:51 signer.py -> /home/hebasto/dev/bitcoin/test/functional/mocks/signer.py
  ```

ACKs for top commit:
  m3dwards:
    ACK 76dae5d6911b600fafa3a417a740f14b299284f3
  sedited:
    ACK 76dae5d6911b600fafa3a417a740f14b299284f3
  janb84:
    re ACK 76dae5d6911b600fafa3a417a740f14b299284f3

Tree-SHA512: a720a68752c72390b9452b192b06d09e41cac1080d32cfe3c2caabb65949626771e0709e7193f69677bd24a3c747e368c2323d9c857d4aa97e1890cc463850ed
2026-02-09 11:03:58 +00:00
merge-script
6d625af283
Merge bitcoin/bitcoin#32621: contrib: utxo_to_sqlite.py: add option to store txid/spk as BLOBs
7378f27b4fb512567b6152f986f67d9263d08d7a test: run utxo-to-sqlite script test with spk/txid format option combinations (Sebastian Falbesoner)
b30fca7498c93356fbdb8c2ce881aa8e548bae17 contrib: utxo_to_sqlite.py: add options to store txid/spk as BLOBs (Sebastian Falbesoner)

Pull request description:

  This PR is a late follow-up to https://github.com/bitcoin/bitcoin/pull/27432, introducing an option for the utxo-to-sqlite script to store the txid/scriptPubKey columns as bytes (= `BLOB` storage class in sqlite, see e.g. https://www.sqlite.org/datatype3.html in sqlite) rather than hex strings. This was proposed in earlier reviews (https://github.com/bitcoin/bitcoin/pull/27432#issuecomment-1516857024, https://github.com/bitcoin/bitcoin/pull/27432#issuecomment-1653739351) and has the obvious advantage of a significantly smaller size of the resulting database (and with that, faster conversion) and the avoidance of hex-to-bytes conversion for further processing of the data [1]. The rationale on why hex strings were chosen back then (and still stays the default, if only for compatibility reasons) is laid out in https://github.com/bitcoin/bitcoin/pull/27432#issuecomment-1516922824 [2].

  The approach taken is introducing new parameters `--spk` and `--txid` which can either have the values "hex", "raw" (for scriptpubkey) and "hex", "raw", "rawle" (for txid). Thanks to ajtowns for providing this suggestion. Happy to take further inputs on naming and thoughts on future extensibility etc.

  [1] For a concrete example, I found that having these columns as bytes would be nice while working on a SwiftSync hints generator tool (https://github.com/theStack/swiftsync-hints-gen), which takes the result of the utxo-to-sqlite tool as input.
  [2] note that in contrast what I wrote back then, I think there is no ambiguity on byte-string-serialization of txids; they are ultimately just hash results and hence, they should be stored as such, and adding a big/little endian knob wouldn't make much sense. The drawback of not being able to immediately show txid-strings (as one would need to do the bytes-reversal step first, which is not possible in sqlite, see e.g. https://github.com/bitcoin/bitcoin/pull/24952#issuecomment-1165499803) still remains though.

ACKs for top commit:
  ajtowns:
    ACK 7378f27b4fb512567b6152f986f67d9263d08d7a
  w0xlt:
    reACK 7378f27b4f
  sedited:
    ACK 7378f27b4fb512567b6152f986f67d9263d08d7a

Tree-SHA512: 265991a1f00e3d69e06dd9adc34684720affd416042789db2d76226e4b31cf20adc433a74d14140f17739707dee57e6703f72c20bd0f8dd08b6d383d3f28b450
2026-02-08 10:37:45 +01:00
merge-script
8f0e1f6540
Merge bitcoin/bitcoin#34465: refactor: separate log generation from log handling
37cc2a2d953c072a236b657bfd7de5167092a47a logging: use util/log.h where possible (stickies-v)
bb8e9e7c4c8d70914d0878a0d7c6a1371dae23c0 logging: Move message formatting to util/log.h (stickies-v)
001f0a428e3aa3f46aad373684beb3282bffb2c0 move-only: Move logging macros to util/log.h (stickies-v)
94c0adf4e857f3c58a7ab813eb33b83635101d75 move-onlyish: Move logging levels to util/log.h (stickies-v)
56d113cab0347a768daabccdfd76583e6b272dc4 move-only: move logging categories to logging/categories.h (stickies-v)
f5233f7e9827f8dd23414c7fcf49298420f9fc42 move-only: Move SourceLocation to util/log.h (stickies-v)

Pull request description:

  This is a mostly move-only change. It's a small refactoring that allows logging macros to be used by including a simple `util/log.h` header instead of the full `logging.h` logging implementation. Most of the changes here were cherry-picked from #34374.

  Original motivation for this change was to reduce the size and complexity of #34374 (kernel structured logging PR) and reduce the number of conflicts it causes with other PRs. But this should also make sense as a standalone change to have a clearer separation of concerns between log generation and log handling, and avoid needing to depend on the whole logging framework in call sites that only emit log messages.

  Recommended to review with `--color-moved=dimmed-zebra --color-moved-ws=ignore-all-space`

ACKs for top commit:
  l0rinc:
    diff ACK 37cc2a2d953c072a236b657bfd7de5167092a47a
  stickies-v:
    re-ACK 37cc2a2d953c072a236b657bfd7de5167092a47a
  optout21:
    crACK 37cc2a2d953c072a236b657bfd7de5167092a47a
  sedited:
    ACK 37cc2a2d953c072a236b657bfd7de5167092a47a

Tree-SHA512: c7a761323ae63f07ad290d4e3766ba1348a132c8cc68a9895fa9ae5c89206599c00646c42ef77223ac757b9d8bfe6c181bead15e7058e4d8966b3bac88a8f950
2026-02-07 23:01:17 +01:00
merge-script
b2805eec35
Merge bitcoin/bitcoin#34528: test: Fix intermittent failure in feature_assumevalid.py by ensuring invalid block was processed before checking debug.log
b73a62f667d0220a5700a02e11736684d2214b04 test: Ensure invalid block was processed before checking debug.log (Ava Chow)

Pull request description:

  Prior to merging a PR, I run 4 different build configurations and their tests in parallel, and consistently one of those will have `feature_assumevalid.py` fail. The failure is because the `assert_debug_log` context exits before the invalid block is processed, so the lines it is looking for don't appear in the part of the log that it is examining.

  This PR should resolve that issue by waiting for `getchaintips` to report that the invalid chain is invalid before exiting the `assert_debug_log` context.

ACKs for top commit:
  l0rinc:
    tested ACK b73a62f667d0220a5700a02e11736684d2214b04
  sedited:
    ACK b73a62f667d0220a5700a02e11736684d2214b04

Tree-SHA512: 96409ed55f686961c47949d31569d6be8e424d952883c92a9135a4e8a795047d4e2a86c9d27ef5653d21780717275434b0bca1586059cfd5088cd2c867c7baea
2026-02-07 15:08:08 +01:00
Hennadii Stepanov
72030efd4b
Merge bitcoin/bitcoin#34525: Release: Prepare "Open Transifex translations for v31.0" step
576f8920279820bca0caf2c32362ab9eb6e4ac1a qt: Update the `src/qt/locale/bitcoin_en.xlf` translation source file (Hennadii Stepanov)
4b9f5beafe9ee77209014093cc5318e037809126 Update Transifex slug for 31.x (Hennadii Stepanov)

Pull request description:

  This PR follows our [Release Process](46e1288df2/doc/release-process.md).

  It is required to open Transifex translations for v31.0, as scheduled in https://github.com/bitcoin/bitcoin/issues/33607.

  For reference, see the previous similar PR: https://github.com/bitcoin/bitcoin/pull/33152.

  **Note for reviewers:**

  To reproduce the diff in the last commit, run:
  ```
  cmake --preset dev-mode
  cmake --build build_dev_mode --target translate
  ```

ACKs for top commit:
  stickies-v:
    ACK 576f8920279820bca0caf2c32362ab9eb6e4ac1a

Tree-SHA512: 9875831b8ea6ace5b6e47fe10351bc7cdd26b9c27fe275f678c7f33f6df115ce3e956f9d522905b2fda76d82fc0a4135482cfb665c4428ab2bc1164c49cf82f4
2026-02-07 13:07:18 +00:00
merge-script
54bd49c7e3
Merge bitcoin/bitcoin#34452: test: split interface_ipc.py
633d1831199a2ca6ca31b97312130419328d5479 test: misc interface_ipc_mining.py improvements (Sjors Provoost)
52ccd9215e6700ce3090c63f3a3017a1ae21f98c test: split interface_ipc_mining.py into subtests (Sjors Provoost)
4e49fa2a68846f04cec0beb64c80ba53d3163528 test: add interface_ipc_mining.py (Sjors Provoost)
01a1ae889e5aa71d9ae4a76000265572ffcae99f test: move IPC helpers to ipc_util.py (Sjors Provoost)

Pull request description:

  This test has been growing too large, making it difficult to maintain. Especially when multiple pull requests change it.

  - move helper functions to `ipc_util.py`
  - move mining test to `interface_ipc_mining.py`, keeping only an interface sanity check in `interface_ipc.py`
  - split the tests in `interface_ipc_mining.py`
  - misc tweaks (to reduce churn in the above commits)

  Review hint:

  ```sh
  git show --color-moved=dimmed-zebra --color-moved-ws=ignore-space-change
  ```

ACKs for top commit:
  janb84:
    re ACK 633d1831199a2ca6ca31b97312130419328d5479
  fjahr:
    reACK 633d1831199a2ca6ca31b97312130419328d5479
  l0rinc:
    code review ACK 633d1831199a2ca6ca31b97312130419328d5479
  sedited:
    Re-ACK 633d1831199a2ca6ca31b97312130419328d5479

Tree-SHA512: 81bbbec1f03a6ff63068dbefc1bc4768fcd24313d84ba454bb2494fe4a65838dbaeb93ad7f02ed4c9932394f3d24638453bb51ce0e05f561dc613414beda37e4
2026-02-07 10:07:08 +01:00
Ava Chow
3b39a8aeb4
Merge bitcoin/bitcoin#34483: refactor: Use SpanReader over DataStream
fa0677d131191d7db9868c4c1b3d780cb6991226 refactor: Use SpanReader over DataStream (MarcoFalke)
fad3eb39564569e7b09982bec68ae41e45a04f87 refactor: Use SpanReader over DataStream (MarcoFalke)
fa06e26764bbd00fc225df5f4601dd4f687273e0 refactor: [qt] Use SpanReader to avoid two vector copies (MarcoFalke)
fabd4d2e2e3ce734730c56660a958f9cf9dc7d38 refactor: Avoid UB in SpanReader::ignore (MarcoFalke)
fa20bc2ec27522959cdf1ad35d54f080aafbfc47 refactor: Use empty() over eof() in the streams interface (MarcoFalke)
fa879db735281d2cce123dbd59d20c7339b2b4ee test: Read debug log for self-checking comment (MarcoFalke)

Pull request description:

  This changes all places, where possible, to use SpanReader over DataStream. This makes the code easier to read and reason about, because `SpanReader` can never write data. Also, the code should be minimally faster, because it avoids a full redundant copy of the whole vector of bytes.

ACKs for top commit:
  stickies-v:
    re-ACK fa0677d131191d7db9868c4c1b3d780cb6991226
  achow101:
    ACK fa0677d131191d7db9868c4c1b3d780cb6991226
  janb84:
    re ACK fa0677d131191d7db9868c4c1b3d780cb6991226
  sipa:
    crACK fa0677d131191d7db9868c4c1b3d780cb6991226

Tree-SHA512: 1d9f43fc6e71d481cf7b8f8457f479745ee331734649e9e2c2ab00ce5d317112796c77afc328612ed004e65ac5c16fc92279d760cfb012cfddce9098c4af810f
2026-02-06 18:00:18 -08:00
Ava Chow
6f68e0c8b7
Merge bitcoin/bitcoin#34181: refactor: [p2p] Make ProcessMessage private again, Use references when non-null
fa43897c1d14549e7af0d9f912e765875b634c39 doc: Fix LLM nits in net_processing.cpp (MarcoFalke)
bbbba0fd4b87a5441c90d513d2022f4c4d9678cb scripted-diff: Use references when nullptr is not possible (MarcoFalke)
fac54154660438db6a601584fa91f87bc09395b2 refactor: Separate peer/maybe_peer in ProcessMessages and SendMessages (MarcoFalke)
fac529188e0db44875f8728c9e0b6a05d2145e75 refactor: Pass Peer& to ProcessMessage (MarcoFalke)
fa376095a01c421523ec5d012c6aafb006011788 refactor: Pass CNode& to ProcessMessages and SendMessages (MarcoFalke)
fada8380148c1266f2cc1ddb0f65f42651c82a62 refactor: Make ProcessMessage private again (MarcoFalke)
fa80cd3ceed4eb58732c2f6f748277772a8a1c36 test: [refactor] Avoid calling private ProcessMessage() function (MarcoFalke)

Pull request description:

  There is a single unit test, which calls the internal `ProcessMessage` function. This is problematic, because it makes future changes harder, since they will need to carry over this public internal interface each time.

  Also, there is a mixed use of pointers and references in p2p code, where just based on context, a pointer may sometimes assumed to be null, or non-null. This is confusing when reading the code, or making or reading future changes.

  Fix both issues in a series of commits, to:

  * refactor the single unit test to call higher-level functions
  * Make `ProcessMessage` private again
  * Use references instead of implicit non-null pointers, mostly in a scripted-diff

ACKs for top commit:
  optout21:
    reACK fa43897c1d14549e7af0d9f912e765875b634c39
  ajtowns:
    ACK fa43897c1d14549e7af0d9f912e765875b634c39
  Crypt-iQ:
    crACK fa43897c1d14549e7af0d9f912e765875b634c39
  achow101:
    ACK fa43897c1d14549e7af0d9f912e765875b634c39

Tree-SHA512: d03d8ea35490a995f121be3d2f3e4a22d1aadfeab30bc42c4f8383dab0e6e27046260e792d9e5a94faa6777490ba036e39c71c50611a38f70b90e3a01f002c9e
2026-02-06 17:10:25 -08:00
Ava Chow
d88997b809
Merge bitcoin/bitcoin#34299: wallet: remove PreSelectedInputs and re-activate "AmountWithFeeExceedsBalance" error
48161f6a0503d7dde693ef544f0d3285c8b93adc wallet: introduce "tx amount exceeds balance when fees are included" error (stratospher)
b7fa609ed1759472b004ce03c217cf4a5e32262c wallet: remove PreSelectedInputs (stratospher)
7819da2c1643e9ca892f0fc97ffc2003ac265dac walllet: use CoinsResult instead of PreSelectedInputs (stratospher)
e5474079f179c5637b6c5f2077a1c5223ea357e1 wallet: introduce GetAppropriateTotal() in CoinsResult (stratospher)
d8ea921d01404cc0b63b277878d0f2f988a1daba wallet: correctly reserve in CoinsResult::All() (stratospher)
7072d825e39d200c5e49c736a281d3db180c716a wallet: ensure COutput added in set are unique (stratospher)
fefa3be782eaf3e2fbff3ed8772fb91f2134ac0d wallet: fix, make 'total_effective_amount' optional actually optional (stratospher)

Pull request description:

  picks up https://github.com/bitcoin/bitcoin/pull/25269.

  This PR re-implements the code path so that an error message is thrown when a transaction's total amount (including fees) exceeds the available balance. It also refactors the wallet's coin selection code.

  1. the first 3 commits are unrelated to the code but few small bug fixes which are nice to fix. but also kind of impacts the remaining logic. (could PR separately if reviewers wish)
  1. c467325aaf187d7f056bb1ea1cec6b7c4250af2e: make `total_effective_amount` optional actually optional
  2. 2202ab597596c84fc49f8784e823372b7a9efcbe: ensure `set<shared_ptr<COutput>>` has unique COutput
  3. a5ffbbf122d66fc4ad9b2e7c6d7d1dfa1816388e: Correctly reserve size when flattening `CoinsResult.coins` map to vector

  3. the next 3 commits from 4745d5480ca5c3809edd51140e4d2c0433582844 replace the `PreSelectedInputs` struct with `CoinsResult` and removes `PreSelectedInputs`.

  4. the last commit (e664484a6d34c1795ebb0925ab31faea5d64ab00) deals with the error message - `AmountWithFeeExceedsBalance` error inside `WalletModel::prepareTransaction` is never thrown and remains an unused code path. This is because `createTransaction` does not retrieve the fee when the process fails. The fee return arg is set only at the end of the process, when the transaction is successfully created. Therefore, if the transaction creation fails, the fee is not available inside `WalletModel::prepareTransaction` to trigger the `AmountWithFeeExceedsBalance` error.

  This PR re-implements the feature inside `CreateTransactionInternal` and adds test coverage for it.

  | on master | on PR |
  |-----------|-------|
  | <img src="https://github.com/user-attachments/assets/a903e687-2466-42c7-b898-5dec24bfe515" width="750" alt="Insufficient funds" /> | <img src="https://github.com/user-attachments/assets/74bb3c83-6132-4c09-91f0-0a446618b3c8" width="750" alt="AmountWithFeeExceedsBalance" /> |

  the unreachable code path is removed in https://github.com/bitcoin-core/gui/pull/807 which requires this PR.

ACKs for top commit:
  achow101:
    ACK 48161f6a0503d7dde693ef544f0d3285c8b93adc
  furszy:
    utACK 48161f6

Tree-SHA512: a963fac8d6714f76571df8cf9aff70601536dc6faa4326fbb5892c3f080dc393f0d7c6e2d21879c7a2c898bf0092adb154376d9b0a8929b31575ce9d1d47dec2
2026-02-06 14:30:20 -08:00
Ava Chow
b73a62f667 test: Ensure invalid block was processed before checking debug.log
In feature_assumevalid.py, we check that a modified block 102 is invalid
by asserting a message in the debug.log. However, this can
intermittently fail as exiting the assert_debug_log can occur before the
block has actually been validated, thus causing the test to fail as the
validation error message is not present in the chunk of the debug.log
being examined.

We can wait for the block to make an invalid chain tip to ensure that the log
line will be present.
2026-02-06 14:00:14 -08:00
Sjors Provoost
633d183119
test: misc interface_ipc_mining.py improvements
- share miniwallet and block create options between tests
- documentation fixes
- use assert_equal instead of assert ==
2026-02-06 15:46:31 +01:00
Sjors Provoost
52ccd9215e
test: split interface_ipc_mining.py into subtests
Split the Mining interface test into focused subtests.

Keep the initial tip-change pre-mine check in run_mining_interface_test.
As a result run_block_template_test no longer has newblockref.
2026-02-06 15:46:31 +01:00
Sjors Provoost
4e49fa2a68
test: add interface_ipc_mining.py
Split Mining interface tests into interface_ipc_mining.py and keep
interface_ipc.py for echo + simple inspectors.

Register the new test in test_runner.py.

The setup code around "Create Mining proxy object" is duplicated
in the new test file, but the simple insector checks below it
are not moved.
2026-02-06 15:46:31 +01:00
Sjors Provoost
01a1ae889e
test: move IPC helpers to ipc_util.py
Move IPC helpers into ipc_util.py and update interface_ipc.py
to use them.

Rename some helpers for clarity:
- parse_and_deserialize_block -> mining_get_block
- parse_and_deserialize_coinbase_tx -> mining_get_coinbase_tx
- get_coinbase_raw_tx -> mining_get_coinbase_raw_tx
- wait_next_template -> mining_wait_next_template
2026-02-06 15:44:06 +01:00
Hennadii Stepanov
28160c1e3d
Merge bitcoin/bitcoin#34421: ci: add Chimera Linux LTO config
d79249d2799e7f450d5708ca3366461f5f2069bc ci: add chimera Linux LTO CI job (fanquake)

Pull request description:

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

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

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

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

Tree-SHA512: 1174a7462bf2e7433a2c27a6cf398e94b05db42bb414629c71cf9f9a297ca269e173ae1b7517b30510b494b4397f918eef706d3c75c4286767c5557aeb6db4c7
2026-02-06 14:11:04 +00:00
Hennadii Stepanov
576f892027
qt: Update the src/qt/locale/bitcoin_en.xlf translation source file
Steps to reproduce the diff on Ubuntu 25.10:
```
cmake --preset dev-mode
cmake --build build_dev_mode --target translate
```
2026-02-06 13:45:34 +00:00
Hennadii Stepanov
4b9f5beafe
Update Transifex slug for 31.x
Update the Transifex slug to match the new resource created for the
upcoming 31.x branch.
2026-02-06 13:40:59 +00:00
merge-script
46e1288df2
Merge bitcoin/bitcoin#34498: iwyu: Fix patch to prefer <cstdint>
b65a3d80093b992a2574d5762a8cd03ce2eb4412 iwyu: Fix patch to prefer `<cstdint>` (Hennadii Stepanov)

Pull request description:

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

  This PR fixes this behavior.

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

Tree-SHA512: 695efdd44b92a642401738572e49c8b6591aa4463d387107fdf3d2f7c9c4b39f4097cb82413752caf9e8890dcca7246a894e562a1dd17023b05a7e455705beac
2026-02-06 13:37:14 +00:00
fanquake
d79249d279
ci: add chimera Linux LTO CI job 2026-02-06 12:03:18 +00:00
stratospher
48161f6a05 wallet: introduce "tx amount exceeds balance when fees are included" error
This was previously implemented at the GUI level but we never hit that
code path.

Co-authored-by: furszy <matiasfurszyfer@protonmail.com>
2026-02-06 16:27:22 +05:30
stratospher
b7fa609ed1 wallet: remove PreSelectedInputs 2026-02-06 16:27:22 +05:30
stratospher
7819da2c16 walllet: use CoinsResult instead of PreSelectedInputs
PreSelectedInputs is confusing to use. it's `total_amount`
might store total amount or effective amount based on SFFO.
ex: we might accidentally sum preselected inputs effective
amount (named `total_amount`) with automatically selected
inputs actual total amount.

CoinsResult has a cleaner interface with separate fields
for both these amounts.

2 behavioural changes:

1. no more default assert error if effective value is unset
    - previously PreSelectedInputs::Insert() called
      COutput::GetEffectiveValue() which assert failed
      if the optional was unset.
    - now we don't default assert anymore.
      * in GUI/getAvailableBalance better not to assert.
      * SelectCoins's preselected inputs always contain a
        feerate, so effective amount should be set.
        explicitly added an assertion to ensure this.

2. FetchSelectedInputs uses OutputType::UNKNOWN as key to
   populate CoinsResult's coins map. it's discarded later.
2026-02-06 16:27:21 +05:30
merge-script
0cd309c75e
Merge bitcoin/bitcoin#34492: ci: Drop valgrind fuzz from GHA matrix
faa4ab113cc9e300b3b8dce0c774d0a33a555883 ci: Drop valgrind fuzz from GHA matrix (MarcoFalke)

Pull request description:

  The valgrind fuzz task is problematic, because:

  * It is redundant with the msan fuzz task, which has std lib hardening enabled, so often UB is diagnosed before it even happens in the valgrind task.
  * All issues so far found by the valgrind fuzz task were also found by the hardened msan fuzz task.
  * All other issues were false-positives, which are hard to debug, and confusing and tedious to work around.

  I don't think there is any value in asking pull request authors to debug valgrind false-positives that they triggered by accident. So remove the task for now.

  I know that there are some devs, who like to keep the task, but if the task is kept, it should come with clear instructions on how to deal with false-postives in pull requests.

  I am not proposing to remove the config itself, and I am happy to continue maintaining it, like it was done before. However, as of now, running it in the GHA matrix is of negative or questionable benefit.

ACKs for top commit:
  l0rinc:
    ACK faa4ab113cc9e300b3b8dce0c774d0a33a555883
  fanquake:
    ACK faa4ab113cc9e300b3b8dce0c774d0a33a555883 - hopefully we can revisit re-adding soon. To be clear, I don't agree with the rationale from #34304, or the initial changes there. The case here, and the fact that it is causing disruption in this repo, is more pressing.

Tree-SHA512: 59272f4b5b01c3b8ee6078ea635441f17776d4d8923f1adacdabdbb00bd2eb0234b30dc5b27938e29f8e79b3c3bebed5f339ae36c2c8fb17ea9d3a2884bee986
2026-02-06 10:28:04 +00:00
MarcoFalke
fa0677d131
refactor: Use SpanReader over DataStream
This refactor does not change behavior. However, it avoids a vector
copy, which can lead to a minimal speed-up of 1%-5%, depending on the
call-site. This is mostly relevant for the fuzz tests and utils that
read large blobs of data (like a full block).
2026-02-06 07:56:57 +01:00
stratospher
e5474079f1 wallet: introduce GetAppropriateTotal() in CoinsResult
returns the total amount (if SFFO), otherwise the effective amount.
previously, this was the logic in calculating
PreSelectedInputs::total_amount when PreSelectedInputs::Insert()
was called.

return optional to force callers to explicitly handle the case
when effective amount optional is not set.
2026-02-06 09:36:22 +05:30
stratospher
d8ea921d01 wallet: correctly reserve in CoinsResult::All()
coins.size() would be the number of the OutputType keys in the map.
whereas Size() would return total number of COutput objects when
flattening the map.
2026-02-06 09:36:22 +05:30
stratospher
7072d825e3 wallet: ensure COutput added in set are unique
before #25806, set<COutput> was used and would not
contain same COutputs in the set.

now we use set<shared_ptr<COutput>> and it might be
possible for 2 distinct shared_ptr (different pointer
address but same COutputs) to be added into the set.

so preserve previous behaviour by making sure values
in the set are also distinct
2026-02-06 09:36:22 +05:30
stratospher
fefa3be782 wallet: fix, make 'total_effective_amount' optional actually optional
this is not needed for the remaining commits but good to fix
and came up in #25269 review.

Co-authored-by: furszy <matiasfurszyfer@protonmail.com>
2026-02-06 09:36:19 +05:30
Ava Chow
9ec1ae0e98
Merge bitcoin/bitcoin#34437: rpc: uptime should begin on application start
e67a676df9af5ece5307438ae1b4ddb0730e3482 fix: uptime RPC returns 0 on first call (Lőrinc)

Pull request description:

  ### Problem
  #34328 switched uptime to use monotonic time, but `g_startup_time` was a function-local static in `GetUptime()`, meaning it was initialized on first call rather than at program start.
  This caused the first uptime RPC to always return 0.

  ### Fix
  Move `g_startup_time` to namespace scope so it initializes at program start, ensuring the first `uptime()` call returns actual elapsed time.

  ### Reproducer

  Revert the fix and run the test or alternatively:

  ```bash
  cmake -B build && cmake --build build --target bitcoind bitcoin-cli -j$(nproc)
  ./build/bin/bitcoind -regtest -daemon
  sleep 10
  ./build/bin/bitcoin-cli -regtest uptime
  ./build/bin/bitcoin-cli -regtest stop
  ```

  <details>
  <summary>Before (uptime is initialized on first call)</summary>

  ```bash
  Bitcoin Core starting
  0
  Bitcoin Core stopping
  ```

  </details>

  <details>
  <summary>After (first uptime call is in-line with sleep)</summary>

  ```bash
  Bitcoin Core starting
  10
  Bitcoin Core stopping
  ```
  </details>

  ----

  Fixes #34423, added reporter as coauthor.

ACKs for top commit:
  maflcko:
    lgtm ACK e67a676df9af5ece5307438ae1b4ddb0730e3482
  optout21:
    crACK e67a676df9af5ece5307438ae1b4ddb0730e3482
  carloantinarella:
    Tested ACK e67a676df9af5ece5307438ae1b4ddb0730e3482
  achow101:
    ACK e67a676df9af5ece5307438ae1b4ddb0730e3482
  musaHaruna:
    Tested ACK [e67a676](e67a676df9)

Tree-SHA512: b156f7ed15c3fbb50e8a15f6c9a0d4e2ffb956d0c6ef949e0f8a661a564a20c0d3ed2149fae75ce7e2baa9326788d5037e726e7a7ac2c6ef4e70e4862cd5763f
2026-02-05 17:02:37 -08:00
Ava Chow
d692e07228
Merge bitcoin/bitcoin#32894: FUZZ: Test that BnB finds best solution
54d039305823f67688ec9116757d8244f84badc6 FUZZ: Test that BnB finds best solution (Murch)

Pull request description:

  BnB’s solution is the input set with the lowest waste score, excluding any supersets of other solution candidates.
  This fuzz test compares a brute force search with the BnB result to ensure that BnB succeeds.

ACKs for top commit:
  achow101:
    ACK 54d039305823f67688ec9116757d8244f84badc6
  brunoerg:
    ACK 54d039305823f67688ec9116757d8244f84badc6

Tree-SHA512: 96b6a822f53311d9a76abe8c217794e0a2dd5bd713db0a15dc70e065099b8245c430e1174e24133e0a802218ff0f2943dfcc3d638c3716485d5607c452854e7d
2026-02-05 13:32:24 -08:00
Hennadii Stepanov
28d8607882
Merge bitcoin/bitcoin#34504: build: replace WERROR with CMAKE_COMPILE_WARNING_AS_ERROR
322c4ec4422a2e03fc81e61b1315b1245ba47d2f build: replace WERROR with CMAKE_COMPILE_WARNING_AS_ERROR (fanquake)

Pull request description:

  `CMAKE_COMPILE_WARNING_AS_ERROR` was added to CMake in 3.24.

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

  Potential alternative to #33297. Closes #33284.

  See https://cmake.org/cmake/help/latest/prop_tgt/COMPILE_WARNING_AS_ERROR.html.

ACKs for top commit:
  purpleKarrot:
    re-ACK 322c4ec4422a2e03fc81e61b1315b1245ba47d2f
  maflcko:
    review ACK 322c4ec4422a2e03fc81e61b1315b1245ba47d2f 📩
  hebasto:
    re-ACK 322c4ec4422a2e03fc81e61b1315b1245ba47d2f.

Tree-SHA512: 1e9b41e87568c1021aecf9414cfc70a3215d1663a13adb1f32493f2dba18978b53888520775d1aa2945224b0404ef83bda0837dddf5f8a089cafb940b856598c
2026-02-05 18:58:58 +00:00
Ava Chow
ad1940a006
Merge bitcoin/bitcoin#34517: drop my key from trusted-keys
f2b8acc0edb6f1acf58cd3d7423d6ad60e8d90c8 remove glozow from trusted keys (glozow)

Pull request description:

  As planned!

  Also bump trusted-git-root to 88a7294356e75bbaa136c9427c64e239f7c6fd40, which is the last merge signed with this key.

ACKs for top commit:
  achow101:
    ACK f2b8acc0edb6f1acf58cd3d7423d6ad60e8d90c8
  stickies-v:
    ACK f2b8acc0edb6f1acf58cd3d7423d6ad60e8d90c8

Tree-SHA512: e68025c519ab003ad464783325502c1a6a3f560c0708a9383332cb0971be2039f462fc95f85373bb075191c165ca8e3904312a66e41b52d1b99dd2a8a837be9a
2026-02-05 10:06:17 -08:00
fanquake
322c4ec442
build: replace WERROR with CMAKE_COMPILE_WARNING_AS_ERROR
-Werror is added to the previous releases job, given it runs on Ubuntu
22.04, which uses an older CMake.

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

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

Co-authored-by: willcl-ark <will8clark@gmail.com>
2026-02-05 16:39:14 +00:00
Hennadii Stepanov
eb97250421
Merge bitcoin/bitcoin#34496: build: don't pass on boost dependency to kernel consumers
a50d0b6720f300987d2b3d82f4fb3a2336259887 build: don't pass on boost dependency to kernel consumers (Cory Fields)

Pull request description:

  This is unnecessary now that the kernel now exports a (boost-less) API.

  Noticed while slimming down boost dependencies in #34495.

ACKs for top commit:
  stickies-v:
    ACK a50d0b6720f300987d2b3d82f4fb3a2336259887
  hebasto:
    ACK a50d0b6720f300987d2b3d82f4fb3a2336259887, I have reviewed the code and it looks OK. I tested it by applying the Boost-specifc commits from https://github.com/bitcoin/bitcoin/pull/34143 and building with depends.

Tree-SHA512: e2d12356f41dd51dd729362121a33bd4f395821d53dd9a0bb0d5d6a53aba2ca2064e0709d9799dc6751b3d61ea576d2efc0e28296fdba26f2809dbcb0feabe44
2026-02-05 12:18:51 +00:00
merge-script
9d76947294
Merge bitcoin/bitcoin#34464: Change BlockRequestAllowed() to take ref (minor refactor)
1f8f7d477ae0d33bd96f7936889c17bd40805fb9 Change BlockRequestAllowed() to take ref (optout)

Pull request description:

  As [suggested here](https://github.com/bitcoin/bitcoin/pull/34416#discussion_r2745302958), a minor refactor of `PeerManagerImpl::BlockRequestAllowed()` to take reference parameter (instead of pointer). The motivation is to make the code safer, by minimizing the risk of null-dereference, and to be more consistent.
  The change is local to the `PeerManagerImpl::BlockRequestAllowed()` class.
  Related to #34440.

ACKs for top commit:
  maflcko:
    review ACK 1f8f7d477ae0d33bd96f7936889c17bd40805fb9 🎐
  l0rinc:
    tested ACK 1f8f7d477ae0d33bd96f7936889c17bd40805fb9
  stickies-v:
    ACK 1f8f7d477ae0d33bd96f7936889c17bd40805fb9

Tree-SHA512: 9c2de2d3e7d067e018db7ec54c79f512ccc1da54574d4fb362f6697ee6e235783779d7094cf20856cd34e08a1dbc74609d8351fe7b2287cd8ec0c836ef07be19
2026-02-05 10:56:37 +00:00
merge-script
41b9b76cce
Merge bitcoin/bitcoin#34510: doc: fix broken bpftrace installation link
42ee31e80c99bdb4d6affdc9dc22a0f3d5da7b59 doc: fix broken bpftrace installation link (jayvaliya)

Pull request description:

  The bpftrace project has moved from the `iovisor` organization to its own
  `bpftrace` organization on GitHub. The old installation documentation link
  (`https://github.com/iovisor/bpftrace/blob/master/INSTALL.md`) is now broken (404).

  The project also restructured their documentation - installation instructions
  are now in the README.md under the "Quick Start" section rather than a
  separate INSTALL.md file.

ACKs for top commit:
  maflcko:
    lgtm ACK 42ee31e80c99bdb4d6affdc9dc22a0f3d5da7b59

Tree-SHA512: 5320e747b77fe9bb347a98396364f3942214b6d3ee69707f62452df0aaaa2f6cfd58fc3b6155f64c4acb00f1a4dba8a751618805e75b823454c73ac93877ad4f
2026-02-05 09:36:47 +00:00
jayvaliya
42ee31e80c doc: fix broken bpftrace installation link
The bpftrace project moved from iovisor/bpftrace to bpftrace/bpftraceand
removed the separate INSTALL.md file. Installation instructionsare now
in the README.md Quick Start section.
2026-02-05 14:07:25 +05:30
Murch
54d0393058
FUZZ: Test that BnB finds best solution
BnB’s solution is the input set with the lowest waste score, excluding
any supersets of other solution candidates.
This fuzz test compares a brute force search with the BnB result to
ensure that BnB succeeds.
2026-02-04 13:59:35 -08:00
Ava Chow
4ae00e9a71
Merge bitcoin/bitcoin#32636: Split CWallet::Create() into CreateNew and LoadExisting
db2effaca4cf82bf806596d16f9797d3692e2da7 scripted-diff: refactor: CWallet::Create() -> CreateNew() (David Gumberg)
27e021ebc0dd3517a71f3ddb38ed265a19693d4c wallet: Correctly log stats for encrypted messages. (David Gumberg)
d8bec61be233b9cb6d5db886e8f1c1f058288fb5 wallet: remove loading logic from CWallet::Create (David Gumberg)
f35acc893fb3378b2ad39608fe254d33af6cce9f refactor: wallet: Factor out `WriteVersion()` from `PopulateWalletFromDB()` (David Gumberg)
e12ff8aca049ec7b054cb3047a167c7ce8dbd421 test: wallet: Split create and load (David Gumberg)
70dbc79b09acf7b1515532ee20c7533c938ffb70 wallet: Use CWallet::LoadExisting() for loading existing wallets. (David Gumberg)
ae66e011646266abb67b31027bc29e0ce1d08ad4 wallet: Create separate function for wallet load (David Gumberg)
bc69070416c62a88d8f4029280ec10d6f9ec8d20 refactor: Wallet stats logging in its own function (David Gumberg)
a9d64cd49c69dafd6496ccb5aef4cd6d8898966b wallet: Remove redundant birth time update (David Gumberg)
b4a49cc7275efc16d4a4179ed34b50de5bb7367e wallet: Move argument parsing to before DB load (David Gumberg)
b15a94a618c53041e97ccfface3045a0642777e1 refactor: Split out wallet argument loading (David Gumberg)
a02c4a82d88a3e9a24ec2aa0b828b8cc533dde58 refactor: Move -walletbroadcast setting init (David Gumberg)
411caf72815bdf2e176e790a4c63f745517c4bb4 wallet: refactor: PopulateWalletFromDB use switch statement. (David Gumberg)
a48e23f566ccaf9b81fe0684885972d9ee34afd3 refactor: wallet: move error handling to PopulateWalletFromDB() (David Gumberg)
0972785fd723b9b3c84844bf999d6e08e163ef9d wallet: Delete unnecessary PopulateWalletFromDB() calls (David Gumberg)
f0a046094e4c4b5f3af0e453492077f4911e0132 scripted-diff: refactor: CWallet::LoadWallet->PopulateWalletFromDB (David Gumberg)

Pull request description:

  This PR is mostly a refactor which splits out logic used for creating wallets and for loading wallets, both of which are presently contained in `CWallet::Create()` into `CWallet::CreateNew()` and `CWallet::LoadExisting()`

  The real win of this PR is that `CWallet::Create()` uses a very bad heuristic for trying to guess whether or not it is supposed to be creating a new wallet or loading an existing wallet:

  370c592612/src/wallet/wallet.cpp (L2882-L2885)

  This heuristic assumes that wallets with no `ScriptPubKeyMans` are being created, which sounds reasonable, but as demonstrated in #32112 and #32111, this can happen when the user tries to load a wallet file that is corrupted, both issues are fixed by this PR and any other misbehavior for wallet files which succeeded the broken heuristic's sniff test for new wallets.

  It was already the case that every caller of `CWallet::Create()` knows whether it is creating a wallet or loading one, so we can avoid replacing this bad heuristic with another one, and just shift the burden to the caller.

ACKs for top commit:
  achow101:
    ACK db2effaca4cf82bf806596d16f9797d3692e2da7
  polespinasa:
    approach ACK db2effaca4cf82bf806596d16f9797d3692e2da7
  w0xlt:
    reACK db2effaca4cf82bf806596d16f9797d3692e2da7
  murchandamus:
    ACK db2effaca4cf82bf806596d16f9797d3692e2da7
  rkrux:
    ACK db2effaca4cf82bf806596d16f9797d3692e2da7

Tree-SHA512: c28d60e0a3001058da3fd2bdbe0726c7ebe742a4b900a1dee2e5132eccc22e49619cb747a99b4032b000eafd4aa2fdd4ec244c32be2012aba809fdc94b5f6ecd
2026-02-04 11:06:36 -08:00
merge-script
d4bc620ad8
Merge bitcoin/bitcoin#34488: refactor: Small style and test fixups for bitcoinkernel
fad9dd1a8891770846f3f98c60bebf2c2bf72e05 test: kernel test fixups (MarcoFalke)
fabb58d42dc203b91f6ec6261f4bac94ee8df0a2 test: Use clang-tidy named args for create_chainman (MarcoFalke)
fa51594c5c0fe27e55d580dfab046e1226c6d83b refactor: Small style fixups in src/kernel/bitcoinkernel.cpp (MarcoFalke)

Pull request description:

  Just some small style and test fixups after https://github.com/bitcoin/bitcoin/pull/30595#pullrequestreview-3420542946

ACKs for top commit:
  stickies-v:
    re-ACK fad9dd1a8891770846f3f98c60bebf2c2bf72e05
  frankomosh:
    Code Review ACK fad9dd1a8891770846f3f98c60bebf2c2bf72e05. All changes are sound refactoring with no functional issues. Nice improvements to readability (named args in create_chainman, span.data(), range checks now properly require non-empty).

Tree-SHA512: 0a92e871b4db75a590acad39672594625e402895bc0d36635d36ec2fe8dce7cc2c5cb6ebf2a92bc14617d94648b84bffb95ff783cea71bd91ac4a9871ef5dbef
2026-02-04 13:48:21 +00:00
merge-script
eb3dbbaf30
Merge bitcoin/bitcoin#34493: contrib: Remove valgrind suppression for bug 472219
fa33acec89f08b747449dbcd5248ee6d448a6648 Revert "valgrind: add suppression for bug 472219" (MarcoFalke)

Pull request description:

  Now that several Alpine releases are out, it seems fine to remove this suppression.

  This should work since Alpine 3.19: https://pkgs.alpinelinux.org/packages?name=valgrind&branch=v3.19&repo=&arch=aarch64, which just dropped out of `main` support (https://alpinelinux.org/releases/)

ACKs for top commit:
  fanquake:
    ACK fa33acec89f08b747449dbcd5248ee6d448a6648

Tree-SHA512: 2a58475d20f8214c012b77efb7fe145e810a1506736341f8debea74dabd31499899a968bc2d4a88008b2a3878b4fe5e48fa14c83a2e943a91943bf0e1e159b6f
2026-02-04 10:50:05 +00:00
merge-script
1e64aeaaec
Merge bitcoin/bitcoin#34295: test: Improve STRICTENC/DERSIG unit tests
4dfb6eef70d719a79904cabc4519d7a725de130a test: Add DERSIG tests to script_tests (billymcbip)
884978f3894ac7d96f113a00bbcce45c9785d44a test: Fix a STRICTENC test in script_tests (billymcbip)
527e8ca7b54515e129484824e4df66b5dafdb45f test: Remove outdated comment in script_tests (billymcbip)

Pull request description:

  1. Remove a comment referencing a file that no longer exists in the codebase: `script_invalid.json`.

  2. Fix a test that isn't implemented as intended. The idea is to test execution order by providing a signature that would cause script failure when parsed. An empty signature does not cause script failure in `CHECKMULTISIG`. Use `OP_1` for the second signature instead of `OP_0`.

  3. Copy existing `STRICTENC` tests and change the flag to `DERSIG`. `DERSIG` is a consensus flag (unlike `STRICTENC`), so it'd be good to have dedicated test cases.

  `script_tests` pass on my end.

ACKs for top commit:
  darosior:
    reACK 4dfb6eef70d719a79904cabc4519d7a725de130a
  sipa:
    ACK 4dfb6eef70d719a79904cabc4519d7a725de130a

Tree-SHA512: aea4aa5199530804561e9f597f69d6cffd7a40d4830919f9371fe97e4d04d8f10e8ed29b91e65e007a3f6e3a38e2881f88dff25831e741ad7592a12ed02b801a
2026-02-04 09:37:56 +00:00
Hennadii Stepanov
b65a3d8009
iwyu: Fix patch to prefer <cstdint>
The goal of the patch is to suggest C++ headers rather than their C
counterparts. However, for fixed width integer types, the patched IWYU
currently suggests `<cinttypes>` where `<cstdint>` is sufficient.

This change fixes this behavior.
2026-02-04 08:28:10 +00:00