48259 Commits

Author SHA1 Message Date
merge-script
ff7cdf633e
Merge bitcoin/bitcoin#34816: test: Remove vulture from ci, Remove some --min-confidence=60 unused code
fa90b21430b4f3bae6f4092a27e611bb06f2777f test: Remove unused feature_segwit.py functions (MarcoFalke)
fa6b05c96ffb6cef42bf8907759d0d99f97a2e22 test: Remove unused CUSTOM_._COUNT (MarcoFalke)
fa7bac94d87a1b25f8b33ebd29ce47bf442f137e test: Remove unused wait_for_addr, firstAddrnServices, on_addr (MarcoFalke)
fa388a35855cc53d1a48d464c1bdcf793a0e2968 test: Remove unused self.p2p_conn_index = 1 (MarcoFalke)
fa803710e2783c92e803d0c4e57ae32b34947738 test: Remove unused AddressType (MarcoFalke)
fab5072ce1396484b9caa7320da4dc3c98070adc ci: Remove vulture (MarcoFalke)

Pull request description:

  Currently, `vulture` is run with `--min-confidence=100`, which reduces its checks to dead code after control statements, which is nice, but not really a common nor severe issue. See the discussion in https://github.com/bitcoin/bitcoin/issues/34810#issuecomment-4045927137 and commit 5c005363a880c136cc44ff2456a402e398fcbf44, which had to remove dead code manually.

  Reducing the confidence has shown to be too brittle/tedious in the past, so remove the tool for now from CI.

  Of course, removing this from CI does not prevent anyone from running it locally and removing dead code.

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

ACKs for top commit:
  fanquake:
    ACK fa90b21430b4f3bae6f4092a27e611bb06f2777f
  willcl-ark:
    ACK fa90b21430b4f3bae6f4092a27e611bb06f2777f

Tree-SHA512: 6a5998470dae3a17baec29b70b02333f4cd9b81bc4c6a05b56085ff1ba527ed7bdeccd17b09d9ad785ae03c97982ee1f3147e4df3bd537c66b02e9a44d0e5f15
2026-03-16 12:46:50 +08:00
Ava Chow
92a3d30f38
Merge bitcoin/bitcoin#34418: qa: Make wallet_multiwallet.py Windows crossbuild-compatible
111864ac30126dc64a9e21d4e1b5e3d9ef4e5358 qa: Avoid duplicating output in case the diff is the same (Hodlinator)
c2e28d455af8fbb8d6074dc26590e61b9764d761 ci: Enable `wallet_multiwallet.py` in "Windows, test cross-built" job (Hodlinator)
850a80c1999e671b6cce33d8545af06adf5f77f0 qa: Disable parts of the test when running under Windows or root (Hodlinator)
fb803e3c79e52305df74ae30e77fd36900a49c24 qa: Test scanning errors individually (Hodlinator)
ed43ce57cce53612f13ac7c6db59fa7ac60e31c4 qa: Check for platform-independent part of error message (Hodlinator)
64a098a9b6263dbdeea25f89f4c9fe3c53943dd1 refactor(qa): Break apart ginormous run_test() (Hodlinator)
bb1aff7ed7e4bd6618dfe75b5faa9956c3adead4 move-only(qa): Move wallet creation check down to others (Hodlinator)
d1a4ddb58ef676d4e7436cc3bcdf5fb3008b4b6f refactor(qa): Lift out functions to outer scopes (Hodlinator)
c811e47367d531b69c10e3fc976df764e79f13e2 scripted-diff: self.nodes[0] => node (Hodlinator)
73cf858911056717a4ebe97cd250f3a506136eff refactor(qa): Remove unused option (Hodlinator)

Pull request description:

  Makes the functional test compatible with *Linux->Windows cross-built executables*.

  Main parts:
  * Commit "qa: Check for platform-independent part of error message" switches to match on platform-independent part of error message.
  * Commit "qa: Test scanning errors individually" disentangles code causing the same error message substring, based on #31410.
  * Commit "qa: Disable parts of the test when running under Windows or root" enables the test to be run on Windows, based in part on https://github.com/bitcoin/bitcoin/pull/31410#issuecomment-3554721014.

  Also:
  * Removes unused option in wallet_multiwallet.py.
  * Breaks apart wallet_multiwallet.py's `run_test()` into smaller test functions.
  * Improves `assert_equal()` output for dicts.

  Fixes #31409.

ACKs for top commit:
  achow101:
    ACK 111864ac30126dc64a9e21d4e1b5e3d9ef4e5358
  janb84:
    re ACK 111864ac30126dc64a9e21d4e1b5e3d9ef4e5358
  w0xlt:
    reACK 111864ac30126dc64a9e21d4e1b5e3d9ef4e5358

Tree-SHA512: 4e3ff92588ac9f2611fc963ce62097b6c0dd4d4eb8da7952c72619c7b554ff3cae5163fe1886d4d9bbd7af1acca5b846411e7f5b46f9bddb08719b61108efbba
2026-03-13 15:45:47 -07:00
Ava Chow
abaadc3d5b
Merge bitcoin/bitcoin#31774: crypto: Use secure_allocator for AES256_ctx
af0da2fce2146a005f54b900a1fd545a6278173a crypto: Use `secure_allocator` for `AES256CBC*::iv` (David Gumberg)
d53852be316dd2322a7e621a81ee33e1b234c530 crypto: Use `secure_allocator` for `AES256_ctx` (David Gumberg)
8c6fedaa81882be1e2db4a9a2291205d774fa4c6 build: `lockedpool.cpp` kernel -> crypto (David Gumberg)
51ac1abf6fdb6340110397a959681d52e29f73f7 bench: Add wallet encryption benchmark (David Gumberg)
9a158725161f726eb6747811e9e9335eef83f616 wallet: Make encryption derivation clock mockable (David Gumberg)
ae5485fa0d258f060a22c399a4e257eaf96e67b5 refactor: Generalize derivation target calculation (David Gumberg)

Pull request description:

  Fixes #31744

  Reuse `secure_allocator` for `AES256_ctx` in the aes 256 encrypters and decrypters and the `iv` of `AES256CBC` encrypters and decrypters. These classes are relevant to `CCrypter`, used for encrypting wallets, and my understanding is that if an attacker knows some or all of the contents of these data structures (`AES256_ctx` & `iv`) they might be able to decrypt a user's wallet.

   Presently the `secure_allocator` tries to protect sensitive data with `mlock()` on POSIX systems and `VirtualLock()` on Windows to prevent memory being paged to disk, and by zero'ing out memory contents on deallocation with `memory_cleanse()` which is similar to `OPENSSL_cleanse()` by scaring compilers away from optimizing `memset` calls on non-Windows systems, and using `SecureZeroMemory()` on Windows.

ACKs for top commit:
  achow101:
    ACK af0da2fce2146a005f54b900a1fd545a6278173a
  furszy:
    utACK af0da2fce2146a005f54b900a1fd545a6278173a
  theStack:
    re-ACK af0da2fce2146a005f54b900a1fd545a6278173a

Tree-SHA512: 49067934fd2f2b285fc7b1a7c853fd2d4475431b3a811ae511f61074dc71a99a0826c3ab40ab4a5dfc84b2b9914a90c920d2484b38ac19502e3bd6170ad27622
2026-03-13 13:34:35 -07:00
Ava Chow
16a02bf5af
Merge bitcoin/bitcoin#33451: doc: Add INSTALL.md to Linux release tarballs
d62f46eed4be8998f4aa75e20bd0dca2e453313f doc: Add `INSTALL.md` to Linux release tarballs (Hennadii Stepanov)

Pull request description:

  Closes https://github.com/bitcoin/bitcoin/issues/32097:
  > Better I think would be to add instructions for the most popular desktop distros.

ACKs for top commit:
  willcl-ark:
    utACK d62f46eed4be8998f4aa75e20bd0dca2e453313f
  achow101:
    ACK d62f46eed4be8998f4aa75e20bd0dca2e453313f
  janb84:
    re ACK d62f46eed4be8998f4aa75e20bd0dca2e453313f
  w0xlt:
    ACK d62f46eed4be8998f4aa75e20bd0dca2e453313f
  sedited:
    ACK d62f46eed4be8998f4aa75e20bd0dca2e453313f

Tree-SHA512: eab6904b6acc63eaf0e13112f52d856ee630ce4110fb368f4f5f170655def91706bb7c7f70c123186a51461ea3d48ef026a4e026d665675f1fd76f2d0bbca68c
2026-03-13 13:20:04 -07:00
merge-script
390e7d61bd
Merge bitcoin/bitcoin#34787: build: fix native macOS deployment
d03e3be246f64065002268e74ee9a834089de37a ci: check macos bundle structure and codesigning (fanquake)
66d80d57b48982d8301e21321a9d82780586908d macdeploy: use plugins dir to find plugins (fanquake)
ab137cbfe2763f2306e52c7c5f1860d87defc636 macdeploy: subprocess out to zip rather than shutil.make_archive (fanquake)

Pull request description:

  Fix bundle format.
  Add a CI check that codesigning works.
  Fixes #34744.

ACKs for top commit:
  Sjors:
    tACK d03e3be246f64065002268e74ee9a834089de37a
  hebasto:
    ACK d03e3be246f64065002268e74ee9a834089de37a, tested on macOS Tahoe 26.3.1.
  sedited:
    ACK d03e3be246f64065002268e74ee9a834089de37a

Tree-SHA512: 5a7db896952edf338ff4fe8c934f1e1c992642850a99d5fafbb1212c6979601b3b72b6f3af880fb6f6ac8759cd4102e9f01792abb05410ceaf36cbffaec48e47
2026-03-13 11:16:48 +01:00
merge-script
5440280891
Merge bitcoin/bitcoin#34745: refactor: replace ArgsManager::cs_args RecursiveMutex with Mutex
20fb7618b001937befbf8757e5881674b4a55147 args: make most ArgsManager members private (w0xlt)
22b40f34f33f5e5555d0b378f005516ecfb45e6c args: replace cs_args RecursiveMutex with Mutex (w0xlt)
3a16ec8582bee1dfc82857205ba1037c17a735cb test: scope cs_args locks to avoid recursive locking (w0xlt)
70b51fef7afd705d109718447097935e49cc0c25 args: eliminate all recursive locking of cs_args (w0xlt)
7d61e03c701215e2956353195dff4734210a2765 args: extract lock-requiring internal helpers (w0xlt)

Pull request description:

  Part of #19303.

  Replace `ArgsManager::cs_args` from `RecursiveMutex` to `Mutex`.

  The conversion follows the pattern established in prior `RecursiveMutex` removals (e.g. `CAddrMan` in #19238, `CBlockPolicyEstimator` in #22014): extract private lock-held helpers with trailing underscore naming (`GetSetting_()`, `GetArgFlags_()`, `GetPathArg_()`), then replace recursive calls in methods that already hold `cs_args` with those helpers.

ACKs for top commit:
  l0rinc:
    ACK 20fb7618b001937befbf8757e5881674b4a55147
  rkrux:
    Concept ACK 20fb7618b0
  sedited:
    Re-ACK 20fb7618b001937befbf8757e5881674b4a55147
  hebasto:
    ACK 20fb7618b001937befbf8757e5881674b4a55147, only rebased and suggested changes since my recent [review](https://github.com/bitcoin/bitcoin/pull/34745#pullrequestreview-3916715262).

Tree-SHA512: 7ab4278737f00deaa3f3da75e08469f91e95aa31e916820d02af737c754751ae4f73c1c8650f120eeff142a134f9209cf581499696a7b88ffc83d296515e40f2
2026-03-13 09:22:05 +01:00
merge-script
5f75d90c38
Merge bitcoin/bitcoin#34813: threads: qa: Add lock order annotation for TxMempool::cs
9085dee476d21daab786e88848597c755beecee4 qa: Add lock order annotation for TxMempool::cs (David Gumberg)

Pull request description:

  I added this to see if static analysis would catch any lock order inversions while investigating #34731, it did not catch any but it is a worthwhile defense against statically-analyzable inversions of `cs_main->TxMempool::cs`.

ACKs for top commit:
  sedited:
    tested ACK 9085dee476d21daab786e88848597c755beecee4
  hebasto:
    ACK 9085dee476d21daab786e88848597c755beecee4.
  w0xlt:
    ACK 9085dee476d21daab786e88848597c755beecee4

Tree-SHA512: 498605362e7b197b7643a3f9ffd04589bc9b245aca1d245d289efa145906248c1a72f9fbf4835a9378aabe170b747dc0cc033105915a2bf7a9989de368710c02
2026-03-13 00:02:21 +00:00
merge-script
f1e0245f89
Merge bitcoin/bitcoin#34818: doc: fix process name typo in multiprocess.md
c2732146d14e5e0b932b14ea177ac8bcd25c9f84 doc: fix process name typo in multiprocess.md (ViniciusCestarii)

Pull request description:

  In this [flow](https://github.com/bitcoin/bitcoin/blob/master/doc/design/multiprocess.md#example-use-cases-and-flows), the bitcoin-wallet process acts as the client initiating the RPC request, while the bitcoin-node process acts as the server receiving it. So at "The `getBlockHash` method of the generated `Chain` server subclass in `bitcoin-wallet` receives a Cap’n Proto request object with the `height` parameter, and calls the `getBlockHash` method on its local `Chain` object with the provided `height`." it should say bitcoin-node not bitcoin-wallet.

  This PR fix this typo.

ACKs for top commit:
  ryanofsky:
    Code review ACK c2732146d14e5e0b932b14ea177ac8bcd25c9f84. Nice catch!

Tree-SHA512: 7227dc96e556ad36f1f39cc1033d80c92e8c6a47cf61ab68401122b1ef8075068224494e4ffb7094eca8dc325294cb96e561d3e997af7d434158031485f92677
2026-03-12 22:22:31 +00:00
ViniciusCestarii
c2732146d1
doc: fix process name typo in multiprocess.md 2026-03-12 15:06:55 -03:00
merge-script
5608b8ce9e
Merge bitcoin/bitcoin#34750: test: fix addr relay test silently passing and other improvements
57bfa864fe69ea5610399f9db60cf2299930703a test: use static methods and clarify comment in addr_relay (stratospher)
7ee8c0abc629f0658b6c36f36b5da11c51cbb39d test: protect outbound connection from eviction in getaddr_test (stratospher)
ecb5ce6e76ef9391d636e7e4f6be7e3f7ed05550 test: fix addr relay test silent pass and wrong peerinfo index (stratospher)

Pull request description:

  couple of improvements in the addr relay test:
    - fixes the silent test pass discovered in https://github.com/bitcoin/bitcoin/pull/34717#issuecomment-3990585763 (will remove this if that PR gets merged - the test doesn't fail even though #34717 changes the behaviour)
    - correct wrong peerinfo index
    - prevent intermittent disconnection warnings like the one shown below by protecting outbound peer from `ConsiderEviction`
    ```
      TestFramework (INFO): Check that we answer getaddr messages only once per connection
      TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:58829 due to [Errno 54] Connection reset by peer
  ```
    - remove a no longer applicable test comment since we don't need to send initial GETADDR for intial self announcement anymore

ACKs for top commit:
  Bortlesboat:
    ACK 57bfa864fe69. Ran both `p2p_addr_relay.py` and `p2p_addr_selfannouncement.py` locally, both pass. Good catch on the stale `peerinfo` reference in `inbound_blackhole_tests` — that would silently check the wrong peer.
  naiyoma:
    ACK  57bfa864fe69ea5610399f9db60cf2299930703a
  mzumsande:
    Code Review ACK 57bfa864fe69ea5610399f9db60cf2299930703a

Tree-SHA512: 22e4f87f66569bfa629a68a8b440cd21b5285c6dad6eb7926514f2d74e16fe3711525b264f82765c83020be976a0438b8d2ab1e48e7c0b7d85437ee672d52324
2026-03-12 15:06:29 +00:00
MarcoFalke
fa90b21430
test: Remove unused feature_segwit.py functions
Unused after commit c847dee1488a294c9a9632a00ba1134b21e41947
2026-03-12 16:01:12 +01:00
MarcoFalke
fa6b05c96f
test: Remove unused CUSTOM_._COUNT
Unused after commit cf3ab8e1d0a2f2bdf72e61e2c2dcb35987e5b9bd
2026-03-12 16:01:12 +01:00
MarcoFalke
fa7bac94d8
test: Remove unused wait_for_addr, firstAddrnServices, on_addr
Unused after commit be25ac3092b7755e26e1ec6c33a27cd0e3dd9eac
2026-03-12 16:01:09 +01:00
MarcoFalke
fa388a3585
test: Remove unused self.p2p_conn_index = 1
Was never used
2026-03-12 16:01:06 +01:00
MarcoFalke
fa803710e2
test: Remove unused AddressType
unused after commit c847dee1488a294c9a9632a00ba1134b21e41947
2026-03-12 16:01:05 +01:00
merge-script
e31ab8040f
Merge bitcoin/bitcoin#34749: rpc: Refactor gettxspendingprevout to be easier to parse
d236415649e21a4848b5685b6ba41da82c8dde73 rpc: Refactor gettxspendingprevout to be easier to parse (Fabian Jahr)

Pull request description:

  This refactoring commit was originally part of #34635 but the the change was some-what controversial: https://github.com/bitcoin/bitcoin/pull/34635#discussion_r2833541912 and the discussion was blocking the rest of the uncontroversial changes from moving forward.

  It looks like #34748 is trying to achieve something similar now, we'll have to see how the different approached converge but at least there seems to be some more conceptual interest than appeared on #34635 originally.

ACKs for top commit:
  hodlinator:
    ACK d236415649e21a4848b5685b6ba41da82c8dde73
  sedited:
    Re-ACK d236415649e21a4848b5685b6ba41da82c8dde73
  furszy:
    utACK d236415649

Tree-SHA512: 3df70bb8f143247f66d52430b3d8a4ecc5f0b80aa68ef3fc9082739b6f1be02fa9ef88ff134bb01034c9b6006400342e71fa8dc0a203d8e13b4bf6e21d1b05a8
2026-03-12 13:44:43 +01:00
MarcoFalke
fab5072ce1
ci: Remove vulture 2026-03-12 13:19:00 +01:00
merge-script
56983a4d4d
Merge bitcoin/bitcoin#34815: ci: bump cirruslabs actions versions
9a968ad35efe04bfd86299c5dfbc48ada41bc46e ci: bump cirruslabs actions versions (will)

Pull request description:

  Fix CI deprecation warnings of form: `Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: cirruslabs/cache/restore@v4.`

  As these are hiding in `.github/actions/**/*.yml` they were forgotten by the (two) previous PR(s) 😢

  https://github.com/bitcoin/bitcoin/pull/34802
  https://github.com/bitcoin/bitcoin/pull/34344

ACKs for top commit:
  maflcko:
    lgtm ACK 9a968ad35efe04bfd86299c5dfbc48ada41bc46e

Tree-SHA512: 2de22cac1dbe7b3df3a69114b1cd84cb8ca5338c6b03c7181d535de247778202301457cfb8d537f6ce118c8d08e0bdcc6ce316ab3d946f606c17e2974a1f14c0
2026-03-12 11:19:51 +00:00
merge-script
136132e075
Merge bitcoin/bitcoin#34776: guix: Make guix-clean more careful
be6d24ec22cc2ef8086098d6322b024e07c5758c guix: Make guix-clean less destructive (Hodlinator)

Pull request description:

  * Show preview and ask for confirmation before git clean unless used with "--force"
  * Error out when user tries to pass args such as "guix-clean --help"

ACKs for top commit:
  kevkevinpal:
    reACK [be6d24e](be6d24ec22)
  janb84:
    ACK be6d24ec22cc2ef8086098d6322b024e07c5758c
  sedited:
    ACK be6d24ec22cc2ef8086098d6322b024e07c5758c
  willcl-ark:
    ACK be6d24ec22cc2ef8086098d6322b024e07c5758c

Tree-SHA512: 19fc6e5dc68f2886f5fb970ff39d040a8088eedca56ad5b86622297614b0d164df9ddd5a8b24b972060e9dcde732de5e3346866b53963524a4277a0a56220570
2026-03-12 10:23:00 +00:00
Fabian Jahr
d236415649
rpc: Refactor gettxspendingprevout to be easier to parse
Co-authored-by: Matias Furszyfer <matiasfurszyfer@protonmail.com>
2026-03-12 11:21:29 +01:00
merge-script
e19df67332
Merge bitcoin/bitcoin#33144: build: Set AUTHOR_WARNING on warnings
fa6497ba71e9573d341c1c051af09b3ec2fc8d74 build: Set AUTHOR_WARNING on warnings (MarcoFalke)

Pull request description:

  Now that the cmake setting `-Werror=dev` is set since commit 6a13a6106e3c1ebe95ba6430184d6260a7b942bd for the CI, guix and the dev cmake preset, it could make sense to notify developers about any warnings.

  So do that with a single `AUTHOR_WARNING`.

  This can be tested by introducing a bug, like:

  ```diff
  diff --git a/CMakeLists.txt b/CMakeLists.txt
  index 6017775fa7..5610e03c66 100644
  --- a/CMakeLists.txt
  +++ b/CMakeLists.txt
  @@ -589,7 +589,7 @@ set(Python3_FIND_FRAMEWORK LAST CACHE STRING "")
   # improves compatibility with Python version managers that use shims.
   set(Python3_FIND_UNVERSIONED_NAMES FIRST CACHE STRING "")
   mark_as_advanced(Python3_FIND_FRAMEWORK Python3_FIND_UNVERSIONED_NAMES)
  -find_package(Python3 3.10 COMPONENTS Interpreter)
  +find_package(Python3 3.210 COMPONENTS Interpreter)
   if(NOT TARGET Python3::Interpreter)
     list(APPEND configure_warnings
       "Minimum required Python not found."
  ```

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

ACKs for top commit:
  l0rinc:
    ACK fa6497ba71e9573d341c1c051af09b3ec2fc8d74
  purpleKarrot:
    ACK fa6497ba71e9573d341c1c051af09b3ec2fc8d74
  stickies-v:
    ACK fa6497ba71e9573d341c1c051af09b3ec2fc8d74
  hebasto:
    ACK fa6497ba71e9573d341c1c051af09b3ec2fc8d74, this effectively allows us to use `-Werror=dev` to automatically catch any warning.
  sedited:
    ACK fa6497ba71e9573d341c1c051af09b3ec2fc8d74

Tree-SHA512: df3b7fa88451527d6a950bd6ebe46e96d1d2f6447c2b53cbe26c6ece0b63a41663a0accfc0ee20c03bc40328363d46f0e7ad88aab1be9b383ad7ff2621363a30
2026-03-12 10:17:21 +00:00
merge-script
ab64277375
Merge bitcoin/bitcoin#34708: validation: refactor: remove ConnectTrace
2f8f2e900118c98699db91075bd1b72e6460c6b1 validation: remove ConnectTrace wrapper class (stickies-v)
b83de7f28e71f0b10a999327395198fbcb02f44b validation: remove sentinel block from ConnectTrace (stickies-v)

Pull request description:

  The sentinel pattern in `ConnectTrace` has been unnecessary since conflicted transaction tracking was removed in 5613f9842b4000fed088b8cf7b99674c328d15e1. Without that tracking `ConnectTrace` is a trivial wrapper around `std::vector`, so it seems better to just replace it with the vector directly.

  Also modernize/update naming along the way, renaming `PerBlockConnectTrace` to `ConnectedBlock`

  Refactor, no behaviour change.

ACKs for top commit:
  HowHsu:
    ACK 2f8f2e900118c98699db91075bd1b72e6460c6b1
  sedited:
    ACK 2f8f2e900118c98699db91075bd1b72e6460c6b1
  w0xlt:
    reACK 2f8f2e9001

Tree-SHA512: 0045fcdc1178a160e31ef9d44dcd5fddd21c30c53ed06e84beacddb0b73e7b8120fee874256d1b9ceae45da65164a2e5531992bd374f8d57b6a8455a5354fe57
2026-03-12 10:08:53 +00:00
merge-script
44ddc9c93f
Merge bitcoin/bitcoin#31560: rpc: allow writing UTXO set to a named pipe
b19caeea098f92a7f72aaeee49573358f4b153a3 doc: add release note for #31560 (named pipe support for `dumptxoutset` RPC) (Sebastian Falbesoner)
61a5460d0d6cd174d395c51333def798fe7442fe test: add test for utxo-to-sqlite conversion using named pipe (Sebastian Falbesoner)
2e8072edbeb20a8c05c0dbd06ca105bc4dd07b96 rpc: support writing UTXO set dump (`dumptxoutset`) to a named pipe (Sebastian Falbesoner)

Pull request description:

  This PR slightly modifies the `dumptxoutset` RPC to allow writing the UTXO set dump into a [named pipe](https://askubuntu.com/a/449192), so that the output data can be consumed by another process, see #31373. Taking use of this with the utxo-to-sqlite.py tool (introduced in #27432), creating an UTXO set in SQLite3 format is possible on the fly. E.g. for signet:
  ```
  $ mkfifo /tmp/utxo_fifo && ./build/bin/bitcoin-cli -signet dumptxoutset /tmp/utxo_fifo latest &
  $ ./contrib/utxo-tools/utxo_to_sqlite.py /tmp/utxo_fifo ./utxo.sqlite
  UTXO Snapshot for Signet at block hash 000000012711f0a4e741be4a22792982..., contains 61848352 coins
  1048576 coins converted [1.70%], 2.800s passed since start
  ....
  ....
  60817408 coins converted [98.33%], 159.598s passed since start
  {
    "coins_written": 61848352,
    "base_hash": "000000012711f0a4e741be4a22792982370f51326db20fca955c7d45da97f768",
    "base_height": 294305,
    "path": "/tmp/utxo_fifo",
    "txoutset_hash": "34ae7fe7af33f58d4b83e00ecfc3b9605d927f154e7a94401226922f8e3f534e",
    "nchaintx": 28760852
  }
  TOTAL: 61848352 coins written to ./utxo.sqlite, snapshot height is 294305.
  ```
  Note that the `dumptxoutset` RPC calculates an UTXO set hash as a first step before any data is emitted, so especially on mainnet it takes quite a while until the conversion starts and something is happening visibly.

ACKs for top commit:
  ajtowns:
    utACK b19caeea098f92a7f72aaeee49573358f4b153a3
  sedited:
    Re-ACK b19caeea098f92a7f72aaeee49573358f4b153a3

Tree-SHA512: 7101563d0dba15439cdef8c8fb535f8593d5a779ff04208e2d72382a3f99072db8eac3651d1b3fe72c5e1f03e164efb281c3030d45d0723b943ebbbcf2a841d6
2026-03-12 09:55:07 +00:00
merge-script
1a2f4e9750
Merge bitcoin/bitcoin#34814: lint: Temporarily revert to vulture==2.14
faae981d354e13de96442159d604a831b6c3a71e lint: Temporarily revert to vulture==2.14 (MarcoFalke)

Pull request description:

  To work around https://github.com/bitcoin/bitcoin/issues/34810

ACKs for top commit:
  fanquake:
    ACK faae981d354e13de96442159d604a831b6c3a71e

Tree-SHA512: 80b8250379e672e62090e7853d342b93befcb33c9f6e86fb39776e34029f0952ad4fb6d22747c387a3503b2b9cb3f894ef6e5f7606058647a46037918e1b35b0
2026-03-12 09:41:34 +00:00
will
9a968ad35e
ci: bump cirruslabs actions versions 2026-03-12 09:39:01 +00:00
merge-script
51a4dc5515
Merge bitcoin/bitcoin#34796: rpc, net: remove startingheight field of getpeerinfo RPC and from node state
745ad941dedaa0f4e2a5fdda58a3bf683d672196 p2p: remove m_starting_height field from node state (only show once in debug log) (Sebastian Falbesoner)
b267efcdaf854b6b50424d6a6af7cac8ba458390 rpc, net: completely remove `startingheight` field of `getpeerinfo` RPC (Sebastian Falbesoner)

Pull request description:

  This PR completely removes the `startingheight` field in the `getpeerinfo` RPC, previously deprecated in v31.0 (see #34197). The second commit goes one step further: the only remaining usage for a `Peer`s `m_starting_height` field is for printing P2P debug messages. Considering that the information is untrusted and not deemed useful (see discussion #33990), remove the field and only print the starting height information once at reception of the `VERSION` message (suggested by ajtowns in https://github.com/bitcoin/bitcoin/pull/33990#issuecomment-3621363780), without saving it.

ACKs for top commit:
  stickies-v:
    re-ACK 745ad941dedaa0f4e2a5fdda58a3bf683d672196, no changes except for addressing minor merge conflict
  w0xlt:
    ACK 745ad941dedaa0f4e2a5fdda58a3bf683d672196
  sedited:
    Re-ACK 745ad941dedaa0f4e2a5fdda58a3bf683d672196

Tree-SHA512: 09d30f34ea564e884e5d5c0e56cd66f99d6127ba8cc779f1e7ab29ea4fe8603835d306e343ee3a0038b1c07245f429012375034518135c915f543ba175d6dc45
2026-03-12 09:52:10 +01:00
merge-script
2efb8c44bb
Merge bitcoin/bitcoin#34807: kernel: doc: explain return value for btck_WriteBytes callback
ec4ec91d59b25badf212bf0aee0ad5c1eead7ff1 kernel: doc: explain return value for `btck_WriteBytes` callback (Sebastian Falbesoner)

Pull request description:

  Note that this is the only callback type with a non-void return type. Probably it would make sense to document the parameters of callbacks as well on the long-term (Doxygen style?), but this IMHO the most critical missing documentation, where likely other bitcoinkernel users working with the C API could trip over too.

  Background: I've been working on btck bindings for [Zig](https://ziglang.org/) for a while [1]. Overall I found the C API header `bitcoinkernel.h` very well-documented and to a large degree self-explanatory, but for implementing a `btck_WriteBytes` callback (needed for various `btck_..._to_bytes` serialization functions) I had to look into the [kernel implementation](e98d36715e/src/kernel/bitcoinkernel.cpp (L86)) to figure out what return value is expected.

  [1] still not public and put on hold for the last few months due to lib(std)c++ build system / linking issues (needing ugly workarounds, hopefully improved with Zig's upcoming 0.16 release); now continued, hopefully ready to be published in a first presentable version soon(tm)

ACKs for top commit:
  sedited:
    ACK ec4ec91d59b25badf212bf0aee0ad5c1eead7ff1
  alexanderwiederin:
    ACK ec4ec91d59
  stickies-v:
    ACK ec4ec91d59b25badf212bf0aee0ad5c1eead7ff1

Tree-SHA512: aeea68474a04e0bc4d2421a0539a0bd717b0526f58c7379848a8bb8cb75a0fdf5c94bfcc226f28dd09b89c5fc368921d1d875893b86680e7c51d7b98f4ab749d
2026-03-12 08:40:52 +00:00
MarcoFalke
faae981d35
lint: Temporarily revert to vulture==2.14
To work around https://github.com/bitcoin/bitcoin/issues/34810
2026-03-12 08:15:06 +01:00
David Gumberg
9085dee476 qa: Add lock order annotation for TxMempool::cs 2026-03-11 18:49:42 -07:00
Sebastian Falbesoner
ec4ec91d59 kernel: doc: explain return value for btck_WriteBytes callback
This is the only non-void callback type, so it makes sense to document what
implementers should return.
2026-03-11 18:06:19 +01:00
Sebastian Falbesoner
b19caeea09 doc: add release note for #31560 (named pipe support for dumptxoutset RPC) 2026-03-11 16:51:45 +01:00
merge-script
e98d36715e
Merge bitcoin/bitcoin#34802: ci: Bump GHA actions versions
fadaa7db335d1b1bd2674c51d89d6c0820ddb887 ci: Bump GHA actions versions (MarcoFalke)

Pull request description:

  Looks like this was forgotten in  the prior pull https://github.com/bitcoin/bitcoin/pull/34344#issuecomment-3769438233

ACKs for top commit:
  fanquake:
    ACK fadaa7db335d1b1bd2674c51d89d6c0820ddb887

Tree-SHA512: bc3bc5b7ba275d7c48bd34fa0eaaac05942212369fc87be338b31c024ca736550a5ff64766c78912f9705e9f95ffedeae1eddfe2f95828350c7672ab2069713c
2026-03-11 15:36:45 +00:00
Sebastian Falbesoner
61a5460d0d test: add test for utxo-to-sqlite conversion using named pipe 2026-03-11 16:25:02 +01:00
Sebastian Falbesoner
2e8072edbe rpc: support writing UTXO set dump (dumptxoutset) to a named pipe
This allows external tooling (e.g. converters) to consume the output
directly, rather than having to write the dump to disk first and then
read it from there again.

Co-authored-by: Luke Dashjr <luke-jr+git@utopios.org>
2026-03-11 16:22:30 +01:00
Sebastian Falbesoner
745ad941de p2p: remove m_starting_height field from node state (only show once in debug log) 2026-03-11 16:11:45 +01:00
Sebastian Falbesoner
b267efcdaf rpc, net: completely remove startingheight field of getpeerinfo RPC 2026-03-11 15:51:09 +01:00
MarcoFalke
fadaa7db33
ci: Bump GHA actions versions 2026-03-11 15:10:27 +01:00
merge-script
ce6f182091
Merge bitcoin/bitcoin#33902: doc: Document compiler configuration for native depends packages
4c07cf87e2288d4a8b0174ad64e52f455de9029e doc: document depends compiler configuration (will)

Pull request description:

  Fixes: #33859

  Previously one had to read the Makefile (and various *.mk configuration
  files) to see how to correctly override CC and CXX when building native
  depends packages.

  Detail this in README.md to make it clearer.

ACKs for top commit:
  maflcko:
    review ACK 4c07cf87e2288d4a8b0174ad64e52f455de9029e 🛶
  hebasto:
    ACK 4c07cf87e2288d4a8b0174ad64e52f455de9029e.
  sedited:
    ACK 4c07cf87e2288d4a8b0174ad64e52f455de9029e
  fanquake:
    ACK 4c07cf87e2288d4a8b0174ad64e52f455de9029e

Tree-SHA512: ca61087b7c232c74782602a28d914e7bb35d1469472bb7862941c0fdec2277bf1d0e6604d4058c319c6a7b2cd04a70b7f0d0afbbb847e5c3812c6afb0cf1cfb3
2026-03-11 13:39:22 +00:00
merge-script
e96d9e6492
Merge bitcoin/bitcoin#34389: net/log: standardize peer+addr log formatting via LogPeer
22335474d768f99067856173ff2764b6db753f67 net: format peer+addr logs with `LogPeer` (Lőrinc)
e55ea534f74b2dd2a81e8f9972554303f7cf9c20 test: add pre-`LogPeer` net log assertion (Lőrinc)
736b17c0f0f23dca78e7266be6c98b24b0eda210 log: fix minor formatting in debug logs (Lőrinc)
9cf82bed3205d8405f56838d0e2ca0c72023a081 log: show placeholders for missing peer fields (Lőrinc)

Pull request description:

  This is an alternative to #34293, but aims to address the remaining logging inconsistencies more broadly.
  It extends the example fixed there to every instance, restores the original separator behavior, applies it consistently via a single helper, and adds tests for `logips` (covering both current and new behavior).

  ### Problem
  After #28521 centralized peer address logging into `CNode::LogIP()`, the original comma separator before `peeraddr=` was lost, resulting in inconsistent formatting across net (and recent private broadcast) logs.
  Some lines also had double spaces, empty fields, or mismatched format specifiers.

  ### Fix
  Introduces `CNode::LogPeer(bool)` which always emits `peer=<id>` and, when `-logips=1`, appends `, peeraddr=<addr>`. This eliminates hand-rolled separators and makes peer identification predictable.
  Minor issues (double spaces, empty placeholders, format specifiers) are fixed along the way in separate commits.

  ### Reproducer
  Run with `-debug=net -logips=1` and observe peer log lines now show `peer=<id>, peeraddr=<addr>` (comma-separated). The new assertion in `feature_logging.py` automates this check.

ACKs for top commit:
  naiyoma:
    ACK 22335474d768f99067856173ff2764b6db753f67
  vasild:
    ACK 22335474d768f99067856173ff2764b6db753f67
  sedited:
    ACK 22335474d768f99067856173ff2764b6db753f67

Tree-SHA512: 562262a58c3042f139099ff4c41e3fc6a97505fe9603c2bf700a97fd0aa052954b47c14da0e50c1fc311db1ae6c04e6a92156c9b85e25c777a637b7766c1dafe
2026-03-11 14:34:42 +01:00
merge-script
281c0cce73
Merge bitcoin/bitcoin#34301: wallet: remove outdated RewriteDB calls from SPKM & DBErrors::NEED_REWRITE enum value
c6a6435cedac01a6800cac9285e2c599290e2e0d wallet: remove `DBErrors::NEED_REWRITE` enum value (rkrux)
61039d72a5da443a254b3229748fc64eee613757 wallet: remove unimplemented `RewriteDB` calls from SPKM (rkrux)

Pull request description:

  ISTM that there is no implementation left of the `RewriteDB` method in any of the SPKMs, and thus, its call sites can be removed safely.

  Also remove `DBErrors::NEED_REWRITE` enum value as its usage is outdated now.

  <!--
  *** Please remove the following help text before submitting: ***

  Pull requests without a rationale and clear improvement may be closed
  immediately.

  GUI-related pull requests should be opened against
  https://github.com/bitcoin-core/gui
  first. See CONTRIBUTING.md
  -->

  <!--
  Please provide clear motivation for your patch and explain how it improves
  Bitcoin Core user experience or Bitcoin Core developer experience
  significantly:

  * Any test improvements or new tests that improve coverage are always welcome.
  * All other changes should have accompanying unit tests (see `src/test/`) or
    functional tests (see `test/`). Contributors should note which tests cover
    modified code. If no tests exist for a region of modified code, new tests
    should accompany the change.
  * Bug fixes are most welcome when they come with steps to reproduce or an
    explanation of the potential issue as well as reasoning for the way the bug
    was fixed.
  * Features are welcome, but might be rejected due to design or scope issues.
    If a feature is based on a lot of dependencies, contributors should first
    consider building the system outside of Bitcoin Core, if possible.
  * Refactoring changes are only accepted if they are required for a feature or
    bug fix or otherwise improve developer experience significantly. For example,
    most "code style" refactoring changes require a thorough explanation why they
    are useful, what downsides they have and why they *significantly* improve
    developer experience or avoid serious programming bugs. Note that code style
    is often a subjective matter. Unless they are explicitly mentioned to be
    preferred in the [developer notes](/doc/developer-notes.md), stylistic code
    changes are usually rejected.
  -->

  <!--
  Bitcoin Core has a thorough review process and even the most trivial change
  needs to pass a lot of eyes and requires non-zero or even substantial time
  effort to review. There is a huge lack of active reviewers on the project, so
  patches often sit for a long time.
  -->

ACKs for top commit:
  achow101:
    ACK c6a6435cedac01a6800cac9285e2c599290e2e0d
  furszy:
    ACK c6a6435cedac01a6800cac9285e2c599290e2e0d
  sedited:
    ACK c6a6435cedac01a6800cac9285e2c599290e2e0d

Tree-SHA512: 050d3115ad436eb7728716c897c8d23c6dd0c6cd7a018dc023896d301b126bae5ba89b684811226a0ca4045b393b612296aeab3b3b5dfb7ed0bf443fc1eaef41
2026-03-11 13:57:33 +01:00
merge-script
524aa1e533
Merge bitcoin/bitcoin#34576: threadpool: add ranged Submit overload
79571b918130e66436b2d43489835c38bb3ae3e3 threadpool: add ranged Submit overload (Andrew Toth)

Pull request description:

  The current `ThreadPool::Submit` is not very efficient when we have a use case where we need to submit multiple tasks immediately. The `Submit` method must take the lock for each task, and notifies only a single worker thread. This will cause lock contention with the awakened worker thread trying to take the lock and the caller trying to submit the next task.

  Introduce a `Submit` overload, which takes the lock once and submits a range of tasks, then notifies all worker threads after the lock is released.

  This is needed for #31132 to be able to use `ThreadPool`.

ACKs for top commit:
  l0rinc:
    ACK 79571b918130e66436b2d43489835c38bb3ae3e3
  rkrux:
    ACK 79571b9
  sedited:
    Re-ACK 79571b918130e66436b2d43489835c38bb3ae3e3
  willcl-ark:
    ACK 79571b918130e66436b2d43489835c38bb3ae3e3

Tree-SHA512: 1fbe0c150f01b9ea5be3459cd10b817045af52eaf6f14a1a298a68853890da4033c1b21bdc6f995bb55029fb4ab536e9dbf58d98e2e1e12b25298fa3470b4ba6
2026-03-11 13:08:53 +01:00
will
4c07cf87e2
doc: document depends compiler configuration
CC/CXX only override compilers for target (host) packages. Native
build tool packages (native_capnp, native_qt, etc.) use separate
build_CC/build_CXX variables, which default to gcc/g++ on Linux.

On systems without gcc (e.g. Nix, Chimera Linux), native package
builds fail unless build_CC/build_CXX are also set explicitly.
Document how to override both sets of compilers.
2026-03-11 12:02:24 +00:00
merge-script
f25843d8ad
Merge bitcoin/bitcoin#34441: ci: Allow running iwyu CI in worktree
fafdb8f635bc157f55e23890264d12170ecd41ae ci: Allow running iwyu ci in worktree (MarcoFalke)
fab73e213dee1057e9e759133767b17ec5b1f6ab ci: Reject unsafe execution of shell scripts (MarcoFalke)

Pull request description:

  Currently, the iwyu CI fails to run in a git-worktree, or git-archive. This is due to the use of `git diff`.

  Fix this by force-initializing a dummy git repo with a single dummy commit.

  It may be possible to detect when `git diff` is not available in the directory, and only apply the fallback when needed, but the git history is not needed and it is easier to unconditionally apply the git init.

ACKs for top commit:
  willcl-ark:
    reACK fafdb8f635bc157f55e23890264d12170ecd41ae
  hebasto:
    ACK fafdb8f635bc157f55e23890264d12170ecd41ae, I have reviewed the code and it looks OK. Tested on Fedora 43.
  sedited:
    ACK fafdb8f635bc157f55e23890264d12170ecd41ae

Tree-SHA512: 572f1e2b9e215c2804095382498abb5b8636e3a49d5ba2a736b975e06afa2881d815b854a8a593d0f187c7c6b55034688e11f46d6814edfe7c29505197e80b18
2026-03-11 13:01:24 +01:00
merge-script
b8c84ec5a6
Merge bitcoin/bitcoin#34788: fuzz: register PeerManager in process_message(s)
b50376881929ff23b1148028ac6ca42617af04d8 fuzz: register PeerManager in process_message(s) (Eugene Siegel)

Pull request description:

  This lets CValidationInterface callbacks be hit (just `BlockChecked` using the corpus from qa-assets). Also remove no-op SyncWithValidationInterfaceQueue since there are no validation interfaces registered in ResetChainman.

ACKs for top commit:
  marcofleon:
    code review ACK b50376881929ff23b1148028ac6ca42617af04d8
  dergoegge:
    utACK b50376881929ff23b1148028ac6ca42617af04d8

Tree-SHA512: 51c0c9a3396ee898b1dce2c65c2fc7b61ea6d04342d181b1b60be1677bc0c2828b9d970673f67501e3579ae002392cd5f0e3268aae1b216ff332e2654fd1fe14
2026-03-11 11:09:32 +00:00
fanquake
d03e3be246
ci: check macos bundle structure and codesigning 2026-03-11 10:37:23 +00:00
fanquake
66d80d57b4
macdeploy: use plugins dir to find plugins
Rather than looking for /translations, which might not exist (it doesn't
in a recent brew installed qt on macOS). i.e:
```bash
ls /opt/homebrew/opt/qtbase/share/qt
doc
libexec
metatypes
mkspecs
modules
plugins
sbom
```
2026-03-11 10:37:23 +00:00
fanquake
ab137cbfe2
macdeploy: subprocess out to zip rather than shutil.make_archive
Calling shutil.make_archive(), does not preserve symlinks when using the
zip format, see https://github.com/python/cpython/issues/139679.

Call `zip` using subprocess instead. This code is only run when using a
macos machine, and I think it's safe to assume that zip is available, same
as codesign, and all other tools we call in this script.
2026-03-11 10:36:18 +00:00
merge-script
b62abc7eec
Merge bitcoin/bitcoin#34436: refactor: add overflow-safe CeilDiv helper and use it in unsigned callsites
02d047fd5b93d96f159db2b8e95fc39450505159 refactor: add overflow-safe `CeilDiv` helper (Lőrinc)

Pull request description:

  ### Problem
  The codebase has many open-coded ceiling-division expressions (for example `(x+y-1)/y`) scattered across files.
  These are less readable, duplicate logic, and can be overflow-prone in edge cases.

  ### Fix
  Introduce a small overflow-safe integer helper, `CeilDiv()`, and use it in existing **unsigned** callsites where the conversion is straightforward and noise-free.

  ### What this PR does
  * Adds `CeilDiv()` to `src/util/overflow.h` for unsigned integral inputs.
  * Keeps the precondition check `assert(divisor > 0)`.
  * Replaces selected unsigned ceiling-division expressions with `CeilDiv(...)`.
  * Adds focused unit tests in `src/test/util_tests.cpp` for the migrated patterns.

  ---

  This is a pure refactor with no intended behavioral change.
  Signed arithmetic callsites are intentionally left unchanged in this PR.
  This PR changed a few more things originally but based on feedback reverted to the simplest cases only.

ACKs for top commit:
  rustaceanrob:
    ACK 02d047fd5b93d96f159db2b8e95fc39450505159
  hodlinator:
    ACK 02d047fd5b93d96f159db2b8e95fc39450505159
  sedited:
    ACK 02d047fd5b93d96f159db2b8e95fc39450505159

Tree-SHA512: b09336031f487e6ce289822e0ffeb8cfc8cfe8a2f4f3f49470748dfbd0a6cbab97498674cb8686dd2bd4ab6dd0b79cfdf2da00041fee12d109892e1bc5dde0ff
2026-03-11 11:30:42 +01:00
merge-script
7c21413616
Merge bitcoin/bitcoin#34755: depends: cleanup meta files
0ebc6891e2168c3ff1c9ad2250e765446610e75e depends: delete Boost extra files (fanquake)
168997e9b5720e3c58e2fc1a073d0be3cd39d971 depends: disable Qt sbom generation (fanquake)

Pull request description:

  1 followup to #34650, to disable sbom generation.
  1 commit to Boost, to cleanup `.natvis` files that end up in share.

ACKs for top commit:
  hebasto:
    ACK 0ebc6891e2168c3ff1c9ad2250e765446610e75e, tested on Ubuntu 25.10.

Tree-SHA512: 728b51d798a30c54df915564446a7a8648eb4fc27adb8c18b8202df506e2ff61e74516cfe4d6af1af72279255fc75fe14cb43403632a978637781d59eb11fc0f
2026-03-11 09:46:23 +00:00
merge-script
63f27721c2
Merge bitcoin/bitcoin#32985: wallet: Always rewrite tx records during migration
af041c405756d3b8bb04cb2ebd8c32cf237ac2a9 wallet: Always rewrite tx records during migration (Ava Chow)

Pull request description:

  Since loading a wallet may change some parts of tx records (e.g. adding nOrderPos), we should rewrite the records instead of copying them so that the automatic upgrade does not need to be performed again when the wallet is loaded.

  This is useful for future PRs I'm working on where we need to be sure about what data exists in a tx record in descriptor wallets.

ACKs for top commit:
  rkrux:
    lgtm ACK af041c405756d3b8bb04cb2ebd8c32cf237ac2a9
  Eunovo:
    ACK af041c4057
  furszy:
    ACK af041c405756d3b8bb04cb2ebd8c32cf237ac2a9

Tree-SHA512: 96984e46fe110a7749495965587b88a94d1297794e5d8b632b89dcdb2ebc1cd3070cd4458cf8e1b4ec0c76c4e56994f21867c44fa74f25739cbd9c0c911732a6
2026-03-11 10:23:40 +01:00