Commit Graph

48161 Commits

Author SHA1 Message Date
merge-script
410f2a0d20 Merge bitcoin/bitcoin#33772: prevector: simplify operator==
2678abe902 prevector: simplify `operator==` (Daniel Pfeifer)

Pull request description:

  The reduced amount of code reduces maintenance.

ACKs for top commit:
  maflcko:
    lgtm ACK 2678abe902
  l0rinc:
    Tested ACK 2678abe902
  sedited:
    ACK 2678abe902
  stickies-v:
    ACK 2678abe902

Tree-SHA512: 0646b055314944e1457cc434b90a533b6a9f0b48801410b77e031c1f05451a6cd3269350e6e2cead86de9add0ba86339df36f69e9630d686505218717112737b
2026-03-11 09:39:05 +01:00
merge-script
3dcba2eff0 Merge bitcoin/bitcoin#26988: cli: rework -addrinfo cli to use addresses which aren’t filtered for quality/recency
b3046cca71 doc: add release notes for #26988 (stratospher)
675be93024 cli: modify -addrinfo to use getaddrmaninfo RPC endpoint (stratospher)

Pull request description:

  Rework of `-addrinfo` CLI is done using `getaddrmaninfo` RPC proposed in https://github.com/bitcoin/bitcoin/pull/27511. This would be useful for users who want to know the total number of addresses the node knows about and can make connections to.

  Currently, `-addrinfo` returns total number of addresses the node knows about after filtering them for quality + recency using [`isTerrible`](4b51290f71/src/addrman.cpp (L808)). However `isTerrible`addresses [don't matter](https://github.com/bitcoin/bitcoin/pull/26988#discussion_r1147725684) when selecting outbound peers to connect to. Total number of addresses the node knows about could be higher than what `-addrinfo` currently displays. See https://github.com/bitcoin/bitcoin/pull/24370.

ACKs for top commit:
  ajtowns:
    ACK b3046cca71
  pablomartin4btc:
    re-ACK b3046cca71
  vasild:
    ACK b3046cca71
  sr-gi:
    tACK b3046cca71

Tree-SHA512: 764b74f9e0e28a65f8644a31228ca70f6e2cd4c6a93d8f29093ed7a241cd20a81e24b4babace170d945fb28078793d52ec1f4bce898a6d478950fb29ce54af91
2026-03-11 09:12:13 +01:00
Ava Chow
b97abdcdf1 Merge bitcoin/bitcoin#34766: Pre-31.x branching updates
48b952cbb6 build: bump to 31.99 (Ava Chow)
1b3d58f128 docs Remove 31.0 release notes fragments (Ava Chow)
b7cf2f87d0 docs: Update bips.md (Ava Chow)

Pull request description:

  Completes the final steps immediately prior to branching:

  * Bump version to 31.99
  * Update bips.md
  * Remove release note fragments

ACKs for top commit:
  davidgumberg:
    ACK 48b952cbb6
  ryanofsky:
    Code review ACK 48b952cbb6

Tree-SHA512: b812d93ffc37cbc4ac37467d20459b453530a8d5bf712c8d931031a16f71884cc011faefab741d8939ad283907ed70b51e1def1f922d7c002379dd7e0f36d676
2026-03-10 18:55:44 -07:00
Ava Chow
eed3161893 Merge bitcoin/bitcoin#34792: clusterlin: update SFL comments for deterministic order
d67c8ed788 clusterlin: update SFL comments for deterministic order (Pieter Wuille)

Pull request description:

  This was missed in #34257.

ACKs for top commit:
  marcofleon:
    ACK d67c8ed788
  achow101:
    ACK d67c8ed788

Tree-SHA512: e381da09eb686e69c0fb32cc16dff7ae108f13ecb07bc1466f504a7b4c773d4557599c659f6d2e9ba0037ed89179c2e187f383a917e0242c4c795cf6e1c9cec6
2026-03-10 18:28:32 -07:00
Ava Chow
730308386a Merge bitcoin/bitcoin#34696: Update embedded asmap to 1772726400 for v31
0690a5d0f2 Update embedded asmap to 1772726400 (Fabian Jahr)

Pull request description:

  This updates the currently embedded data ahead of the v31 release.

  It currently uses the map from the 1772726400 run
  - Pull request: https://github.com/bitcoin-core/asmap-data/pull/45
  - Issue: https://github.com/bitcoin-core/asmap-data/issues/44

  The attestation process to accompany these runs is still rather new but sigs are collected here: https://github.com/asmap/asmap.sigs/tree/main/1772726400

ACKs for top commit:
  achow101:
    ACK 0690a5d0f2
  sedited:
    ACK 0690a5d0f2
  hodlinator:
    ACK 0690a5d0f2 FWIW

Tree-SHA512: 61c43ea1bd44425aa07056316220a0e9f3c4ec59cd9447277e114b2004fd7f9e525fb56ac0b3f590447d1a454fa3c636c7ac8c034a673a76126ce51e005cce49
2026-03-10 15:55:36 -07:00
merge-script
951863d022 Merge bitcoin/bitcoin#34769: doc: update http worker thread names
46189fd526 doc: update http worker thread names (rkrux)

Pull request description:

  After using `Threadpool` for HTTP server in PR 33689, the previously
  documented HTTP worker thread names are outdated. This commit makes
  the corresponding changes to document new names for the HTTP worker
  threads. Below is the output from the `thead list` command after
  attaching `lldb` to `bitcoind`.

  ```zsh
  thread #3: tid = 0xfe551, 0x00007ff80e3536f6 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'b-http_pool_0'
  thread #4: tid = 0xfe552, 0x00007ff80e3536f6 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'b-http_pool_1'
  ```

  <!--
  *** 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:
  l0rinc:
    ACK 46189fd526
  hebasto:
    ACK 46189fd526.
  theStack:
    ACK 46189fd526
  furszy:
    ACK 46189fd526
  sedited:
    ACK 46189fd526

Tree-SHA512: dc17dcd942a562da0e5ec9b6185db12d7e8ab8539fd6a78e944e95a723040c03c069f6806b8fc2f070839cb7012709d434b9e3e3bce08744dd818abbfe72e3ff
2026-03-10 21:29:25 +01:00
Pieter Wuille
d67c8ed788 clusterlin: update SFL comments for deterministic order 2026-03-10 14:09:27 -04:00
Fabian Jahr
0690a5d0f2 Update embedded asmap to 1772726400
The file was produced in this collaborative run: https://github.com/bitcoin-core/asmap-data/issues/44
2026-03-10 18:54:41 +01:00
merge-script
f82d076771 Merge bitcoin/bitcoin#34784: ci: use latest versions of lint deps
9f3752c437 ci: use latest versions of lint deps (fanquake)

Pull request description:

  Use the latest available versions, except for LIEF, which is changed with Guix.

ACKs for top commit:
  hebasto:
    ACK 9f3752c437, I've verified the releases against https://pypi.org and https://github.com/becheran/mlc.

Tree-SHA512: e6ed79bb7dc8601ed0708eb7b53cbf4cf843b69829c073c41e9d97be690b4b2bf9ea5ecf250e05cbacba4ad35df06aa3e2cb2ff319145a34e1a7831cf182ec21
2026-03-10 15:52:10 +00:00
Hennadii Stepanov
a9baf19172 Merge bitcoin/bitcoin#34789: doc: update build guides pre v31
6b20ad84e0 doc: update build guides pre v31 (fanquake)

Pull request description:

  We are testing on FreeBSD 15 (nightly) and macOS 26 (CI).

ACKs for top commit:
  maflcko:
    lgtm ACK 6b20ad84e0
  hebasto:
    ACK 6b20ad84e0.

Tree-SHA512: c97528d8db762f44d6ada064162264eedf67b154de0f357b915b14d4260b6802b099d19156ab5747120e4c632b21a8c8de92e2a903bbfcfcf4376549694eef1f
2026-03-10 15:10:13 +00:00
merge-script
48f26e2040 Merge bitcoin/bitcoin#34751: doc: Update asmap-data repository rule for file inclusion
8bc62ce173 doc: Update asmap-data repository rule for file inclusion (Fabian Jahr)

Pull request description:

  This updates the decision rule for file inclusion in the asmap-data repository after a collaborative run following discussion in the latest run: https://github.com/bitcoin-core/asmap-data/issues/44

  The change is small but does a few things:
  - No minimum number of participants recommended anymore
  - Minimum number of matches set to 5 (which was previously the number of recommended min participants)
  - The result that is taken does not need to see a match between the majority of participants, it only needs to have the most matches
  - Participants that saw a match should sign for it

  I also thought about adding an explicit tie-breaker if there are two results with the same number of matches but since both results are equally valid I think it won't be needed (?)

ACKs for top commit:
  hodlinator:
    ACK 8bc62ce173
  luisschwab:
    ACK 8bc62ce173
  janb84:
    Concept ACK 8bc62ce173

Tree-SHA512: 439ba1275662122e226aa472dd96fa8ed0e1af3e91d695c711e082d7ba182883e1174f954d2531cdf7e05bdbeab5ef088f8bcbd39c7124afe82baf2026ed391b
2026-03-10 14:32:34 +00:00
fanquake
6b20ad84e0 doc: update build guides pre v31
We are testing on FreeBSD 15 (nightly) and macOS 26 (CI).
2026-03-10 14:13:44 +00:00
Hennadii Stepanov
195306c359 Merge bitcoin/bitcoin#34785: ci: remove TODOs from retry
c08f0c3c29 ci: remove TODOs from retry (fanquake)

Pull request description:

  TODOs are good targets for LLMs to generate PRs. Remove these TODOs, which aren't needed, to prevent that.

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

Tree-SHA512: 4561cd3221b06bc877c4dadd79c9be02839c8ce7dee924d118897bb0a96d223ce60e3f1c2dfb8b6eecf9abe96c188dc875134395ed15cac669b5ae1435fc1e5f
2026-03-10 13:02:02 +00:00
fanquake
c08f0c3c29 ci: remove TODOs from retry
TODOs are good targets for LLMs to generate PRs. Remove these TODOs,
which aren't needed, to prevent that.
2026-03-10 11:50:32 +00:00
fanquake
9f3752c437 ci: use latest versions of lint deps
Use the latest available versions, except for LIEF, which is
changed with Guix.
2026-03-10 11:20:59 +00:00
merge-script
544c15ff4e Merge bitcoin/bitcoin#34759: walletdb: hash pubkey/privkey in one shot to avoid leaking secret data
501a3dd4ad walletdb: hash pubkey/privkey in one shot to avoid leaking secret data (Sebastian Falbesoner)

Pull request description:

  In several places in the wallet DB module, byte strings containing serialized public keys and secret keys are created in order to be hashed. To avoid sensitive data lingering in memory (and potentially leaking), don't store the preimage, but hash both public key and secret key in one shot, using the overloaded `Hash` function:
  d198635fa2/src/hash.h (L82-L88)

  See e.g. #31166 and #31774 for similarly themed PRs (Note that in #31166 we used the explicit `memory_cleanse` approach though, as changing the allocator was not possible.)

ACKs for top commit:
  davidgumberg:
    crACK 501a3dd4ad
  furszy:
    ACK 501a3dd4ad
  rkrux:
    ACK 501a3dd
  theuni:
    ACK 501a3dd4ad

Tree-SHA512: 8a71685b26bf89fca181aed6512a8db843b6d1dc740a468bb33fb2a629a23167a9676c228d1077ad8db2df9db80f47e32ec013737e93df8ee6f4ba505d3d50c9
2026-03-10 11:19:40 +00:00
Hennadii Stepanov
9aea2905fe Merge bitcoin/bitcoin#34783: depends: link to upstream qt issue
3a83715c2a depends: link to upstream qt issue (fanquake)

Pull request description:

  Follows up to:
  https://github.com/bitcoin/bitcoin/pull/34650#discussion_r2837726376.

  https://qt-project.atlassian.net/browse/QTBUG-144864

ACKs for top commit:
  sedited:
    ACK 3a83715c2a
  hebasto:
    ACK 3a83715c2a.

Tree-SHA512: a0ad902bb8d19cd065410dc3a9f15c83d4ff3807219b5fd6084f09a12c4003ef89fc28b4237311baa39c534d2ae1194b70b2d9dd036d4cf6f8a8385362f411b7
2026-03-10 11:16:44 +00:00
fanquake
3a83715c2a depends: link to upstream qt issue
Follows up to:
https://github.com/bitcoin/bitcoin/pull/34650#discussion_r2837726376.

https://qt-project.atlassian.net/browse/QTBUG-144864
2026-03-10 11:01:11 +00:00
merge-script
8dcd79949f Merge bitcoin/bitcoin#34718: Release: 31.0 translations update
d21afb297c qt: 31.0 translations update (Hennadii Stepanov)

Pull request description:

  This PR follows our [Release Process](24699fec84/doc/release-process.md) and concludes the translation-specific efforts for this release cycle. It follows two previous translation-related PRs, https://github.com/bitcoin/bitcoin/pull/34525 and https://github.com/bitcoin-core/gui/pull/931.

  It is one of the steps required _before_ branch-off, as scheduled in https://github.com/bitcoin/bitcoin/issues/33607.

  A previous similar PR: https://github.com/bitcoin/bitcoin/pull/33275.

  **A Note for reviewers:**
  The actual translations on Transifex is a moving target. As a result, your diff after running [`bitcoin-maintainer-tools/update-translations.py`](https://github.com/bitcoin-core/bitcoin-maintainer-tools/blob/main/update-translations.py) may differ.

ACKs for top commit:
  fanquake:
    ACK d21afb297c

Tree-SHA512: 1b95fb53b7285cbe2031c18b773519fe8db05417f5eeed70a5d9d97ffe3b8f0c1e8d21e469b9a6a723a3ade5241354fa150f4431895c806183a0492e55905ea5
2026-03-10 10:59:09 +00:00
merge-script
5f9068bdcd Merge bitcoin/bitcoin#34781: test: Remove fixed TODO in address_to_scriptpubkey
fa0587a306 test: Remove fixed TODO in address_to_scriptpubkey (MarcoFalke)

Pull request description:

  After commit d178082996 added the bech32 format, the TODO about adding other formats can be removed.

ACKs for top commit:
  sedited:
    ACK fa0587a306
  rkrux:
    crACK fa0587a306
  musaHaruna:
    ACK [fa0587a](fa0587a306)

Tree-SHA512: 49a8a514bed11e945bd8f9b13b84ae14b4dbc8a7ebb7224b1746776d9dbf68abc3b53d67f1b7fff83bc4360b15324fb96611550f4aca808b16beb03bcbfd0a55
2026-03-10 10:38:38 +00:00
Hennadii Stepanov
d21afb297c qt: 31.0 translations update 2026-03-10 08:39:17 +00:00
MarcoFalke
fa0587a306 test: Remove fixed TODO in address_to_scriptpubkey 2026-03-10 08:42:58 +01:00
rkrux
46189fd526 doc: update http worker thread names
After using `Threadpool` for HTTP server in PR 33689, the previously
documented HTTP worker thread names are outdated. This commit makes
the corresponding changes to document new names for the HTTP worker
threads. Below is the output from the `thead list` command after
attaching `lldb` to `bitcoind`.

```zsh
thread #3: tid = 0xfe551, 0x00007ff80e3536f6 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'b-http_pool_0'
thread #4: tid = 0xfe552, 0x00007ff80e3536f6 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'b-http_pool_1'
```
2026-03-10 12:55:29 +05:30
merge-script
d3056bc149 Merge bitcoin/bitcoin#34606: doc: clarify swapping impact on IBD performance
a61907e5d9 doc: explain swapping in `reduce-memory.md` (Lőrinc)

Pull request description:

  ### Problem
  Sustained [heavy swapping](https://en.wikipedia.org/wiki/Thrashing_(computer_science)) can grind execution to a halt, but today users get no direct warning from the node when this happens, and this caveat is not documented.

  ### Fix
  We can’t easily detect heavy swap pressure in a reliable, cross-platform way, but we can document what swapping is and why it can severely degrade IBD performance.

  ---

  Note: An earlier version of this PR attempted to detect and warn on heavy swapping (Linux-only), but it was changed to documentation based on review feedback.

ACKs for top commit:
  ajtowns:
    utACK a61907e5d9
  sedited:
    ACK a61907e5d9

Tree-SHA512: b21c40d07d78d890c19d3a17faad4ab4127688884dc433a1bdb63d18de07628c048227eba2f1258c6b542a71a986d4250f8abf8f8ffe0cda433ce0c8673978d4
2026-03-09 14:21:36 +00:00
merge-script
f201ccc800 Merge bitcoin/bitcoin#34673: contrib: Update fixed seeds pre-31.0
fec58229fa contrib: Update fixed feeds (Ava Chow)
27fbdb009f makeseeds: Choose node info with most recent success when deduplicating (Ava Chow)
982883a1bc makeseeds: Update known user agents (Ava Chow)

Pull request description:

ACKs for top commit:
  fjahr:
    ACK fec58229fa

Tree-SHA512: 2852a9a6a7c299ce04ee4dc438af9547d56a860858201ad2ccdea14640b17876e7e9841ce3a30030e2482cd04e9b386f7ede5c4e51582ebd09b9ce0a2a0bc43b
2026-03-09 12:30:57 +00:00
merge-script
42f97c542d Merge bitcoin/bitcoin#34705: kernel: Use fs:: namespace and unicode path in kernel tests
89386e700e kernel: Use fs:: namespace and unicode path in kernel tests (sedited)

Pull request description:

  Add support for unicode characters in paths to the kernel tests by using our fs:: wrappers for std::filesystem calls and adding the windows application manifest to the binary. This exercises their handling through the kernel API.

ACKs for top commit:
  hebasto:
    ACK 89386e700e.
  w0xlt:
    ACK 89386e700e

Tree-SHA512: 7b541f482d84a66c89eec63aea0e7f7626bbbd62082ad7a7fb2c7a517296c291a6ff301c628e5e9e1d7b850ead89005141481a2bfd06d8a9081622e32f7340cc
2026-03-09 12:24:54 +00:00
merge-script
7691e8a005 Merge bitcoin/bitcoin#34471: refactor: Use aliasing shared_ptr in Sock::Wait
faa016af54 refactor: Use aliasing shared_ptr in Sock::Wait (MarcoFalke)

Pull request description:

  Currently, a no-op lambda is used as the deleter for the temporary shared pointer helper in `Sock::Wait`. This is perfectly fine, but has a few style issues:

  * The lambda needs to be allocated on the heap
  * It triggers a false-positive upstream GCC-16-trunk bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123912

  Fix all issues by just using an aliasing shared pointer, which points to `this`, but is otherwise empty (sits on the stack without any heap allocations).

ACKs for top commit:
  hodlinator:
    ACK faa016af54
  sedited:
    ACK faa016af54
  vasild:
    ACK faa016af54

Tree-SHA512: b7330862204e79fb61f30694accb16f9a24e5722bd0ceb098ca27c877cff921afa00c0cfd953d4cbb355e6433706961a25b628efefdbe0b48bdec2941eaaee7a
2026-03-09 10:54:47 +00:00
merge-script
49bd12bd89 Merge bitcoin/bitcoin#34693: doc: Use relative markdown links
fa9d0623a3 doc: Use relative markdown links (MarcoFalke)

Pull request description:

  Using fully resolved links (to the `master` branch) in markdown files is problematic, because:

  * When the target file is (re)moved, such a link will be a 404
  * When reading docs for a previous commit/release, one is redirected to the master branch on such a link
  * When the target file has been updated, it may no longer apply to the commit/release one came from (changed options, etc)

  Fix all issues by using relative markdown links. Note that this only works in markdown. Also, release notes are left as-is, because they will be shared stand-alone externally, so can't use relative links.

ACKs for top commit:
  kevkevinpal:
    tACK [fa9d062](fa9d0623a3)
  l0rinc:
    code review ACK fa9d0623a3
  rkrux:
    tACK fa9d0623a3
  sedited:
    ACK fa9d0623a3

Tree-SHA512: 74cd661f20f93dc1af602ab4c6ff79673ff48fc956aca1cdd0039b127914a83fb61cff61ea92c8978c85fa500d1a1423bf9739bce261860fe037c8dfefb8acad
2026-03-09 10:24:06 +00:00
merge-script
aefa8e6d14 Merge bitcoin/bitcoin#34361: test: clean up tx resurrection (re-org) test in feature_block.py
5b2c3960b9 test: clean up tx resurrection (re-org) test in feature_block.py (Sebastian Falbesoner)

Pull request description:

  The following comment about ECDSA signatures created with the test framework not passing mempool policy has been obsolete for a long time (at least since 2019, see PR #15826):

  8c07800b19/test/functional/feature_block.py (L1167-L1172)

  so remove it. While at it, change the resurrected txs to be indeed standard valid, so the `acceptnonstdtxn=1` parameter can also be removed from the functional test.

  Kudos to stratospher, who (IIRC) mentioned this outdated comment a while ago.

ACKs for top commit:
  sedited:
    ACK 5b2c3960b9
  Bortlesboat:
    Tested ACK 5b2c3960b9. Ran feature_block.py locally, passes. Nice cleanup — removing `-acceptnonstdtxn=1` by making the resurrection txs standard (P2PK) is the right approach. The old unsigned OP_TRUE workaround comment explains why this was needed, glad to see it gone.
  stratospher:
    ACK 5b2c3960. nice!

Tree-SHA512: 94517e432647a8e8db51fad90a26493c57ce9dfd924b17ce909ea40d50bc6279d974c6d2046b34f5f92b481ca5e0abdedaf412ce41b4cb904605c140a8dba583
2026-03-09 10:21:10 +00:00
merge-script
3a222507fd Merge bitcoin/bitcoin#34037: wallet, doc: clarify the coin selection filters that enforce cluster count
a067ca3410 [doc] coin selection filters by max cluster count, not descendant (glozow)
f7be5fb8fc [refactor] rename variable to clarify it is unused and cluster count (glozow)

Pull request description:

  Followup to #33629.

  Fix misleading docs and variable names. Namely, `getTransactionAncestry` returns the cluster count, not max descendant count of ancestor set (not worth reimplementing as it is merely a heuristic). No behavior changes - I don’t think much needs to be changed for the first release containing cluster mempool.

  Current `CoinEligibilityFilter`s enforce a maximum ancestor count (summed across all outputs, potentially overestimating) and max descendant count across ancestors of the output.

  Since #33629, these filters have started using cluster count instead of max desc count across ancestors. The change isn’t dangerous, as the cluster count bounds descendant count as well. Currently, the wallet is essentially enforcing a mixture of both limits - this is good while we are transitioning. Note that the cluster count enforced is 25, not 64, since it's grabbing the node's descendant count limit. While it is not an apples-to-apples comparison, a cluster count limit of 25 helps us avoid busting legacy descendant limits (which will be common on the network for a while).

  Potential things for the future, out of scope for this PR:
  - When we get rid of the ancestor/descendant config options, `getPackageLimits` can probably be replaced with hard-coded values.
  - Change the `OutputGroup`s to track the actual cluster count that results from spending these outputs and merging their clusters.
  - Loosen from 25 after that policy is no longer common.
  - Clean up `getPackageLimits`.

ACKs for top commit:
  achow101:
    ACK a067ca3410
  ismaelsadeeq:
    reACK a067ca3410
  rkrux:
    crACK a067ca3410

Tree-SHA512: d7cacd5bf668d42e26e8b83e42a42c280929c3bfd554c3db1de605e5939f8b36c14ecfd2839abeb4eec352363df1891b3420a693c250916391ab10a5ce26396b
2026-03-09 10:11:08 +00:00
Sebastian Falbesoner
501a3dd4ad walletdb: hash pubkey/privkey in one shot to avoid leaking secret data
Avoid storing the privkey in a vector, which could linger in memory
and potentially leak sensitive data. An alternative approach is to
use `secure_allocator` for the `std::vector` instances, but this
commit has the advantage of also deduplicating code at the same shot.

Thanks to @theuni for suggesting this.
2026-03-08 17:58:27 +01:00
merge-script
d198635fa2 Merge bitcoin/bitcoin#34677: kernel: Chainparams and headerssync updates pre-31.0
44538f8ada kernel: Add recent assumeutxo snapshot info (Ava Chow)
58c2e23fca kernel: Update headerssync params (Ava Chow)
cf261b071f kernel: update chainTxData (Ava Chow)
8eaf1d26d4 kernel: update defaultAssumeValid and minimumChainWork (Ava Chow)
5ca0c55517 kernel: update assumed blockchain and chainstate sizes (Ava Chow)

Pull request description:

  Update chainparams and headerssync params per the release process.

  Also added new assumeutxo snapshots for each network. I've uploaded snapshots to https://achow101.com/files/utxo-snapshots/

ACKs for top commit:
  Sjors:
    ACK 44538f8ada
  fjahr:
    ACK 44538f8ada
  janb84:
    ACK 44538f8ada
  sipa:
    ACK 44538f8ada. I re-did all the mainnet parameters, but did not look closely at the other networks.
  jaonoctus:
    ACK 44538f8ada

Tree-SHA512: f9b6ccc967c5ef58f734245df459c3136491e9b6a0f6e36f4272bc0787e7b59eabe47a8c8b19a90267eca4a0b5851dfbf45153f96eac599c417f148b3cf264cf
2026-03-08 14:41:07 +00:00
merge-script
9833ef5f86 Merge bitcoin/bitcoin#34702: doc: Fix fee field in getblock RPC result
f580cc7e9f doc: Fix `fee` field in `getblock` RPC result (nervana21)

Pull request description:

  The `fee` field in the `getblock` RPC result (verbosity 2 and 3) may be omitted when block undo data is not available. Marking it optional in the `RPCResult` aligns the documented schema with the runtime behavior.

ACKs for top commit:
  mercie-ux:
    ACK  f580cc7e9f
  satsfy:
    ACK f580cc7e9f
  instagibbs:
    ACK f580cc7e9f
  w0xlt:
    ACK f580cc7e9f
  luke-jr:
    ACK f580cc7e9f

Tree-SHA512: e3b44a48e17e21b906967aef124688a34aea2c6af3b6df3c47693fd3002d33e824f764c0060a7ab07751b98567c29eb16f3b3c07bf2999db080ff7adfd087dfd
2026-03-08 14:34:37 +00:00
merge-script
f2f0a0ca4c Merge bitcoin/bitcoin#34700: script: Fix undefined behavior in Clone() -- std::transform writes past end of empty vector
44feab23a7 script: Fix undefined behavior in Clone() -- std::transform writes past end of empty vector (Weixie Cui)

Pull request description:

  # Motivation
  This patch fixes undefined behavior in Clone() in src/script/descriptor.cpp.
  When std::transform is used with providers.begin() or subdescs.begin() as the output iterator, the vectors have been reserve()d but have size 0. Writing through begin() in that case writes past the logical end of the vector, which is undefined behavior.

ACKs for top commit:
  maflcko:
    lgtm ACK 44feab23a7
  rkrux:
    ACK 44feab23a7 because it gets rid of the possible undefined behaviour.
  frankomosh:
    Code Review ACK 44feab23a7. Fix seems minimal and correct.

Tree-SHA512: 8af3b6d97c139b32bd47d4c452b6b16befdaa7028a7bc1b6de0ab1f0a8cb35eb068710316a2c07fa60856e17e25307931aa3125b4f41d0fe7726b435483a52db
2026-03-08 14:23:49 +00:00
Ava Chow
48b952cbb6 build: bump to 31.99 2026-03-06 13:11:02 -08:00
Ava Chow
1b3d58f128 docs Remove 31.0 release notes fragments 2026-03-06 13:10:57 -08:00
Ava Chow
b7cf2f87d0 docs: Update bips.md
Add 327, 328, 373, and 390
2026-03-06 13:10:30 -08:00
Ava Chow
c7a3ea2483 Merge bitcoin/bitcoin#34692: Bump dbcache to 1 GiB
4ae9a10ada doc: add release notes for dbcache bump (Andrew Toth)
c510d126ef doc: update dbcache default in reduce-memory.md (Andrew Toth)
027cac8527 qt: show GetDefaultDBCache() in settings (Andrew Toth)
5b34f25184 dbcache: bump default from 450MB -> 1024MB if enough memory (Andrew Toth)

Pull request description:

  Alternative to #34641

  This increases the default `dbcache` value from `450MiB` to `1024MiB` if:
  - `dbcache` is unset
  - The system is 64 bit
  - At least 4GiB of RAM is detected

  Otherwise fallback to previous `450MiB` default.

  This should be simple enough to get into v31. The bump to 1GiB shows significant performance increases in #34641. It also alleviates concerns of too high default for steady state, and of lowering the current dbcache for systems with less RAM.

  This change only changes bitcoind behavior, while kernel still defaults to 450 MiB.

ACKs for top commit:
  ajtowns:
    ACK 4ae9a10ada
  kevkevinpal:
    reACK [4ae9a10](4ae9a10ada)
  svanstaa:
    ACK [4ae9a10](4ae9a10ada)
  achow101:
    ACK 4ae9a10ada
  sipa:
    ACK 4ae9a10ada

Tree-SHA512: ee3acf1fb08523ac80e37ec8f0caca226ffde6667f3a75ae6f4f4f54bc905a883ebcf1bf0e8a8a15c7cfabff96c23225825b3fff4506b9ab9936bf2c0a2c2513
2026-03-06 12:07:41 -08:00
Ava Chow
8b70ed6996 Merge bitcoin/bitcoin#34521: validation: fix UB in LoadChainTip
20ae9b98ea Extend functional test for setBlockIndexCandidates UB (marcofleon)
854a6d5a9a validation: fix UB in LoadChainTip (marcofleon)
9249e6089e validation: remove LoadChainTip call from ActivateSnapshot (marcofleon)

Pull request description:

  Addresses https://github.com/bitcoin/bitcoin/issues/34503. See this issue for more details as well.

  Fixes a bug where, under certain conditions, `setBlockIndexCandidates` had blocks in it that were worse than the tip. The block index candidate set uses `nSequenceId` as a sort key, so modifying this field while blocks are in the set results in undefined behavior. This PR populates `setBlockIndexCandidates` after the `nSequenceId` modifications, avoiding the UB.

ACKs for top commit:
  achow101:
    ACK 20ae9b98ea
  sedited:
    Re-ACK 20ae9b98ea
  sipa:
    Code review ACK 20ae9b98ea

Tree-SHA512: 121c170bb70fb6365089d578db63c811e7926e129d7206e569947f7a1f6c5ddc8d5f4937b80f1ba1b7d7daa42789b143ca5b56f154b7ab968a1cd55f925f378d
2026-03-06 08:22:42 -08:00
merge-script
f6d3201e14 Merge bitcoin/bitcoin#33929: test: Remove system_tests/run_command runtime dependencies
97e7e79435 test: Enable `system_tests/run_command` "stdin" test on Windows (Hennadii Stepanov)
a4324ce095 test: Remove `system_tests/run_command` runtime dependencies (Hennadii Stepanov)

Pull request description:

  `system_tests` currently rely on `cat`, `echo`, `false` and `sh` being available in `PATH` at runtime.

  This PR:
  1. Removes these dependencies.
  2. Reduces the number of platform-specific code paths.

  The change is primarily motivated by my work on maintaining the [`bitcoin-core`](https://packages.guix.gnu.org/packages/bitcoin-core) package in Guix. It enables the removal of the existing `bash` and `coreutils` native inputs, which in turn makes it possible to drop the implicit dependency on `qtbase@5` (see https://codeberg.org/guix/guix/pulls/4386#issuecomment-8613333).

ACKs for top commit:
  maflcko:
    re-ACK 97e7e79435 👓
  janb84:
    ACK 97e7e79435
  sedited:
    ACK 97e7e79435

Tree-SHA512: 1375c676f85c75d571df1ddfc3a4405767dbf0ed7bfea2927c93ec01b29f9f7ae3383e546d2658f595e8ffafa9ab20bba6fcc628a9f5ebdb288bbef03b645fb6
2026-03-06 12:40:11 +00:00
merge-script
b5737b755d Merge bitcoin/bitcoin#34650: depends: Update Qt to version 6.8.3
0a6724aaae doc: Update Windows build notes (Hennadii Stepanov)
473e5f8efc qt: Add patch to fix SFINAE warnings in QAnyStringView with gcc16 (Hennadii Stepanov)
3cb4d6066b qt: add patches to fix SFINAE errors/warnings with gcc16 (Cory Fields)
d7e972a90d qt: add patch to fix build with gcc16 (Cory Fields)
19693a8c91 depends: Update Qt to 6.8.3 (Hennadii Stepanov)
c55584575a cmake: Fix `FindQt` module (Hennadii Stepanov)

Pull request description:

  This PR updates the `qt` package in depends to the latest open-source [6.8.3](https://www.qt.io/blog/qt-6.8.3-released) LTS release.

  The update includes numerous bugfixes, which allows us to drop `qtbase_plugins_windows11style.patch`.

  Additionally, it includes [patches](https://github.com/bitcoin/bitcoin/issues/34569#issuecomment-3892793262) for compatibility with GCC 16 (along with one extra patch), and incorporates a [commit](8f1b55d1d5) from https://github.com/bitcoin/bitcoin/pull/32709.

  Closes https://github.com/bitcoin/bitcoin/issues/34569.

ACKs for top commit:
  achow101:
    ACK 0a6724aaae
  sedited:
    ACK 0a6724aaae

Tree-SHA512: b66fe6f75bae00fb5c525c5fad56d39273f53f6bfd58206da8a55c6e41d14533137c72fb03e9537ba3a3d0b3463b6dcbef6a88ac2f4559fa6e9abf045fe1beaa
2026-03-06 11:55:46 +00:00
merge-script
c0802e20be Merge bitcoin/bitcoin#34734: test: Fix shutdown vptr race in BlockFilterIndexSync bench
fa79098ce2 test: Fix shutdown vptr race in BlockFilterIndexSync bench (MarcoFalke)

Pull request description:

  Currently, the `BlockFilterIndexSync` may fail tsan.

  Diff to reproduce:

  ```diff
  diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp
  index c7be6ab..4cb8435 100644
  --- a/src/validationinterface.cpp
  +++ b/src/validationinterface.cpp
  @@ -14,2 +14,3 @@
   #include <primitives/transaction.h>
  +#include <random.h>
   #include <util/check.h>
  @@ -156,2 +157,4 @@ void ValidationSignals::SyncWithValidationInterfaceQueue()

  +static FastRandomContext g_rnd{};
  +
   // Use a macro instead of a function for conditional logging to prevent
  @@ -166,2 +169,3 @@ void ValidationSignals::SyncWithValidationInterfaceQueue()
               LOG_EVENT(fmt, local_name, __VA_ARGS__);           \
  +            UninterruptibleSleep(1ms * g_rnd.randrange(95));   \
               event();                                           \
  ```

  and then running the tsan CI pod: `MAKEJOBS="-j$(nproc)" FILE_ENV="./ci/test/00_setup_env_native_tsan.sh" ./ci/test_run_all.sh`

  After about 3 runs, it will fail. It is also possible to run in a loop inside the pod: `while TSAN_OPTIONS="suppressions=$(pwd)/test/sanitizer_suppressions/tsan:halt_on_error=1:second_deadlock_stack=1" /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/bin/bench_bitcoin -filter=BlockFilterIndexSync -sanity-check ; do true ; done`

  The output will be:

  ```
  Running with -sanity-check option, output is being suppressed as benchmark results will be useless.
  Running with -sanity-check option, output is being suppressed as benchmark results will be useless.
  ==================
  WARNING: ThreadSanitizer: data race on vptr (ctor/dtor vs virtual call) (pid=100168)
    Write of size 8 at 0x7fffbe828aa8 by main thread:
      #0 BaseIndex::~BaseIndex() /ci_container_base/src/index/base.cpp:99:1 (bench_bitcoin+0x33c201) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #1 BlockFilterIndex::~BlockFilterIndex() /ci_container_base/src/index/blockfilterindex.h:40:7 (bench_bitcoin+0x266000) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #2 BlockFilterIndexSync(ankerl::nanobench::Bench&)::$_0::operator()() const /ci_container_base/src/bench/index_blockfilter.cpp:56:5 (bench_bitcoin+0x2659a1) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #3 ankerl::nanobench::Bench& ankerl::nanobench::Bench::run<BlockFilterIndexSync(ankerl::nanobench::Bench&)::$_0>(BlockFilterIndexSync(ankerl::nanobench::Bench&)::$_0&&) /ci_container_base/src/bench/nanobench.h:1221:13 (bench_bitcoin+0x2659a1)
      #4 BlockFilterIndexSync(ankerl::nanobench::Bench&) /ci_container_base/src/bench/index_blockfilter.cpp:46:33 (bench_bitcoin+0x26565a) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #5 std::__1::__invoke_result_impl<void, void (*&)(ankerl::nanobench::Bench&), ankerl::nanobench::Bench&>::type std::__1::__invoke[abi:dee230000]<void (*&)(ankerl::nanobench::Bench&), ankerl::nanobench::Bench&>(void (*&)(ankerl::nanobench::Bench&), ankerl::nanobench::Bench&) /cxx_build/include/c++/v1/__type_traits/invoke.h:90:27 (bench_bitcoin+0x21b394) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #6 void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:dee230000]<void (*&)(ankerl::nanobench::Bench&), ankerl::nanobench::Bench&>(void (*&)(ankerl::nanobench::Bench&), ankerl::nanobench::Bench&) /cxx_build/include/c++/v1/__type_traits/invoke.h:350:5 (bench_bitcoin+0x21b394)
      #7 void std::__1::__invoke_r[abi:dee230000]<void, void (*&)(ankerl::nanobench::Bench&), ankerl::nanobench::Bench&>(void (*&)(ankerl::nanobench::Bench&), ankerl::nanobench::Bench&) /cxx_build/include/c++/v1/__type_traits/invoke.h:356:10 (bench_bitcoin+0x21b394)
      #8 std::__1::__function::__func<void (*)(ankerl::nanobench::Bench&), void (ankerl::nanobench::Bench&)>::operator()(ankerl::nanobench::Bench&) /cxx_build/include/c++/v1/__functional/function.h:172:12 (bench_bitcoin+0x21b394)
      #9 std::__1::__function::__value_func<void (ankerl::nanobench::Bench&)>::operator()[abi:dee230000](ankerl::nanobench::Bench&) const /cxx_build/include/c++/v1/__functional/function.h:273:12 (bench_bitcoin+0x1cc77d) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #10 std::__1::function<void (ankerl::nanobench::Bench&)>::operator()(ankerl::nanobench::Bench&) const /cxx_build/include/c++/v1/__functional/function.h:754:10 (bench_bitcoin+0x1cc77d)
      #11 benchmark::BenchRunner::RunAll(benchmark::Args const&) /ci_container_base/src/bench/bench.cpp:121:13 (bench_bitcoin+0x1cc77d)
      #12 main /ci_container_base/src/bench/bench_bitcoin.cpp:135:9 (bench_bitcoin+0x1c5a76) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)

    Previous read of size 8 at 0x7fffbe828aa8 by thread T1:
      #0 ValidationSignals::MempoolTransactionsRemovedForBlock(std::__1::vector<RemovedMempoolTransactionInfo, std::__1::allocator<RemovedMempoolTransactionInfo>> const&, unsigned int)::$_1::operator()() const::'lambda'(CValidationInterface&)::operator()(CValidationInterface&) const /ci_container_base/src/validationinterface.cpp:231:79 (bench_bitcoin+0x885feb) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #1 void ValidationSignalsImpl::Iterate<ValidationSignals::MempoolTransactionsRemovedForBlock(std::__1::vector<RemovedMempoolTransactionInfo, std::__1::allocator<RemovedMempoolTransactionInfo>> const&, unsigned int)::$_1::operator()() const::'lambda'(CValidationInterface&)>(ValidationSignals::MempoolTransactionsRemovedForBlock(std::__1::vector<RemovedMempoolTransactionInfo, std::__1::allocator<RemovedMempoolTransactionInfo>> const&, unsigned int)::$_1::operator()() const::'lambda'(CValidationInterface&)&&) /ci_container_base/src/validationinterface.cpp:91:17 (bench_bitcoin+0x885feb)
      #2 ValidationSignals::MempoolTransactionsRemovedForBlock(std::__1::vector<RemovedMempoolTransactionInfo, std::__1::allocator<RemovedMempoolTransactionInfo>> const&, unsigned int)::$_1::operator()() const /ci_container_base/src/validationinterface.cpp:231:22 (bench_bitcoin+0x885feb)
      #3 ValidationSignals::MempoolTransactionsRemovedForBlock(std::__1::vector<RemovedMempoolTransactionInfo, std::__1::allocator<RemovedMempoolTransactionInfo>> const&, unsigned int)::$_0::operator()() const /ci_container_base/src/validationinterface.cpp:233:27 (bench_bitcoin+0x885feb)
      #4 std::__1::__invoke_result_impl<void, ValidationSignals::MempoolTransactionsRemovedForBlock(std::__1::vector<RemovedMempoolTransactionInfo, std::__1::allocator<RemovedMempoolTransactionInfo>> const&, unsigned int)::$_0&>::type std::__1::__invoke[abi:dee230000]<ValidationSignals::MempoolTransactionsRemovedForBlock(std::__1::vector<RemovedMempoolTransactionInfo, std::__1::allocator<RemovedMempoolTransactionInfo>> const&, unsigned int)::$_0&>(ValidationSignals::MempoolTransactionsRemovedForBlock(std::__1::vector<RemovedMempoolTransactionInfo, std::__1::allocator<RemovedMempoolTransactionInfo>> const&, unsigned int)::$_0&) /cxx_build/include/c++/v1/__type_traits/invoke.h:90:27 (bench_bitcoin+0x885feb)
      #5 void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:dee230000]<ValidationSignals::MempoolTransactionsRemovedForBlock(std::__1::vector<RemovedMempoolTransactionInfo, std::__1::allocator<RemovedMempoolTransactionInfo>> const&, unsigned int)::$_0&>(ValidationSignals::MempoolTransactionsRemovedForBlock(std::__1::vector<RemovedMempoolTransactionInfo, std::__1::allocator<RemovedMempoolTransactionInfo>> const&, unsigned int)::$_0&) /cxx_build/include/c++/v1/__type_traits/invoke.h:350:5 (bench_bitcoin+0x885feb)
      #6 void std::__1::__invoke_r[abi:dee230000]<void, ValidationSignals::MempoolTransactionsRemovedForBlock(std::__1::vector<RemovedMempoolTransactionInfo, std::__1::allocator<RemovedMempoolTransactionInfo>> const&, unsigned int)::$_0&>(ValidationSignals::MempoolTransactionsRemovedForBlock(std::__1::vector<RemovedMempoolTransactionInfo, std::__1::allocator<RemovedMempoolTransactionInfo>> const&, unsigned int)::$_0&) /cxx_build/include/c++/v1/__type_traits/invoke.h:356:10 (bench_bitcoin+0x885feb)
      #7 std::__1::__function::__func<ValidationSignals::MempoolTransactionsRemovedForBlock(std::__1::vector<RemovedMempoolTransactionInfo, std::__1::allocator<RemovedMempoolTransactionInfo>> const&, unsigned int)::$_0, void ()>::operator()() /cxx_build/include/c++/v1/__functional/function.h:172:12 (bench_bitcoin+0x885feb)
      #8 std::__1::__function::__value_func<void ()>::operator()[abi:dee230000]() const /cxx_build/include/c++/v1/__functional/function.h:273:12 (bench_bitcoin+0xddec83) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #9 std::__1::function<void ()>::operator()() const /cxx_build/include/c++/v1/__functional/function.h:754:10 (bench_bitcoin+0xddec83)
      #10 SerialTaskRunner::ProcessQueue() /ci_container_base/src/scheduler.cpp:173:5 (bench_bitcoin+0xddec83)
      #11 SerialTaskRunner::MaybeScheduleProcessQueue()::$_0::operator()() const /ci_container_base/src/scheduler.cpp:142:41 (bench_bitcoin+0xde08e5) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #12 std::__1::__invoke_result_impl<void, SerialTaskRunner::MaybeScheduleProcessQueue()::$_0&>::type std::__1::__invoke[abi:dee230000]<SerialTaskRunner::MaybeScheduleProcessQueue()::$_0&>(SerialTaskRunner::MaybeScheduleProcessQueue()::$_0&) /cxx_build/include/c++/v1/__type_traits/invoke.h:90:27 (bench_bitcoin+0xde08e5)
      #13 void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:dee230000]<SerialTaskRunner::MaybeScheduleProcessQueue()::$_0&>(SerialTaskRunner::MaybeScheduleProcessQueue()::$_0&) /cxx_build/include/c++/v1/__type_traits/invoke.h:350:5 (bench_bitcoin+0xde08e5)
      #14 void std::__1::__invoke_r[abi:dee230000]<void, SerialTaskRunner::MaybeScheduleProcessQueue()::$_0&>(SerialTaskRunner::MaybeScheduleProcessQueue()::$_0&) /cxx_build/include/c++/v1/__type_traits/invoke.h:356:10 (bench_bitcoin+0xde08e5)
      #15 std::__1::__function::__func<SerialTaskRunner::MaybeScheduleProcessQueue()::$_0, void ()>::operator()() /cxx_build/include/c++/v1/__functional/function.h:172:12 (bench_bitcoin+0xde08e5)
      #16 std::__1::__function::__value_func<void ()>::operator()[abi:dee230000]() const /cxx_build/include/c++/v1/__functional/function.h:273:12 (bench_bitcoin+0xddda36) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #17 std::__1::function<void ()>::operator()() const /cxx_build/include/c++/v1/__functional/function.h:754:10 (bench_bitcoin+0xddda36)
      #18 CScheduler::serviceQueue() /ci_container_base/src/scheduler.cpp:60:17 (bench_bitcoin+0xddda36)
      #19 ChainTestingSetup::ChainTestingSetup(ChainType, TestOpts)::$_2::operator()() const /ci_container_base/src/test/util/setup_common.cpp:250:114 (bench_bitcoin+0x2dcaa8) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #20 std::__1::__invoke_result_impl<void, ChainTestingSetup::ChainTestingSetup(ChainType, TestOpts)::$_2&>::type std::__1::__invoke[abi:dee230000]<ChainTestingSetup::ChainTestingSetup(ChainType, TestOpts)::$_2&>(ChainTestingSetup::ChainTestingSetup(ChainType, TestOpts)::$_2&) /cxx_build/include/c++/v1/__type_traits/invoke.h:90:27 (bench_bitcoin+0x2dcaa8)
      #21 void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:dee230000]<ChainTestingSetup::ChainTestingSetup(ChainType, TestOpts)::$_2&>(ChainTestingSetup::ChainTestingSetup(ChainType, TestOpts)::$_2&) /cxx_build/include/c++/v1/__type_traits/invoke.h:350:5 (bench_bitcoin+0x2dcaa8)
      #22 void std::__1::__invoke_r[abi:dee230000]<void, ChainTestingSetup::ChainTestingSetup(ChainType, TestOpts)::$_2&>(ChainTestingSetup::ChainTestingSetup(ChainType, TestOpts)::$_2&) /cxx_build/include/c++/v1/__type_traits/invoke.h:356:10 (bench_bitcoin+0x2dcaa8)
      #23 std::__1::__function::__func<ChainTestingSetup::ChainTestingSetup(ChainType, TestOpts)::$_2, void ()>::operator()() /cxx_build/include/c++/v1/__functional/function.h:172:12 (bench_bitcoin+0x2dcaa8)
      #24 std::__1::__function::__value_func<void ()>::operator()[abi:dee230000]() const /cxx_build/include/c++/v1/__functional/function.h:273:12 (bench_bitcoin+0xef2b0b) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #25 std::__1::function<void ()>::operator()() const /cxx_build/include/c++/v1/__functional/function.h:754:10 (bench_bitcoin+0xef2b0b)
      #26 util::TraceThread(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>) /ci_container_base/src/util/thread.cpp:21:9 (bench_bitcoin+0xef2b0b)
      #27 std::__1::__invoke_result_impl<void, void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), char const*, ChainTestingSetup::ChainTestingSetup(ChainType, TestOpts)::$_2>::type std::__1::__invoke[abi:dee230000]<void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), char const*, ChainTestingSetup::ChainTestingSetup(ChainType, TestOpts)::$_2>(void (*&&)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), char const*&&, ChainTestingSetup::ChainTestingSetup(ChainType, TestOpts)::$_2&&) /cxx_build/include/c++/v1/__type_traits/invoke.h:90:27 (bench_bitcoin+0x2dc652) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #28 void std::__1::__thread_execute[abi:dee230000]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), char const*, ChainTestingSetup::ChainTestingSetup(ChainType, TestOpts)::$_2, 0ul, 1ul, 2ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), char const*, ChainTestingSetup::ChainTestingSetup(ChainType, TestOpts)::$_2>&, std::__1::__integer_sequence<unsigned long, 0ul, 1ul, 2ul>) /cxx_build/include/c++/v1/__thread/thread.h:161:3 (bench_bitcoin+0x2dc652)
      #29 void* std::__1::__thread_proxy[abi:dee230000]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), char const*, ChainTestingSetup::ChainTestingSetup(ChainType, TestOpts)::$_2>>(void*) /cxx_build/include/c++/v1/__thread/thread.h:169:3 (bench_bitcoin+0x2dc652)

    Location is stack of main thread.

    Thread T1 'b-scheduler' (tid=100170, running) created by main thread at:
      #0 pthread_create <null> (bench_bitcoin+0x13dc4e) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #1 std::__1::__libcpp_thread_create[abi:dee230000](unsigned long*, void* (*)(void*), void*) /cxx_build/include/c++/v1/__thread/support/pthread.h:182:10 (bench_bitcoin+0x2d3531) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #2 std::__1::thread::thread[abi:dee230000]<void (&)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), char const (&) [10], ChainTestingSetup::ChainTestingSetup(ChainType, TestOpts)::$_2, 0>(void (&)(std::__1::basic_string_view<char, std::__1::char_traits<char>>, std::__1::function<void ()>), char const (&) [10], ChainTestingSetup::ChainTestingSetup(ChainType, TestOpts)::$_2&&) /cxx_build/include/c++/v1/__thread/thread.h:218:16 (bench_bitcoin+0x2d3531)
      #3 ChainTestingSetup::ChainTestingSetup(ChainType, TestOpts) /ci_container_base/src/test/util/setup_common.cpp:250:46 (bench_bitcoin+0x2d3531)
      #4 TestingSetup::TestingSetup(ChainType, TestOpts) /ci_container_base/src/test/util/setup_common.cpp:344:7 (bench_bitcoin+0x2d4c1f) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #5 TestChain100Setup::TestChain100Setup(ChainType, TestOpts) /ci_container_base/src/test/util/setup_common.cpp:380:7 (bench_bitcoin+0x2d560a) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #6 std::__1::unique_ptr<TestChain100Setup, std::__1::default_delete<TestChain100Setup>> std::__1::make_unique[abi:dee230000]<TestChain100Setup, ChainType const&, TestOpts&, 0>(ChainType const&, TestOpts&) /cxx_build/include/c++/v1/__memory/unique_ptr.h:756:30 (bench_bitcoin+0x224eed) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #7 std::__1::unique_ptr<TestChain100Setup, std::__1::default_delete<TestChain100Setup>> MakeNoLogFileContext<TestChain100Setup>(ChainType, TestOpts) /ci_container_base/src/test/util/setup_common.h:259:12 (bench_bitcoin+0x224ce2) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #8 BlockFilterIndexSync(ankerl::nanobench::Bench&) /ci_container_base/src/bench/index_blockfilter.cpp:33:29 (bench_bitcoin+0x26530f) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #9 std::__1::__invoke_result_impl<void, void (*&)(ankerl::nanobench::Bench&), ankerl::nanobench::Bench&>::type std::__1::__invoke[abi:dee230000]<void (*&)(ankerl::nanobench::Bench&), ankerl::nanobench::Bench&>(void (*&)(ankerl::nanobench::Bench&), ankerl::nanobench::Bench&) /cxx_build/include/c++/v1/__type_traits/invoke.h:90:27 (bench_bitcoin+0x21b394) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #10 void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:dee230000]<void (*&)(ankerl::nanobench::Bench&), ankerl::nanobench::Bench&>(void (*&)(ankerl::nanobench::Bench&), ankerl::nanobench::Bench&) /cxx_build/include/c++/v1/__type_traits/invoke.h:350:5 (bench_bitcoin+0x21b394)
      #11 void std::__1::__invoke_r[abi:dee230000]<void, void (*&)(ankerl::nanobench::Bench&), ankerl::nanobench::Bench&>(void (*&)(ankerl::nanobench::Bench&), ankerl::nanobench::Bench&) /cxx_build/include/c++/v1/__type_traits/invoke.h:356:10 (bench_bitcoin+0x21b394)
      #12 std::__1::__function::__func<void (*)(ankerl::nanobench::Bench&), void (ankerl::nanobench::Bench&)>::operator()(ankerl::nanobench::Bench&) /cxx_build/include/c++/v1/__functional/function.h:172:12 (bench_bitcoin+0x21b394)
      #13 std::__1::__function::__value_func<void (ankerl::nanobench::Bench&)>::operator()[abi:dee230000](ankerl::nanobench::Bench&) const /cxx_build/include/c++/v1/__functional/function.h:273:12 (bench_bitcoin+0x1cc77d) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)
      #14 std::__1::function<void (ankerl::nanobench::Bench&)>::operator()(ankerl::nanobench::Bench&) const /cxx_build/include/c++/v1/__functional/function.h:754:10 (bench_bitcoin+0x1cc77d)
      #15 benchmark::BenchRunner::RunAll(benchmark::Args const&) /ci_container_base/src/bench/bench.cpp:121:13 (bench_bitcoin+0x1cc77d)
      #16 main /ci_container_base/src/bench/bench_bitcoin.cpp:135:9 (bench_bitcoin+0x1c5a76) (BuildId: d6021b6fabe0b72ef5741922cc8e7f71ce6eac0c)

  SUMMARY: ThreadSanitizer: data race on vptr (ctor/dtor vs virtual call) /ci_container_base/src/index/base.cpp:99:1 in BaseIndex::~BaseIndex()
  ==================
  ```

  Fix this by following the shutdown sequence of first stopping the index and then desctructing it, instead of doing both at the same time (stopping inside the desctructor).

  Also, apply the comment `// Shutdown sequence (c.f. Shutdown() in init.cpp)` consistently, while touching this topic of the codebase.

  Also, remove the unused `SyncWithValidationInterfaceQueue`, which is redundant to the prior `BlockUntilSyncedToCurrentChain`. See also the last comment in the pull request that introduced this: https://github.com/bitcoin/bitcoin/pull/26188#issuecomment-1274258156

  > I think anything is fine here. Either keep both or delete both.

  Given that devs did not apply the redundant sync in two new cases, it seems fine to remove it.

ACKs for top commit:
  achow101:
    ACK fa79098ce2
  sedited:
    ACK fa79098ce2

Tree-SHA512: 3f46df283fa5f639e942b74459760104b79f11930b4249f73405f052131f69d01e91a8a4df496ca4f380fd2e0cb8d8c34f70f3e2b84730f3b8f445a98e468d1d
2026-03-06 10:54:06 +00:00
merge-script
2ac4f6e019 Merge bitcoin/bitcoin#34612: leveldb: remove unused files
3feabb203a leveldb: remove unused files (fanquake)

Pull request description:

  Remove `db/c.cc`, `dumpfile.cc` & `histogram.cc`.

ACKs for top commit:
  willcl-ark:
    ACK 3feabb203a
  sedited:
    ACK 3feabb203a

Tree-SHA512: d00f9d86adaea049f7e4fdf1a79814d6dd2ef1052586394608d87c0baf4cfba39aec0b889faf7a375a805be567d6b459270f753ac7e85da08879cb6f75086624
2026-03-06 10:37:21 +00:00
merge-script
d97df29d5d Merge bitcoin/bitcoin#34747: test: Sync mempools and wait for txospender index to be synced in rpc_gettxspendingprevout
cbdb891de2 test: Wait for txospender index to be synced in rpc_gettxspendingprevout (Ava Chow)
2db5c049bb test: Sync mempools after tx creation in rpc_gettxspendingprevout (Ava Chow)

Pull request description:

  On slower runs, the txospender index may not be synced yet when the tests of its behavior begin, causing intermittent failures. Wait for them to be synced before starting the tests.

  The tests also query mempool txs from other nodes, make sure mempools are synced before doing so.

  The first commit with the following diff reproduces #34735:

  ```
  diff --git a/src/index/txospenderindex.cpp b/src/index/txospenderindex.cpp
  index d451bb1e0a4..e786f05a98c 100644
  --- a/src/index/txospenderindex.cpp
  +++ b/src/index/txospenderindex.cpp
  @@ -129,6 +129,7 @@ static std::vector<std::pair<COutPoint, CDiskTxPos>> BuildSpenderPositions(const

   bool TxoSpenderIndex::CustomAppend(const interfaces::BlockInfo& block)
   {
  +    UninterruptibleSleep(100ms);
       WriteSpenderInfos(BuildSpenderPositions(block));
       return true;
   }
  ```

  Fixes #34735

ACKs for top commit:
  furszy:
    ACK cbdb891de2
  andrewtoth:
    ACK cbdb891de2
  sedited:
    ACK cbdb891de2
  rkrux:
    crACK cbdb891de2

Tree-SHA512: ba1ab6216ac3b647a5f9e20f4899e51e643bf20829e698aa63c127c88ed4e33afa222bebeae1210fc869c46288e99c0b344330197913e244ffe1a6aca943568d
2026-03-06 10:30:45 +00:00
merge-script
c12be53f85 Merge bitcoin/bitcoin#34635: rpc, index: txospenderindex improve formatting, docs and test coverage
15c4889497 index: document TxoSpenderIndex::FindSpender (furszy)
f8b9595aaa test: Add missing txospenderindex coverage in feature_init (Fabian Jahr)
a1074d852a index, rpc, test: Misc formatting fixes (Fabian Jahr)

Pull request description:

  This addresses my own comments in the last review of #24539: https://github.com/bitcoin/bitcoin/pull/24539#pullrequestreview-3829110465

  The first commit fixes three small formatting errors.

  The second commit adds some missing coverage in `feature_init` and refactors the code a bit as well so these misses don't happen so easily in the future.

  The third commit is by furzy:

  > TxoSpenderIndex::FindSpender returns an Expected<optional<TxoSpender>> but
  the two levels of the return type were undocumented, making it unclear what a returned
  nullopt means. So added doc clarifying each return case.

ACKs for top commit:
  furszy:
    ACK 15c4889497
  sedited:
    ACK 15c4889497
  rkrux:
    crACK 15c4889497

Tree-SHA512: 2e0f060a54b558d2967ebae0835cf81bd86c2d8d983d670a48d1bee7d347f186623e75db7ae311ca1566807f715c1b3fa67cf734c9467d35e13b84d082f28253
2026-03-06 10:08:50 +00:00
Fabian Jahr
8bc62ce173 doc: Update asmap-data repository rule for file inclusion 2026-03-06 10:30:32 +01:00
furszy
15c4889497 index: document TxoSpenderIndex::FindSpender
Hard to know what a returned std::Expected(std::nullopt) mean
if it is not documented anywhere.
2026-03-06 01:05:52 +01:00
Fabian Jahr
f8b9595aaa test: Add missing txospenderindex coverage in feature_init
Also refactors the list of all index args into a constant that can be reused across tests.

Co-authored-by: sedited <seb.kung@gmail.com>
2026-03-06 00:48:34 +01:00
Ava Chow
cbdb891de2 test: Wait for txospender index to be synced in rpc_gettxspendingprevout
Each node's txospender index needs to catch up with the existing chain
before the tests will work.
2026-03-05 11:19:58 -08:00
Ava Chow
2db5c049bb test: Sync mempools after tx creation in rpc_gettxspendingprevout
The test will query information from the other nodes about mempool txs,
ensure that the txs are in their mempools beforehand.
2026-03-05 11:19:13 -08:00