Commit Graph

45275 Commits

Author SHA1 Message Date
b3bb4031ab Merge bitcoin/bitcoin#32540: rest: fetch spent transaction outputs by blockhash
c48846ec41 doc: add release notes for #32540 (Roman Zeyde)
d4e212e8a6 rest: fetch spent transaction outputs by blockhash (Roman Zeyde)

Pull request description:

  Today, it is possible to fetch a block's spent prevouts in order to build an external index by using the `/rest/block/BLOCKHASH.json` endpoint. However, its performance is low due to JSON serialization overhead.

  We can significantly optimize it by adding a new [REST API](https://github.com/bitcoin/bitcoin/blob/master/doc/REST-interface.md) endpoint, using a binary response format (returning a collection of spent txout lists, one per each block transaction):

  ```
  $ BLOCKHASH=00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72728a054

  $ ab -k -c 1 -n 100 http://localhost:8332/rest/block/$BLOCKHASH.json
  Document Length:        13278152 bytes
  Requests per second:    3.53 [#/sec] (mean)
  Time per request:       283.569 [ms] (mean)

  $ ab -k -c 1 -n 10000 http://localhost:8332/rest/spenttxouts/$BLOCKHASH.bin
  Document Length:        195591 bytes
  Requests per second:    254.47 [#/sec] (mean)
  Time per request:       3.930 [ms] (mean)
  ```

  Currently, this PR is being used and tested by Bindex[^1].

  This PR would allow to improve the performance of external indexers such as electrs[^2], ElectrumX[^3], Fulcrum[^4] and Blockbook[^5].

  [^1]: https://github.com/romanz/bindex-rs
  [^2]: https://github.com/romanz/electrs (also [blockstream.info](https://github.com/Blockstream/electrs) and [mempool.space](https://github.com/mempool/electrs) forks)
  [^3]: https://github.com/spesmilo/electrumx
  [^4]: https://github.com/cculianu/Fulcrum
  [^5]: https://github.com/trezor/blockbook

ACKs for top commit:
  maflcko:
    re-ACK c48846ec41 📶
  TheCharlatan:
    Re-ACK c48846ec41
  achow101:
    ACK c48846ec41

Tree-SHA512: cf423541be90d6615289760494ae849b7239b69427036db6cc528ac81df10900f514471d81a460125522c5ffa31e9747ddfca187a1f93151e4ae77fe773c6b7b
2025-06-27 14:44:41 -07:00
3086c21df4 Merge bitcoin/bitcoin#32243: test: added fuzz coverage for consensus/merkle.cpp
95969bc58a test: added fuzz coverage to consensus/merkle.cpp (kevkevinpal)

Pull request description:

  ### Summary
  This adds a new fuzz target "merkle" which adds fuzz coverage to `consensus/merkle.cpp`

  I can also add this to an existing fuzz target if that is preferable

  Before:
  ![Screenshot 2025-04-09 at 10 12 54 PM](https://github.com/user-attachments/assets/e5f8da56-4583-441d-b08f-dfcc255ff248)

  After:
  ![Screenshot 2025-04-11 at 4 20 41 PM](https://github.com/user-attachments/assets/849ee079-b715-4089-9e36-d156233236c6)

ACKs for top commit:
  marcofleon:
    ReACK 95969bc58a
  Prabhat1308:
    ACK [`95969bc`](95969bc58a)
  maflcko:
    lgtm ACK 95969bc58a
  achow101:
    ACK 95969bc58a

Tree-SHA512: e1fe8b69444733516bfa6cf2adaa199fde4c7c5582b7b908408f9313ed0f2e8cb803d27d707a1716d49606d5eaef8c1e722990bbc3cffc30fa91fe73d2233e9d
2025-06-27 13:34:30 -07:00
319ff58bbd Merge bitcoin/bitcoin#32638: blocks: force hash validations on disk read
9341b5333a blockstorage: make block read hash checks explicit (Lőrinc)
2371b9f4ee test/bench: verify hash in `ComputeFilter` reads (Lőrinc)
5d235d50d6 net: assert block hash in `ProcessGetBlockData` and `ProcessMessage` (Lőrinc)

Pull request description:

  A follow-up to https://github.com/bitcoin/bitcoin/pull/32487#discussion_r2094072165, after which validating the hash of a read block from disk doesn't incur the cost of calculating its hash anymore.

  ### Summary

  This PR adds explicit checks that the read block header's hash matches the one we were expecting.

  ### Context

  After the previous PR, validating a block's hash during read operations became essentially free. This PR leverages that by requiring callers to provide a block's expected hash (or `std::nullopt`), preventing silent failures caused by corrupted or mismatched data. Most `ReadBlock` usages were updated with expected hashes and now fail on mismatch.

  ### Changes

  * added hash assertions in `ProcessGetBlockData` and `ProcessMessage` to validate that the block read from disk matches the expected hash;
  * updated tests and benchmark to pass the correct block hash to `ReadBlock()`, ensuring the hash validation is tested - or none if we already expect PoW failure;
  * removed the default value for `expected_hash`, requiring an explicit hash for all block reads.

  ### Why is the hash still optional (but no longer has a default value)

  * for header-error tests, where the goal is to trigger failures early in the parsing process;
  * for out-of-order orphan blocks, where the child hash isn't available before the initial disk read.

ACKs for top commit:
  maflcko:
    review ACK 9341b5333a 🕙
  achow101:
    ACK 9341b5333a
  hodlinator:
    ACK 9341b5333a
  janb84:
    re ACK 9341b5333a

Tree-SHA512: cf1d4fff4c15e3f8898ec284929cb83d7e747125d4ee759e77d369f1716728e843ef98030be32c8d608956a96ae2fbefa0e801200c333b9eefd6c086ec032e1f
2025-06-27 13:28:26 -07:00
689318ccd9 Merge bitcoin/bitcoin#32667: build: Find Boost in config mode
14653b869b build: Find Boost in config mode (Hennadii Stepanov)

Pull request description:

  The `FindBoost` module has been removed by policy [CMP0167](https://cmake.org/cmake/help/latest/policy/CMP0167.html).

ACKs for top commit:
  purpleKarrot:
    ACK 14653b869b

Tree-SHA512: 5ec88647af83158f9bc04b41a3b72d4da7d84a7c81af351b8dac61cdf7f2f3b34bedd6ff164f21c229f2fd442918aaf21ba7c2c81c346b64de9032aae27b10ce
2025-06-27 14:54:54 +01:00
4a3475a43e Merge bitcoin/bitcoin#32819: Add release note for #32530
558f0880a8 Add release note for #32530 (Antoine Poinsot)

Pull request description:

ACKs for top commit:
  fanquake:
    ACK 558f0880a8

Tree-SHA512: 018e02d8f49a23f29d1d2ec38200ae1af9138727da3823c8afad62244c16e0076eef80bbf7ad3d3d73d553de3870bafbe9c35485cbac8d794ab7be320bbee09e
2025-06-27 12:07:36 +01:00
558f0880a8 Add release note for #32530 2025-06-26 12:40:26 -04:00
c43cc48aaa Merge bitcoin/bitcoin#32530: node: cap -maxmempool and -dbcache values for 32-bit
9f8e7b0b3b node: cap -dbcache to 1GiB on 32-bit architectures (Antoine Poinsot)
2c43b6adeb init: cap -maxmempool to 500 MB on 32-bit systems (Antoine Poinsot)

Pull request description:

  32-bit architecture is limited to 4GiB of RAM, so it doesn't make sense to set a too high value. A too high value could cause an OOM unbeknownst to the user a while after startup as mempool / dbcache fills.

ACKs for top commit:
  achow101:
    ACK 9f8e7b0b3b
  instagibbs:
    utACK 9f8e7b0b3b
  dergoegge:
    Code review ACK 9f8e7b0b3b
  glozow:
    utACK 9f8e7b0b3b

Tree-SHA512: cc7541b2c0040fc21a43916caec464dfb443af808f4e85deffa1187448ffff6edb0d69f9ebdb43915d145b8b4694d8465afe548f88da53ccebc9ce4b7c34b735
2025-06-26 17:33:23 +01:00
4145a9463a Merge bitcoin/bitcoin#32731: depends: Build qt package for FreeBSD hosts
173394d951 depends: Build `qt` package for FreeBSD hosts (Hennadii Stepanov)

Pull request description:

  This PR continues the work started in https://github.com/bitcoin/bitcoin/pull/23948.

  Here is an excerpt from the log:
  ```
  $ ./build/bin/bitcoin-qt -printtoconsole
  2025-06-12T01:06:56Z Bitcoin Core version v29.99.0-15de25ba2a28 (release build)
  2025-06-12T01:06:56Z Qt 6.7.3 (static), plugin=xcb
  2025-06-12T01:06:56Z Static plugins:
  2025-06-12T01:06:56Z  QMinimalIntegrationPlugin, version 395008
  2025-06-12T01:06:56Z  QXcbIntegrationPlugin, version 395008
  2025-06-12T01:06:56Z Style: fusion / QFusionStyle
  2025-06-12T01:06:56Z System: FreeBSD 14.3-RELEASE, x86_64-little_endian-lp64
  ```

  And here are the screenshots:

  ![image](https://github.com/user-attachments/assets/acf3fefc-ee3f-41cb-ab9a-3bc4d49c7054)

  ![image](https://github.com/user-attachments/assets/6280303f-9c7b-445d-8428-172ea998343d)

ACKs for top commit:
  vasild:
    ACK 173394d951

Tree-SHA512: 42a0bd11e4ef1a23efcfe6c4ab179dc667a076e65060891ce8358b3fe78de4e3ea33f975387d4236cc2ac620e2935b0a29c278065a47f038c66658106bf36755
2025-06-26 17:28:59 +01:00
14653b869b build: Find Boost in config mode
The `FindBoost` module has been removed by policy CMP0167.
2025-06-26 16:49:24 +01:00
67ea4b9994 Merge bitcoin/bitcoin#32814: cmake: Explicitly specify Boost_ROOT for Homebrew's package
8800b5acc1 cmake: Explicitly specify `Boost_ROOT` for Homebrew's package (Hennadii Stepanov)

Pull request description:

  On macOS, this PR ensures that the Boost package is located at its real path rather than via the symlink in the default prefix.

  A backport to 29.x is required for https://github.com/bitcoin/bitcoin/pull/32804, as this change prevents contamination of include directories by broad locations such as `/usr/local/include` or `/opt/homebrew/include`, which take precedence over Qt’s `-iframework` flags.

  Below is the relevant change in the configuration logs on my macOS 15.5 `x64`:
  - master branch @ ead4468748:
  ```
  % cmake -B build
  <snip>
  -- Found Boost: /usr/local/include (found suitable version "1.88.0", minimum required is "1.73.0")
  <snip>
  ```
  - this PR:
  ```
  % cmake -B build
  <snip>
  -- Found Boost: /usr/local/opt/boost/include (found suitable version "1.88.0", minimum required is "1.73.0")
  <snip>
  ```

  This PR is forward-compatible with the changes proposed in https://github.com/bitcoin/bitcoin/pull/32667.

ACKs for top commit:
  fanquake:
    ACK 8800b5acc1 Checked that this plus #32805 fixes #31009

Tree-SHA512: 114bd945ec0c06a8d15b565e5b9aafc3bcfdf2a4ba4400e072b8e31053dff0f9ef423b941ee1dff2113f83e08f7fada728383ae88b3ec380b5c3e40553205f7d
2025-06-26 15:00:48 +01:00
5170ec1ae3 Merge bitcoin/bitcoin#32665: depends: Bump boost to 1.88.0 and use new CMake buildsystem
6c2538d5bf depends: Bump boost to 1.88.0 and use new CMake buildsystem (Cory Fields)

Pull request description:

  Originally #30434.

  This has a few advantages over the old method of simply copying headers:
  - Installs proper CMake files which can be picked up by our buildsystem
  - Only installs necessary headers, not all of Boost

  Pulls in upstreamed https://github.com/boostorg/test/pull/445.

ACKs for top commit:
  willcl-ark:
    tACK 6c2538d5bf
  hebasto:
    re-ACK 6c2538d5bf, only rebased since my previous [review](https://github.com/bitcoin/bitcoin/pull/32665#pullrequestreview-2891203225).

Tree-SHA512: fc3fce77b21c8ea500370841f44f1cc87e0bb09cdde55f75d2f90853cb06a6f8c73ac6ca9ca3e91a879e9f95dd59aa40254c1b04e7a168c52fa1b31cc5b7f537
2025-06-26 14:21:08 +01:00
8fafb81320 Merge bitcoin/bitcoin#32805: cmake: Use HINTS instead of PATHS in find_* commands
ead4468748 cmake: Use `HINTS` instead of `PATHS` in `find_*` commands (Hennadii Stepanov)

Pull request description:

  According to the CMake documentation, `HINTS` "should be paths computed by system introspection, such as a hint provided by the location of another item already found", which is precisely the case in the `FindQRencode` module.

  Entries in `HINTS` are searched before those in `PATHS`. On macOS, Homebrew’s `libqrencode` will therefore be located at its real path rather than via the symlink in the default prefix.

  A backport to 29.x is required for https://github.com/bitcoin/bitcoin/pull/32804, as this change prevents contamination of include directories by broad locations such as `/usr/local/include` or `/opt/homebrew/include`, which take precedence over Qt’s `-iframework` flags.

  Below is the relevant change in the configuration logs on my macOS 15.5 `x64`:
  - master branch @ ead4468748:
  ```
  % cmake -B build -DBUILD_GUI=ON
  <snip>
  -- Found QRencode: /usr/local/lib/libqrencode.dylib (found version "4.1.1")
  <snip>
  ```
  - this PR:
  ```
  % cmake -B build -DBUILD_GUI=ON
  <snip>
  -- Found QRencode: /usr/local/Cellar/qrencode/4.1.1/lib/libqrencode.dylib (found version "4.1.1")
  <snip>
  ```

ACKs for top commit:
  fanquake:
    ACK ead4468748

Tree-SHA512: 1f0b04e3efeb7fe3efbb969be911abbcf56030d715acd87c0fbaf24422cdf1122f169e32242571256916c96a159212842e1e73092145c63ecc495ce429c6e587
2025-06-26 12:10:00 +01:00
e5f9218b6a Merge bitcoin/bitcoin#32742: test: fix catchup loop in outbound eviction functional test
dd8447f70f test: fix catchup loop in outbound eviction functional test (Sebastian Falbesoner)

Pull request description:

  In the course of working on an equivalent of #32421 for the `CBlockHeader` class, I noticed that the [catchup loop in the outbound eviction functional test](19765dca19/test/functional/p2p_outbound_eviction.py (L86-L103)) currently has a small flaw: the contained waiting for a `getheaders` message

  19765dca19/test/functional/p2p_outbound_eviction.py (L98-L99)

  only waits for _any_ such message instead of one with the intended block hash after the first iteration. The reason is that the `prev_prev_hash` variable is set incorrectly, since the `tip_header` instance is not updated and its field `.hash` is None [1]. Fix that by updating `tip_header` after generating a new block and also use the correct field on it -- we want the tip header's previous hash (`.hashPrevBlock`), which will be the previous-previous hash in the next iteration as intended.

  Can be demonstrated by adding a debug output for `prev_prev_hash`, e.g.

  ```diff
  diff --git a/test/functional/p2p_outbound_eviction.py b/test/functional/p2p_outbound_eviction.py
  index 30ac85e32f..9886a49512 100755
  --- a/test/functional/p2p_outbound_eviction.py
  +++ b/test/functional/p2p_outbound_eviction.py
  @@ -85,6 +85,7 @@ class P2POutEvict(BitcoinTestFramework):

           self.log.info("Keep catching up with the old tip and check that we are not evicted")
           for i in range(10):
  +            print(f"i={i}, prev_prev_hash={prev_prev_hash}")
               # Generate an additional block so the peers is 2 blocks behind
               prev_header = from_hex(CBlockHeader(), node.getblockheader(best_block_hash, False))
               best_block_hash = self.generateblock(node, output="raw(42)", transactions=[])["hash"]
  ```

  master branch
  ```
  ...
  i=0, prev_prev_hash=21722572577213525620063947414919931742473663114977483853465070858884938201585
  i=1, prev_prev_hash=None
  i=2, prev_prev_hash=None
  i=3, prev_prev_hash=None
  i=4, prev_prev_hash=None
  i=5, prev_prev_hash=None
  i=6, prev_prev_hash=None
  i=7, prev_prev_hash=None
  i=8, prev_prev_hash=None
  i=9, prev_prev_hash=None
  ...
  ```

  PR branch
  ```
  ...
  i=0, prev_prev_hash=21722572577213525620063947414919931742473663114977483853465070858884938201585
  i=1, prev_prev_hash=23204083306104595181276643925327085197417756603258684897360269464191973063397
  i=2, prev_prev_hash=18117007775254206852722585270408843074799046031613422902091537272077477361634
  i=3, prev_prev_hash=30556804635951812756130312631227721973553160707632138130845362630877961299882
  i=4, prev_prev_hash=16476515948153779819467376247405243058769281687868039119037064816106574626111
  i=5, prev_prev_hash=14965506521435221774966695805624206855826023174786191695076697927307467053159
  i=6, prev_prev_hash=14510815979277079515923749862202324542606166669768865640616202929053689167149
  i=7, prev_prev_hash=15360268707191667685151951417759114642582372006627142890517655217275478262166
  i=8, prev_prev_hash=55984929479619644661389829786223559362979512070332438490054115824374865094074
  i=9, prev_prev_hash=6591573629906616262191232272909118561529534571119028248829355592878183757083
  ...
  ```

  [1] that's in my opinion another example how caching hashes is confusing and easy to be misused; it's better to remove it and just compute the hash on-the-fly, so returning None is not even possible anymore

ACKs for top commit:
  maflcko:
    lgtm ACK dd8447f70f
  mzumsande:
    Code Review ACK dd8447f70f
  pablomartin4btc:
    cr-ACK dd8447f70f

Tree-SHA512: bd8e786b52e3e96661453006140d6b8fad5a35f1c8d38243c61df52b19c97cd3800404745a2f9603bcdf0006e9780b4f15f8f7e4fa34ff07d52dba04d87b68d0
2025-06-25 18:13:33 -04:00
f27898c8bf Merge bitcoin/bitcoin#32721: wallet, rpc: Remove deprecated balances from getwalletinfo and getunconfirmedbalance
c3fe85e2d6 wallet, rpc, test: Remove deprecated getunconfirmedbalance (Ava Chow)
0ec255139b wallet, rpc: Remove deprecated balances from getwalletinfo (Ava Chow)

Pull request description:

  `getwalletinfo` result fields `balance`, `immature_balance`, and `unconfirmed_balance`, and the `getunconfirmedbalance` RPC have all been deprecated since 0.19.0. It's been long enough that they should either be removed or undeprecated. The functionality provided by these RPCs is provided by `getbalances`.

ACKs for top commit:
  davidgumberg:
    ACK c3fe85e2d6
  rkrux:
    ACK c3fe85e2d6
  BrandonOdiwuor:
    ACK c3fe85e2d6 removing the deprecated `balance, unconfirmed_balance, immature_balance` fields from `getwalletinfo` and `getunconfirmedbalance` RPCs, as this infomation can be found on the `getbalances` RPC
  w0xlt:
    reACK c3fe85e2d6

Tree-SHA512: c7c4acfd9cabc7517ba813b95281a6c6a717a417312afd9346298669b4f7bd37724ad977148ce42db7fd47fc3d1f5a8482d8ff2e7b9cb74756b171a5b8b91ef2
2025-06-25 16:43:09 -04:00
8578fabb95 Merge bitcoin/bitcoin#32597: wallet: Always set descriptor cache upgraded flag for new wallets
47237cd193 wallet, rpc: Output wallet flags in getwalletinfo (Ava Chow)
bc2a26b296 wallet: Add GetWalletFlags (Ava Chow)
69f588a99a wallet: Set upgraded descriptor cache flag for newly created wallets (Ava Chow)

Pull request description:

  Newly created wallets will always have an upgraded descriptor cache, so set those.

  Also, to verify this behavior, add a new `flags` field to `getwalletinfo` and check that in the functional tests.

  Split from #32489

ACKs for top commit:
  Sjors:
    ACK 47237cd193
  w0xlt:
    ACK 47237cd193
  rkrux:
    ACK 47237cd193

Tree-SHA512: 97c7f85b858efe5ced9b8aafb6cd7c1a547de6f8013b82bfc75bc567cf73c9db5e168e3980355756541305520022fd776b8d4d240d3fb34ed86c27d2acaf4863
2025-06-25 16:14:01 -04:00
01f9081955 Merge bitcoin/bitcoin#32768: wallet: Remove CWalletTx::fTimeReceivedIsTxTime
9eb2c82e7c walletdb: Remove unused upgraded_txs (Ava Chow)
c668033709 wallet: Remove unused fTimeReceivedIsTxTime (Ava Chow)

Pull request description:

  `CWalletTx::fTimeReceivedIsTxTime` is no longer used and can be removed. This additionally allows the removal of the `upgraded_txs` loop in `LoadWallet`.

ACKs for top commit:
  maflcko:
    lgtm ACK 9eb2c82e7c
  Eunovo:
    ACK 9eb2c82e7c
  davidgumberg:
    ACK 9eb2c82e7c
  PeterWrighten:
    ACK 9eb2c82e7c
  rkrux:
    ACK 9eb2c82e7c
  w0xlt:
    ACK 9eb2c82e7c

Tree-SHA512: 05cf3a50f0d8ab6ef423ad1113c5ce6f45bfdc90e2c0dcf61c2dceced2465502e574b4b5b0091fcbb4bdd2182f8d69224f1e5516c7c505de07102b84a5f40e9c
2025-06-25 16:04:54 -04:00
c1d8a542b4 Merge bitcoin/bitcoin#32727: doc: add release notes for #32425
b9a2e8ee96 doc: add release notes for https://github.com/bitcoin/bitcoin/pull/32425 (Vasil Dimov)

Pull request description:

  Add release notes for https://github.com/bitcoin/bitcoin/pull/32425.

ACKs for top commit:
  pablomartin4btc:
    re-ACK b9a2e8ee96
  janb84:
    reACK b9a2e8ee96
  glozow:
    ACK b9a2e8ee96, thanks for taking suggestions!

Tree-SHA512: 617612504977007909fde921e7e40286bcf81310f9cf3996783d6148219906784e9749d67f7a9a13305d7788208143e5f6ecceafbc6790f52dd08ffd9f91944c
2025-06-25 15:58:30 -04:00
8800b5acc1 cmake: Explicitly specify Boost_ROOT for Homebrew's package
On macOS, this change ensures that the Boost package is located at its
real path rather than via the symlink in the default prefix.
2025-06-25 18:45:43 +01:00
b9a2e8ee96 doc: add release notes for https://github.com/bitcoin/bitcoin/pull/32425
Co-authored-by: Jan B <608446+janb84@users.noreply.github.com>
2025-06-25 18:23:31 +02:00
6c2538d5bf depends: Bump boost to 1.88.0 and use new CMake buildsystem
This has a few advantages over the old method of simply copying headers:
- Installs proper cmake files which can be picked up by our buildsystem
- Only installs necessary headers, not all of boost

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2025-06-25 13:37:50 +01:00
7d5a6d1739 Merge bitcoin/bitcoin#32798: build: add root dir to CMAKE_PREFIX_PATH in toolchain
e27a94596f build: add root dir to CMAKE_PREFIX_PATH (will)

Pull request description:

  Fixes: #32428

  Nix patches `cmake` to remove the root directory `/` from `CMAKE_PREFIX_PATH`:
  428b49b28e/pkgs/by-name/cm/cmake/001-search-path.diff (L10)

  Without this, and when using the toolchain for depends builds, cmake's `find_path()` and `find_package()` do not know where to find dependencies, causing issues like as seen in #32428

  Adding this path back is harmless on other systems, and fixes the toolchain for Nix users.

  As described in https://github.com/bitcoin/bitcoin/issues/32428#issuecomment-2991258328 I think this can be taken as a temporary fix whilst a longer-term solution is worked on.

ACKs for top commit:
  josibake:
    reACK e27a94596f
  hebasto:
    ACK e27a94596f, I have reviewed the code and it looks OK.
  janb84:
    reACK e27a94596f

Tree-SHA512: f299f2bab2620179518da866cbb7992d41d142ad42e79c14496e72f725a1dc60698b3e4b1daf45d28f71f32a23f0c8d7b4f6c6cf33aeedf322b7ef565b70b4af
2025-06-25 11:37:37 +01:00
ead4468748 cmake: Use HINTS instead of PATHS in find_* commands
According to the CMake documentation, `HINTS` "should be paths computed
by system introspection, such as a hint provided by the location of
another item already found", which is precisely the case in the
`FindQRencode` module.

Entries in `HINTS` are searched before those in `PATHS`. On macOS,
Homebrew’s `libqrencode` will therefore be located at its real path
rather than via the symlink in the default prefix.
2025-06-24 20:49:27 +01:00
ad654a4807 Merge bitcoin/bitcoin#32767: ci: Allow running CI in worktrees
fa68dcb207 ci: Add missing errexit to lint CI install (MarcoFalke)
fa535a6de7 ci: Allow running CI in worktrees (MarcoFalke)
faf6a04597 ci: Clean UID/GID mismatch (MarcoFalke)

Pull request description:

  Fixes #30028 (modulo lint and tidy CI).

  The error on current master in a worktree is:

  ```
  $ git worktree add ./main origin/master && cd ./main
  $ MAKEJOBS="-j$(nproc)" FILE_ENV="./ci/test/00_setup_env_mac_cross.sh" ./ci/test_run_all.sh
  ...
  + git config --global ci.base-install-done true
  fatal: not a git repository: /root/b-c-ci/.git/worktrees/main
  ```

  So just use a plain file, instead of git. Also, enable pipefail while touching this bash script.

ACKs for top commit:
  willcl-ark:
    tACK fa68dcb207

Tree-SHA512: 0ce360a80883b4aa655fe8a99c38eb54a465b17c7cdb0a69a2d886ff78da32d6af996412ffc5b0db0322acafa9650619838573484de8243dc41594a04a6e17ec
2025-06-24 14:18:20 +01:00
67e6746dc8 Merge bitcoin/bitcoin#32780: lsan: add more Qt suppressions
5be31b20e5 lsan: add more Qt suppressions (fanquake)

Pull request description:

  Using Clang clang version 20.1.6 (Fedora 20.1.6-9.fc43) and:
  ```bash
  export CC=clang
  export CXX=clang++
  cmake -B build -DBUILD_GUI=ON -DSANITIZERS=address
  cmake --build build
  export LSAN_OPTIONS="suppressions=/root/bitcoin/test/sanitizer_suppressions/lsan"
  ctest --test-dir build
  ```

  ```bash
  Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 1589ms
  ********* Finished testing of AddressBookTests *********

  =================================================================
  ==21869==ERROR: LeakSanitizer: detected memory leaks

  Direct leak of 88 byte(s) in 1 object(s) allocated from:
      #0 0xaaaab5d5af40 in operator new(unsigned long) (/root/bitcoin/build/bin/test_bitcoin-qt+0x39af40) (BuildId: c0e038f1c507ea6860d1cfd499ac54ad83359872)
      #1 0xffff8c8f56cc in QLayoutPrivate::createWidgetItem(QLayout const*, QWidget*) (/lib64/libQt6Widgets.so.6+0x1a56cc) (BuildId: 8b7b9e470f4d4cd920282a4f963abb01225814fa)
      #2 0xffff8c8d2f90 in QBoxLayout::insertWidget(int, QWidget*, int, QFlags<Qt::AlignmentFlag>) (/lib64/libQt6Widgets.so.6+0x182f90) (BuildId: 8b7b9e470f4d4cd920282a4f963abb01225814fa)
      #3 0xaaaab5fc7188 in SendCoinsDialog::addEntry() /root/bitcoin/build/src/qt/./qt/sendcoinsdialog.cpp:596:18
      #4 0xaaaab5fc4eec in SendCoinsDialog::SendCoinsDialog(PlatformStyle const*, QWidget*) /root/bitcoin/build/src/qt/./qt/sendcoinsdialog.cpp:84:5
      #5 0xaaaab5da67ac in (anonymous namespace)::MiniGUI::MiniGUI(interfaces::Node&, PlatformStyle const*) /root/bitcoin/build/src/qt/test/./qt/test/wallettests.cpp:235:75
      #6 0xaaaab5da2000 in (anonymous namespace)::TestGUI(interfaces::Node&, std::shared_ptr<wallet::CWallet> const&) /root/bitcoin/build/src/qt/test/./qt/test/wallettests.cpp:270:13
      #7 0xaaaab5d9ebc8 in (anonymous namespace)::TestGUI(interfaces::Node&) /root/bitcoin/build/src/qt/test/./qt/test/wallettests.cpp:453:5
      #8 0xaaaab5d9ebc8 in WalletTests::walletTests() /root/bitcoin/build/src/qt/test/./qt/test/wallettests.cpp:475:5
      #9 0xffff8b1c5314 in QMetaMethodInvoker::invokeImpl(QMetaMethod, void*, Qt::ConnectionType, long long, void const* const*, char const* const*, QtPrivate::QMetaTypeInterface const* const*) (/lib64/libQt6Core.so.6+0x195314) (BuildId: eacb2d1228362560e5df1a1ce496c99ad61960e7)
      #10 0xffff8b1c5dc8 in QMetaMethod::invokeImpl(QMetaMethod, void*, Qt::ConnectionType, long long, void const* const*, char const* const*, QtPrivate::QMetaTypeInterface const* const*) (/lib64/libQt6Core.so.6+0x195dc8) (BuildId: eacb2d1228362560e5df1a1ce496c99ad61960e7)
      #11 0xffff8cf57c54  (/lib64/libQt6Test.so.6+0x27c54) (BuildId: 96bb1cdeead53af0ced36d7970cf9cd79c4c4ccd)
      #12 0xffff8cf5fa18  (/lib64/libQt6Test.so.6+0x2fa18) (BuildId: 96bb1cdeead53af0ced36d7970cf9cd79c4c4ccd)
      #13 0xffff8cf6067c  (/lib64/libQt6Test.so.6+0x3067c) (BuildId: 96bb1cdeead53af0ced36d7970cf9cd79c4c4ccd)
      #14 0xffff8cf610a4  (/lib64/libQt6Test.so.6+0x310a4) (BuildId: 96bb1cdeead53af0ced36d7970cf9cd79c4c4ccd)
      #15 0xffff8cf61aa4 in QTest::qRun() (/lib64/libQt6Test.so.6+0x31aa4) (BuildId: 96bb1cdeead53af0ced36d7970cf9cd79c4c4ccd)
      #16 0xffff8cf61eb4 in QTest::qExec(QObject*, int, char**) (/lib64/libQt6Test.so.6+0x31eb4) (BuildId: 96bb1cdeead53af0ced36d7970cf9cd79c4c4ccd)
      #17 0xaaaab5d7d77c in main /root/bitcoin/build/src/qt/test/./qt/test/test_main.cpp:95:30
      #18 0xffff8aad6398 in __libc_start_call_main (/lib64/libc.so.6+0x26398) (BuildId: 627f878dd454ee3cc1dfdbd347bb565f1ffb53e7)
      #19 0xffff8aad6478 in __libc_start_main@GLIBC_2.17 (/lib64/libc.so.6+0x26478) (BuildId: 627f878dd454ee3cc1dfdbd347bb565f1ffb53e7)
      #20 0xaaaab5c74cac in _start (/root/bitcoin/build/bin/test_bitcoin-qt+0x2b4cac) (BuildId: c0e038f1c507ea6860d1cfd499ac54ad83359872)
  ```

  This happens when building using depends:
  ```bash
  Indirect leak of 24 byte(s) in 1 object(s) allocated from:
      #0 0xaaaabdbe86f8 in malloc (/root/bitcoin/build/bin/test_bitcoin-qt+0x4386f8) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #1 0xfbff97f8c164  (<unknown module>)
      #2 0xaaaabf0cfaa4 in QDBusConnectionPrivate::QDBusConnectionPrivate() (/root/bitcoin/build/bin/test_bitcoin-qt+0x191faa4) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #3 0xaaaabf0c9e30 in QDBusConnectionManager::doConnectToStandardBus(QDBusConnection::BusType, QString const&, bool) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1919e30) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #4 0xaaaabf0cb0e4 in QtPrivate::QCallableObject<QDBusConnectionPrivate* (QDBusConnectionManager::*)(QDBusConnection::BusType, QString const&, bool), QtPrivate::List<QDBusConnection::BusType&, QString const&, bool&>, QDBusConnectionPrivate*>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (/root/bitcoin/build/bin/test_bitcoin-qt+0x191b0e4) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #5 0xaaaabf5cbaf0 in QObject::event(QEvent*) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1e1baf0) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #6 0xaaaabf5a4ce0 in QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1df4ce0) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #7 0xaaaabf5a486c in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1df486c) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #8 0xaaaabf5a575c in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1df575c) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #9 0xaaaabf66b858 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1ebb858) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #10 0xaaaabf5a9e3c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1df9e3c) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #11 0xaaaabf632a44 in QThread::exec() (/root/bitcoin/build/bin/test_bitcoin-qt+0x1e82a44) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #12 0xaaaabf0c9bd0 in QDBusConnectionManager::run() (/root/bitcoin/build/bin/test_bitcoin-qt+0x1919bd0) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #13 0xaaaabf669c30 in QThreadPrivate::start(void*) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1eb9c30) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #14 0xaaaabdbe5f2c in asan_thread_start(void*) asan_interceptors.cpp.o
      #15 0xffff99538608 in thread_start (/lib64/libc.so.6+0xf8608) (BuildId: 627f878dd454ee3cc1dfdbd347bb565f1ffb53e7)

  SUMMARY: AddressSanitizer: 3592 byte(s) leaked in 37 allocation(s).
  ```

ACKs for top commit:
  maflcko:
    lgtm ACK 5be31b20e5

Tree-SHA512: 0c33661c7ec83ea9b874c1ee4ee2de513131690287363e216a88560dfb31a59ef563a50af756c86a991583aa64a600a74e20fd5d6a104cf4c0a27532de8d2211
2025-06-24 14:07:59 +01:00
e27a94596f build: add root dir to CMAKE_PREFIX_PATH
Nix patches cmake to remove the root directory `/` from
`CMAKE_SYSTEM_PREFIX_PATH`:
428b49b28e/pkgs/by-name/cm/cmake/001-search-path.diff (L10)

Without this, and when using the toolchain for depends builds, cmake's
`find_path()` and `find_package()` do not know where to find
dependencies, causing issues like:
https://github.com/bitcoin/bitcoin/issues/32428

Adding this path back via CMAKE_PREFIX_PATH is harmless on other
systems, and fixes the toolchain for Nix users.

We append the `/` dir a maximum of once, as the toolchain may be called
repeatedly during builds.

Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
Co-authored-by: josibake <josibake@protonmail.com>
2025-06-24 14:02:02 +01:00
173394d951 depends: Build qt package for FreeBSD hosts 2025-06-24 12:23:02 +01:00
e95bfc1d53 Merge bitcoin/bitcoin#32797: doc: archive 28.2 release notes
907842363c doc: archive 28.2 release notes (fanquake)

Pull request description:

  v28.2 is now tagged: https://github.com/bitcoin/bitcoin/releases/tag/v28.2.

ACKs for top commit:
  glozow:
    ACK  907842363c

Tree-SHA512: 49cde7ac9bbf08510c1914e5c9e0b80e31333a554318e29c9b61a9975d6d6308dabf5c3d8c736eba7aedee815de95d013f39456716c60cef76f0bc712dd74d6c
2025-06-23 17:50:21 -04:00
907842363c doc: archive 28.2 release notes 2025-06-23 10:15:14 +01:00
c5849663ba Merge bitcoin/bitcoin#32771: contrib: tracing: Fix read of pmsg_type in p2p_monitor.py
3473986fe1 contrib: tracing: Correctly read msg type in p2p_monitor.py (David Gumberg)

Pull request description:

  This fixes a bug in the contrib tracing script `p2p_monitor.py`. currently the script fails to read the `msg_type` of inbound and outbound messages, which is useful in the per-peer message view.

  <details>
  <summary>Screenshot of p2p_monitor.py on master</summary>

  ![Screenshot From 2025-06-18 11-37-43](https://github.com/user-attachments/assets/56612088-54d7-465c-b0b6-1b425b919785)
  </details>

  <details>
  <summary>Screenshot of p2p_monitor.py on this branch</summary>

  ![Screenshot From 2025-06-18 11-41-38](https://github.com/user-attachments/assets/4438a483-938c-450b-a12e-6d6909b2c37e)

  </details>

ACKs for top commit:
  yuvicc:
    ACK 3473986fe1
  janb84:
    ut ACK 3473986fe1
  0xB10C:
    ACK 3473986fe1

Tree-SHA512: 94da0dc35072933a20ef693024855b3c382fc6f5ae0a3108d092d7aa5a4004df478f5de07b80f675be13e00f3f4596b0f34c49ec1d8d2c38a15797dcf86c2a56
2025-06-23 09:53:36 +01:00
8a36a471e6 Merge bitcoin/bitcoin#32781: refactor: modernize deprecated ipc headers
74b7e9c7db refactor: modernize deprecated ipc headers (Sjors Provoost)

Pull request description:

  Split off from #31802.

  Pre-empt tidy warning when multiprocess is on by default:

  ```
  [10:33:51.654] /ci_container_base/src/ipc/capnp/protocol.cpp:20:10: error: inclusion of deprecated C++ header 'errno.h'; consider using 'cerrno' instead [modernize-deprecated-headers,-warnings-as-errors]
  [10:33:51.654]    20 | #include <errno.h>
  [10:33:51.654]       |          ^~~~~~~~~
  [10:33:51.654]       |          <cerrno>
  [10:33:51.654] 919 warnings generated.
  ```

  https://github.com/bitcoin/bitcoin/pull/31802/checks?check_run_id=43968493627

ACKs for top commit:
  maflcko:
    lgtm ACK 74b7e9c7db
  ryanofsky:
    Code review ACK 74b7e9c7db

Tree-SHA512: a629e9849b420c9de52dc7a74d35ca14c3522784ac101a189b20d3439a4735e2f3bb766864938abb2fc248eb94ec15c71c35db69a3267b6c29ef26e0f91a79ab
2025-06-23 09:48:45 +01:00
ed060e01e7 Merge bitcoin/bitcoin#32725: test: round difficulty and networkhashps
578ea3eedb test: round difficulty and networkhashps (Sjors Provoost)

Pull request description:

  Both are rational numbers. Client software should only use them to display information to humans. Followup calculations should use the underlying values such as target.

  Therefore it's not necessary to test the handling of these floating point values. Round them down to avoid spurious test failures.

  Fixes #32515

ACKs for top commit:
  Prabhat1308:
    Code Review ACK [`578ea3e`](578ea3eedb)
  achow101:
    ACK 578ea3eedb
  w0xlt:
    Code review ACK 578ea3eedb
  janb84:
    ACK 578ea3eedb

Tree-SHA512: 5fc63c73ad236b7cd55c15da0f1d1e6b45e4289d252147a86717bf77d79f897f42c3e38aa514df6a4a8deca10c87a8710b61b454c533ad56b0daf738365f426c
2025-06-20 16:30:41 -07:00
daf393b3f1 Merge bitcoin/bitcoin#32642: test: update BIP340 test vectors and implementation (variable-length messages)
b184f5c87c test: update BIP340 test vectors and implementation (variable-length messages) (Sebastian Falbesoner)

Pull request description:

  This PR updates the Schnorr signatures implementation in the functional test framework to the latest BIP changes (see https://github.com/bitcoin/bips/pull/1446,commit 200f9b26fe0a2f235a2af8b30c4be9f12f6bc9cb) and syncs the [test vectors](https://github.com/bitcoin/bips/blob/master/bip-0340/test-vectors.csv) accordingly. Practically, we probably don't need non-32-bytes message signing/verifying any time soon, but it seems good practice anyways to update.

ACKs for top commit:
  stratospher:
    ACK b184f5c.
  achow101:
    ACK b184f5c87c
  real-or-random:
    utACK b184f5c87c
  jonasnick:
    utACK b184f5c87c

Tree-SHA512: b566823aa0f1cd7151215178c57551d772b338d022ccb2807a0df2670df6d59c4b63a6fc936708ccf2922c7e59f474f544adaafc4aea731bfd896250c0d45fa6
2025-06-20 14:45:34 -07:00
482d255376 Merge bitcoin/bitcoin#32736: wallet: Correct dir iteration error handling
272cd09b79 log: Use warning level while scanning wallet dir (MarcoFalke)
1777644367 qa, wallet: Verify warning when failing to scan (Hodlinator)
893e51ffeb wallet: Correct dir iteration error handling (Hodlinator)

Pull request description:

  Make wallet DB properly detect and report failure to scan wallet directory. Seems to have been broken since moving from Boost to `std::filesystem`.

  Found while reviewing: https://github.com/bitcoin/bitcoin/pull/31410#pullrequestreview-2604068753

ACKs for top commit:
  achow101:
    ACK 272cd09b79
  maflcko:
    re-ACK 272cd09b79 🍽
  rkrux:
    tACK 272cd09b79

Tree-SHA512: 969afde2e37f885ed0c823dc36d2dbeaa0378639849c6a26f8ac67b4f1997eea95bbcae6d58aef5b716807210f37eb166c0cda7ba1d6caffd34249970833af3a
2025-06-20 12:47:28 -07:00
74b7e9c7db refactor: modernize deprecated ipc headers
Co-authored-by: fanquake <fanquake@gmail.com>
2025-06-19 16:29:55 +02:00
154b98a7aa Merge bitcoin/bitcoin#32772: fuzz: wallet: remove FundTx from FuzzedWallet
cd1ae1b4df fuzz: wallet: remove FundTx from FuzzedWallet (brunoerg)

Pull request description:

  `FundTx` was used by the `wallet_notifications` target which we recently removed. So it's now unused and can be removed.

ACKs for top commit:
  maflcko:
    lgtm ACK cd1ae1b4df
  kevkevinpal:
    ACK [cd1ae1b](cd1ae1b4df)
  dergoegge:
    utACK cd1ae1b4df

Tree-SHA512: 909cc4c8a0ac2a5f8844993ccf0e725021932888da3591925799145daf9196eadfcd0ebbc74a44f4a245074ded4cb8c3c099513f109ce2681dceff36b5f74bcc
2025-06-19 15:14:18 +01:00
fa183045a1 Merge bitcoin/bitcoin#32765: test: Fix list index out of range error in feature_bip68_sequence.py
e285e691b7 test: Fix list index out of range error in feature_bip68_sequence.py (zaidmstrr)

Pull request description:

  Fixes [#32334](https://github.com/bitcoin/bitcoin/issues/32334)

  The test `feature_bip68_sequence.py` fails with `IndexError: list index out of range` error due to a mismatch between the number of inputs requested (at random) and the number of UTXOs available. The error is reproducible with the randomseed:
  ```
  $ ./build/test/functional/feature_bip68_sequence.py --randomseed 6169832640268785903
  ```
  This PR adds a valid upper bound to randomly select the inputs.

ACKs for top commit:
  maflcko:
    lgtm ACK e285e691b7
  Prabhat1308:
    re-ACK [`e285e69`](e285e691b7)
  theStack:
    ACK e285e691b7

Tree-SHA512: 2e5e19d5db2880915f556ed4444abed94e9ceb1ecee5f857df5616040c850dae682aaa4ade3060c48acb16676df92ba81c3af078c1958965e9e874e7bb489388
2025-06-19 15:03:58 +01:00
5be31b20e5 lsan: add more Qt suppressions
Using Clang clang version 20.1.6 (Fedora 20.1.6-9.fc43) and:
```bash
export CC=clang
export CXX=clang++
cmake -B build -DBUILD_GUI=ON -DSANITIZERS=address
cmake --build build
export LSAN_OPTIONS="suppressions=/root/bitcoin/test/sanitizer_suppressions/lsan"
ctest --test-dir build
```

```bash
Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 1589ms
********* Finished testing of AddressBookTests *********

=================================================================
==21869==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0xaaaab5d5af40 in operator new(unsigned long) (/root/bitcoin/build/bin/test_bitcoin-qt+0x39af40) (BuildId: c0e038f1c507ea6860d1cfd499ac54ad83359872)
    #1 0xffff8c8f56cc in QLayoutPrivate::createWidgetItem(QLayout const*, QWidget*) (/lib64/libQt6Widgets.so.6+0x1a56cc) (BuildId: 8b7b9e470f4d4cd920282a4f963abb01225814fa)
    #2 0xffff8c8d2f90 in QBoxLayout::insertWidget(int, QWidget*, int, QFlags<Qt::AlignmentFlag>) (/lib64/libQt6Widgets.so.6+0x182f90) (BuildId: 8b7b9e470f4d4cd920282a4f963abb01225814fa)
    #3 0xaaaab5fc7188 in SendCoinsDialog::addEntry() /root/bitcoin/build/src/qt/./qt/sendcoinsdialog.cpp:596:18
    #4 0xaaaab5fc4eec in SendCoinsDialog::SendCoinsDialog(PlatformStyle const*, QWidget*) /root/bitcoin/build/src/qt/./qt/sendcoinsdialog.cpp:84:5
    #5 0xaaaab5da67ac in (anonymous namespace)::MiniGUI::MiniGUI(interfaces::Node&, PlatformStyle const*) /root/bitcoin/build/src/qt/test/./qt/test/wallettests.cpp:235:75
    #6 0xaaaab5da2000 in (anonymous namespace)::TestGUI(interfaces::Node&, std::shared_ptr<wallet::CWallet> const&) /root/bitcoin/build/src/qt/test/./qt/test/wallettests.cpp:270:13
    #7 0xaaaab5d9ebc8 in (anonymous namespace)::TestGUI(interfaces::Node&) /root/bitcoin/build/src/qt/test/./qt/test/wallettests.cpp:453:5
    #8 0xaaaab5d9ebc8 in WalletTests::walletTests() /root/bitcoin/build/src/qt/test/./qt/test/wallettests.cpp:475:5
    #9 0xffff8b1c5314 in QMetaMethodInvoker::invokeImpl(QMetaMethod, void*, Qt::ConnectionType, long long, void const* const*, char const* const*, QtPrivate::QMetaTypeInterface const* const*) (/lib64/libQt6Core.so.6+0x195314) (BuildId: eacb2d1228362560e5df1a1ce496c99ad61960e7)
    #10 0xffff8b1c5dc8 in QMetaMethod::invokeImpl(QMetaMethod, void*, Qt::ConnectionType, long long, void const* const*, char const* const*, QtPrivate::QMetaTypeInterface const* const*) (/lib64/libQt6Core.so.6+0x195dc8) (BuildId: eacb2d1228362560e5df1a1ce496c99ad61960e7)
    #11 0xffff8cf57c54  (/lib64/libQt6Test.so.6+0x27c54) (BuildId: 96bb1cdeead53af0ced36d7970cf9cd79c4c4ccd)
    #12 0xffff8cf5fa18  (/lib64/libQt6Test.so.6+0x2fa18) (BuildId: 96bb1cdeead53af0ced36d7970cf9cd79c4c4ccd)
    #13 0xffff8cf6067c  (/lib64/libQt6Test.so.6+0x3067c) (BuildId: 96bb1cdeead53af0ced36d7970cf9cd79c4c4ccd)
    #14 0xffff8cf610a4  (/lib64/libQt6Test.so.6+0x310a4) (BuildId: 96bb1cdeead53af0ced36d7970cf9cd79c4c4ccd)
    #15 0xffff8cf61aa4 in QTest::qRun() (/lib64/libQt6Test.so.6+0x31aa4) (BuildId: 96bb1cdeead53af0ced36d7970cf9cd79c4c4ccd)
    #16 0xffff8cf61eb4 in QTest::qExec(QObject*, int, char**) (/lib64/libQt6Test.so.6+0x31eb4) (BuildId: 96bb1cdeead53af0ced36d7970cf9cd79c4c4ccd)
    #17 0xaaaab5d7d77c in main /root/bitcoin/build/src/qt/test/./qt/test/test_main.cpp:95:30
    #18 0xffff8aad6398 in __libc_start_call_main (/lib64/libc.so.6+0x26398) (BuildId: 627f878dd454ee3cc1dfdbd347bb565f1ffb53e7)
    #19 0xffff8aad6478 in __libc_start_main@GLIBC_2.17 (/lib64/libc.so.6+0x26478) (BuildId: 627f878dd454ee3cc1dfdbd347bb565f1ffb53e7)
    #20 0xaaaab5c74cac in _start (/root/bitcoin/build/bin/test_bitcoin-qt+0x2b4cac) (BuildId: c0e038f1c507ea6860d1cfd499ac54ad83359872)
```

This happens when building using depends:
```bash
Indirect leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0xaaaabdbe86f8 in malloc (/root/bitcoin/build/bin/test_bitcoin-qt+0x4386f8) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
    #1 0xfbff97f8c164  (<unknown module>)
    #2 0xaaaabf0cfaa4 in QDBusConnectionPrivate::QDBusConnectionPrivate() (/root/bitcoin/build/bin/test_bitcoin-qt+0x191faa4) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
    #3 0xaaaabf0c9e30 in QDBusConnectionManager::doConnectToStandardBus(QDBusConnection::BusType, QString const&, bool) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1919e30) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
    #4 0xaaaabf0cb0e4 in QtPrivate::QCallableObject<QDBusConnectionPrivate* (QDBusConnectionManager::*)(QDBusConnection::BusType, QString const&, bool), QtPrivate::List<QDBusConnection::BusType&, QString const&, bool&>, QDBusConnectionPrivate*>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (/root/bitcoin/build/bin/test_bitcoin-qt+0x191b0e4) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
    #5 0xaaaabf5cbaf0 in QObject::event(QEvent*) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1e1baf0) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
    #6 0xaaaabf5a4ce0 in QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1df4ce0) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
    #7 0xaaaabf5a486c in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1df486c) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
    #8 0xaaaabf5a575c in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1df575c) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
    #9 0xaaaabf66b858 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1ebb858) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
    #10 0xaaaabf5a9e3c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1df9e3c) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
    #11 0xaaaabf632a44 in QThread::exec() (/root/bitcoin/build/bin/test_bitcoin-qt+0x1e82a44) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
    #12 0xaaaabf0c9bd0 in QDBusConnectionManager::run() (/root/bitcoin/build/bin/test_bitcoin-qt+0x1919bd0) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
    #13 0xaaaabf669c30 in QThreadPrivate::start(void*) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1eb9c30) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
    #14 0xaaaabdbe5f2c in asan_thread_start(void*) asan_interceptors.cpp.o
    #15 0xffff99538608 in thread_start (/lib64/libc.so.6+0xf8608) (BuildId: 627f878dd454ee3cc1dfdbd347bb565f1ffb53e7)

SUMMARY: AddressSanitizer: 3592 byte(s) leaked in 37 allocation(s).
```
2025-06-19 14:15:33 +01:00
e18322eff2 Merge bitcoin/bitcoin#32774: doc: Explain how to fetch commits directly
fa94fd53c9 doc: Explain how to fetch commits directly (MarcoFalke)

Pull request description:

  This is often needed, and works better than the existing refspec documentation, because even commits that have been force-pushed away can be fetched (as long as they are not garbage collected on the remote).

ACKs for top commit:
  Sjors:
    ACK fa94fd53c9
  l0rinc:
    ACK fa94fd53c9
  willcl-ark:
    ACK fa94fd53c9
  rkrux:
    ACK fa94fd53c9
  janb84:
    ACK fa94fd53c9

Tree-SHA512: b68c0c612e13f501ad4c1c709502e060b0a2d0eb55ef888c7466e2a10bdf3ca63d81b8bd7927de49cde9e29f0b06f8233d51b99d015ae0b39d556854be542b8a
2025-06-19 12:32:30 +01:00
b861419254 Merge bitcoin/bitcoin#32777: doc: fix Transifex 404s
53a996f122 doc: fix transifex 404s (fanquake)

Pull request description:

  https://www.transifex.com/bitcoin/bitcoin/ is now a 404.

ACKs for top commit:
  maflcko:
    lgtm ACK 53a996f122
  hebasto:
    ACK 53a996f122, I've verified all the links.

Tree-SHA512: 8e698c83095a3d3a225b0bf2ee9c39ad434b2917ead4271ff39a282cea6283710091d1e8b91edafd280bf356dec2bdbe42981aafe4d64f623a975232c5ca848c
2025-06-19 11:43:55 +01:00
79afe6b7c0 Merge bitcoin/bitcoin#32776: doc: taproot became always active in v24.0 (doc/bips.md)
8ee8a951c2 doc: taproot became always active in v24.0 (Sjors Provoost)

Pull request description:

  Split from #26201.

ACKs for top commit:
  maflcko:
    lgtm ACK 8ee8a951c2
  janb84:
    ACK 8ee8a951c2

Tree-SHA512: 1ac6994c6775ca5423f022d1e02e3d531fb7fa295be9940355b8aa9d173787a8d65945a0cf976ab344bcaa3ea8a0f3aa6f8da851325bf475e59375981b115cab
2025-06-19 11:40:47 +01:00
53a996f122 doc: fix transifex 404s 2025-06-19 11:22:14 +01:00
8ee8a951c2 doc: taproot became always active in v24.0 2025-06-19 11:15:00 +02:00
fa94fd53c9 doc: Explain how to fetch commits directly 2025-06-19 08:33:43 +02:00
9a7eece5a4 Merge bitcoin/bitcoin#31981: Add checkBlock() to Mining interface
a18e572328 test: more template verification tests (Sjors Provoost)
10c908808f test: move gbt proposal mode tests to new file (Sjors Provoost)
94959b8dee Add checkBlock to Mining interface (Sjors Provoost)
6077157531 ipc: drop BlockValidationState special handling (Sjors Provoost)
74690f4ed8 validation: refactor TestBlockValidity (Sjors Provoost)

Pull request description:

  This PR adds the IPC equivalent of the `getblocktemplate` RPC in `proposal` mode.

  In order to do so it has `TestBlockValidity` return error reasons as a string instead of `BlockValidationState`. This avoids complexity in IPC code for handling the latter struct.

  The new Mining interface method is used in `miner_tests`.

  It's not used by the `getblocktemplate` and `generateblock` RPC calls, see https://github.com/bitcoin/bitcoin/pull/31981#discussion_r2096473337

  The `inconclusive-not-best-prevblk` check is moved from RPC
  code to `TestBlockValidity`.

  Test coverage is increased by `mining_template_verification.py`.

  Superseedes #31564

  ## Background

  ### Verifying block templates (no PoW)

  Stratum v2 allows miners to generate their own block template. Pools may wish (or need) to verify these templates. This typically involves comparing mempools, asking miners to providing missing transactions and then reconstructing the proposed block.[^0] This is not sufficient to ensure a proposed block is actually valid. In some schemes miners could take advantage of incomplete validation[^1].

  The Stratum Reference Implementation (SRI), currently the only Stratum v2 implementation, collects all missing mempool transactions, but does not yet fully verify the block.[^2]. It could use the `getblocktemplate` RPC in `proposal` mode, but using IPC is more performant, as it avoids serialising up to 4 MB of transaction data as JSON.

  (although SRI could use this PR, the Template Provider role doesn't need it, so this is _not_ part of #31098)

  [^0]: https://github.com/stratum-mining/sv2-spec/blob/main/06-Job-Declaration-Protocol.md
  [^1]: https://delvingbitcoin.org/t/pplns-with-job-declaration/1099/45?u=sjors
  [^2]: https://github.com/stratum-mining/stratum/blob/v1.1.0/roles/jd-server/src/lib/job_declarator/message_handler.rs#L196

ACKs for top commit:
  davidgumberg:
    reACK a18e572328
  achow101:
    ACK a18e572328
  TheCharlatan:
    ACK a18e572328
  ryanofsky:
    Code review ACK a18e572328 just adding another NONFATAL_UNREACHABLE since last review

Tree-SHA512: 1a6c29f45a1666114f10f55aed155980b90104db27761c78aada4727ce3129e6ae7a522d90a56314bd767bd7944dfa46e85fb9f714370fc83e6a585be7b044f1
2025-06-18 17:07:21 -07:00
3473986fe1 contrib: tracing: Correctly read msg type in p2p_monitor.py 2025-06-18 11:35:06 -07:00
cd1ae1b4df fuzz: wallet: remove FundTx from FuzzedWallet 2025-06-18 11:11:25 -03:00
fa68dcb207 ci: Add missing errexit to lint CI install
Otherwise, a possible failure is silently ignored.

Also, rename the file, while touching it, to clarify installing is the
first step.
2025-06-18 14:11:11 +02:00
fa535a6de7 ci: Allow running CI in worktrees 2025-06-18 10:23:45 +02:00
faf6a04597 ci: Clean UID/GID mismatch
rsync --archive will preserve owner and group, which is then required to
be handled by adding a git safe.directory workaround.

Remove the need for the workaround by only preserving permissions during
the recursive rsync copy.
2025-06-18 10:22:53 +02:00
9eb2c82e7c walletdb: Remove unused upgraded_txs 2025-06-17 17:41:46 -07:00