44246 Commits

Author SHA1 Message Date
merge-script
dfb7d58108
Merge bitcoin/bitcoin#31897: mining: drop unused -nFees and sigops from CBlockTemplate
226d81f8b708ea1c3a39ec58446e291fe7440fdd mining: drop unused -nFees and sigops from CBlockTemplate (Sjors Provoost)
53ad845fb9ebb4da39f7d55415d69647600478e5 test: check fees and sigops in getblocktemplate (Sjors Provoost)

Pull request description:

  For the coinbase `vTxFees` used a dummy value of -nFees.

  Similarly the first `vTxSigOpsCost` entry was calculated from
  the dummy coinbase transaction.

  This was introduced in #2115, but the values were never returned by the RPC or used in a test.

  Drop 'm and add code comments to prevent confusion.

  This PR also adds test coverage for the `fees` and `sigops` fields in `getblocktemplate`, so it closes #32053.

ACKs for top commit:
  ismaelsadeeq:
    re-ACK 226d81f8b708ea1c3a39ec58446e291fe7440fdd
  ryanofsky:
    Code review ACK 226d81f8b708ea1c3a39ec58446e291fe7440fdd. New test was added since last review, which seems very cleanly written and fixes some missing coverage.
  glozow:
    ACK 226d81f8b708ea1c3a39ec58446e291fe7440fdd

Tree-SHA512: 79c534e6bc4810d29114b04dd6db798877732cb473e773bf3cc28f83d14ee3982392587bd0baa39857bd53a79eae3b730d7a7029b08a9b6c3b5c51f86657ca5d
2025-03-25 08:41:59 -04:00
Ryan Ofsky
1d281daf86
Merge bitcoin/bitcoin#32095: doc: clarify that testnet min-difficulty is not optional
288481aabd77b90876489e39403b6eab9d4ae74d doc: clarify that testnet min-difficulty is not optional (Sjors Provoost)

Pull request description:

  When 20 minutes have gone by on testnet3 or testnet4, the next block `MUST` have difficulty 1. I've seen people be confused about this several times now in recent months. It doesn't help that the code comment is wrong. So fixing that.

  The reason is that `nBits` must match exactly:

  e568c1dd13/src/validation.cpp (L4212-L4215)

ACKs for top commit:
  fjahr:
    ACK 288481aabd77b90876489e39403b6eab9d4ae74d
  kevkevinpal:
    ACK [288481a](288481aabd)

Tree-SHA512: 17d426301f386fa5810cceedfdb20a3523ab3ac2f17257ca7a525edd869fa409b150eff4cc258b27adecd0ded1c18ff48a9998fc9caed2faa461e410d4c5a884
2025-03-24 17:40:03 -04:00
Ryan Ofsky
a0d737cd7a
Merge bitcoin/bitcoin#32073: net: Block v2->v1 transport downgrade if !fNetworkActive
6869fb417096b43ba7f74bf767ca3e41b9894899 net: Block v2->v1 transport downgrade if !CConnman::fNetworkActive (Hodlinator)

Pull request description:

  We might have just set `CNode::fDisconnect` in the first loop because of `!CConnman::fNetworkActive`.

  Attempting to reconnect using v1 transport just because `fNetworkActive` was set to `false` at the "right" stage in the v2 handshake does not make sense.

  Issue [discovered](https://github.com/bitcoin/bitcoin/pull/31633#discussion_r1930908304) by davidgumberg.

ACKs for top commit:
  davidgumberg:
    Tested and Reviewed ACK 6869fb417096b43ba7f7
  mabu44:
    ACK 6869fb417096b43ba7f74bf767ca3e41b9894899
  stratospher:
    ACK 6869fb4. I've reviewed the code but don't have strong preference for this branch vs master since only functional change is just a single log not being printed in a low probability scenario (we happen to be attempting v2 connection when P2P network activity is being turned off).
  vasild:
    ACK 6869fb417096b43ba7f74bf767ca3e41b9894899

Tree-SHA512: 54f596e54c5a6546f2c3fec2609aa8d10dec3adcf1001ca16666d8b374b8d79d64397f46c90d9b3915b4e91a5041b6ced3044fd2a5b4fb4aa7282eb51f61296a
2025-03-24 16:54:40 -04:00
Ryan Ofsky
b3162d10ea
Merge bitcoin/bitcoin#31656: test: Add expected result assertions
a015b7e13daacdfb6db0eada50563dec70c5afb2 test: Add expected result assertions (yancy)

Pull request description:

  ~This is a trivial addition to the test suit, however it shouldn't be required to add debug statements and manually run the tests if someone needs to know the results of this test.~

  Add an assertion for the values returned. The goal of the test is to show that a minimal weight selection of UTXOs is returned by coin-grinder. Since there are multiple possible solutions, the added assertion shows that coin-grinder finds the solution with the lowest weight.  Without this assertion, it's ambiguous whether or not coin-grinder is returning the solution with the lowest weight.

  Remove the check that a result is returned since the expected result assertion implies a result.

ACKs for top commit:
  janb84:
    re ACK [a015b7e](a015b7e13d)
  murchandamus:
    ACK a015b7e13daacdfb6db0eada50563dec70c5afb2

Tree-SHA512: ee3c2688b4a4a07ab209f7655c3956e62a1084419df5e87c27d751a38ff64d4c3457df2317f8077149a6947cdb05b249975de2b8f0e18ca8b17b41f4735fb1c6
2025-03-24 16:07:30 -04:00
Ryan Ofsky
5f3848c63b
Merge bitcoin/bitcoin#31278: wallet, rpc: deprecate settxfee and paytxfee
2f2ab47bf74f4da37aad75a186cb0bb16e8af579 Release notes (Pol Espinasa)
bf194c920cf768d1339d41aef1441a78e2f5fcbe wallet, rpc: deprecate settxfee and paytxfee (Pol Espinasa)

Pull request description:

  **Summary**

  This PR deprecates the settxfee RPC and paytxfee setting, marking it for removal in Bitcoin Core 31.0.

  **Motivation**

  The PR was initially motivated by https://github.com/bitcoin/bitcoin/issues/31088. The intention was to create a new function `settxfeerate` to allow users to set a static fee rate in `sat/vB` instead of `btc/kvB`.

  The `settxfee` RPC allows users to set a static fee rate for all transactions created by the wallet. However, in a dynamic fee environment, this can lead to poor fee choices, either overpaying when the mempool is empty or underpaying when congestion is high. The preferred approach is to rely on fee estimation, which is designed to adapt to network conditions, and is the one by default. Same argument apply for `paytxfee` setting.

  During discussion the consensus was that static fee settings are a footgun and that users should instead specify the fee rate per transaction if they don't want to rely on the fee estimation. Given this, rather than introducing a `settxfeerate` alternative, this PR goes towards removing `settxfee` and `paytxfee` entirely.

  **Key Changes**

  `settxfee` and `paytxfee` is now deprecated and will be removed in Bitcoin Core 31.0.
  Users should rely on fee estimation or explicitly specify a fee rate when constructing transactions.

  **Impact on Users**

  If users currently use settxfee or paytxfee, they should transition to specifying fees per transaction.
  No immediate breakage in 30.0 (must use `-deprecatedrpc=settxfee`), but `settxfee` and `paytxfee` will be removed in 31.0.

  **Alternative Approaches Considered**

  A settxfeerate alternative (using sat/vB) was initially proposed but ultimately rejected in favor of deprecating static fee setting entirely.

  **Notes for removal**
  - When removing paytxfee we should also update txconfirmtarget startup option help text.
  - Get back the comment from `rpc_deprecated.py` test. [+info](https://github.com/bitcoin/bitcoin/pull/31278#discussion_r1998876768)

ACKs for top commit:
  fjahr:
    re-ACK 2f2ab47bf74f4da37aad75a186cb0bb16e8af579
  ismaelsadeeq:
    re-ACK 2f2ab47bf74f4da37aad75a186cb0bb16e8af579
  rkrux:
    Concept and utACK 2f2ab47bf74f4da37aad75a186cb0bb16e8af579

Tree-SHA512: 0272812cbe5a519737c5d0683acc2072e67559792b4a6472bca8b23426e5ce9e88a3a1eba987feda70a082b8b474b3126893848628d7bf11e1520357b18c8d3e
2025-03-24 13:40:31 -04:00
Ryan Ofsky
770d39a376
Merge bitcoin/bitcoin#31887: CLI cleanups
d423fd9ec83ae323ac29bdc1b677ed8260bd59c4 cli, bugfix: for -getinfo, replace IsArgSet() with GetBoolArg() (Jon Atack)
e99e41b30704f0067e064f92e7f582361f49676c cli, refactor: simplify public-only classes with structs (Jon Atack)
fdbfd250fbf27137f23b1064ae2fcd9bf3c59937 cli, refactor: deduplicate NetworkStringToId() (Jon Atack)
be82139b2a1e5bcd7c47391672d38fa5aa05bc0b cli, refactor: simplify DetailsRequested() (Jon Atack)

Pull request description:

  These have been accumulating over the past few years.

  Each is described in its commit message.

ACKs for top commit:
  pablomartin4btc:
    re-ACK d423fd9ec83ae323ac29bdc1b677ed8260bd59c4
  hodlinator:
    Code review ACK d423fd9ec83ae323ac29bdc1b677ed8260bd59c4
  l0rinc:
    ACK d423fd9ec83ae323ac29bdc1b677ed8260bd59c4
  ryanofsky:
    Code review ACK d423fd9ec83ae323ac29bdc1b677ed8260bd59c4, just running clang-format and updating commit messages since last review

Tree-SHA512: a8e5f7827cef308186d5a7c3a627d2cd8f57437f4465d181986e5d3274ff0e2b9faac252dd55d9257d66a7aa99fca62b3000cdc0988d23385df20ff1f870a046
2025-03-23 12:41:08 -04:00
Ryan Ofsky
a203928693
Merge bitcoin/bitcoin#30538: Doc: add a comment referencing past vulnerability next to where it was fixed
eb0724f0dee307d6d14e47ebd3077b7ffd50f507 doc: banman: reference past vuln due to unbounded banlist (Antoine Poinsot)
ad616b6c013e69221f61b695c4ae09a3471c3f7c doc: net: mention past vulnerability as rationale to limit incoming message size (Antoine Poinsot)
4489117c3f6720ef92a328d3462cec8c0f466ae5 doc: txrequest: point to past censorship vulnerability in tx re-request handling (Antoine Poinsot)
68ac9542c451c9088c59a3ec6124d87cfd3382a3 doc: net_proc: reference past DoS vulnerability in orphan processing (Antoine Poinsot)
c02d9f6dd53989f41375f13a2d39270fa5d58a04 doc: net_proc: reference past defect regarding invalid GETDATA types (Antoine Poinsot)
5e3d9f21df21a822dc210d73a000faba084e6067 doc: validation: add a reference to historical header spam vulnerability (Antoine Poinsot)

Pull request description:

  It is useful when reading code to have context about why it is written or behaves the way it does. Some instances in this PR may seem obvious but i think nonetheless offer important context to anyone willing to change (or review a change to) this code.

ACKs for top commit:
  ryanofsky:
    Code review ACK eb0724f0dee307d6d14e47ebd3077b7ffd50f507. No changes since last review other than rebase

Tree-SHA512: 271902f45b8130d44153d793bc1096cd22b6ce05494e67c665a5bc45754e3fc72573d303ec8fc7db4098d473760282ddbf0c1cf316947539501dfd8d7d5b8828
2025-03-23 11:12:33 -04:00
Ryan Ofsky
b9c281011b
Merge bitcoin/bitcoin#31689: Benchmark Chainstate::ConnectBlock duration
7edaf8b64cb2d59ada22042fee62a417e52368b8 Benchmark Chainstate::ConnectBlock duration (Eunovo)

Pull request description:

  Introduce benchmarks to evaluate ConnectBlock performance for:
  - Blocks containing only Schnorr signatures
  - Blocks containing both Schnorr and ECDSA signatures
  - Blocks containing only ECDSA signatures

  The benchmarks in this PR, focus on signature validation. Additional benchmarks may be added in the future to assess other aspects of ConnectBlock.

  This is the first step toward implementing Batch Verification of Schnorr Signatures in Core. It provides a way to test and measure the performance improvements of batch verification on Core.
  For more details on batch validation, refer to the [batch-verify module on secp](https://github.com/bitcoin-core/secp256k1/pull/1134) and [batch-verify on core](https://github.com/bitcoin/bitcoin/pull/29491).

ACKs for top commit:
  josibake:
    reACK 7edaf8b64c
  fjahr:
    utACK 7edaf8b64cb2d59ada22042fee62a417e52368b8
  l0rinc:
    ACK 7edaf8b64cb2d59ada22042fee62a417e52368b8

Tree-SHA512: 883c8a5e4e4de401ffb9ac9b6789b7fe0737afefbdaf02c6d7e1645392efc4f0d2d28b423ba7e34366a33608e0835793f5e7a1312b5c8063de14446319529cc7
2025-03-23 09:03:28 -04:00
merge-script
af3dee0b8d
Merge bitcoin/bitcoin#32074: contrib: Make deterministic-coverage error messages more readable
fa7a40d952ad7588f45f6229aeae754b02fdfb55 contrib: Print deterministic-coverage runs (MarcoFalke)
fa751639fb667dc31a2220e33cbd134aa6b30741 contrib: Make deterministic-coverage error messages more readable (MarcoFalke)

Pull request description:

  This is almost a "refactor" to tidy up the error messages. Apart from the messages, the behavior of the tools is identical.

  This was requested in https://github.com/bitcoin/bitcoin/pull/31901#discussion_r1969502508.

  Previously, the tool would abort the program early on some errors. Now, the tool propagates an `std::result::Result::Err` up to `main` via an early return. Getting rid of the aborts also allows to drop the `RUST_BACKTRACE` env setting.

ACKs for top commit:
  hodlinator:
    re-ACK fa7a40d952ad7588f45f6229aeae754b02fdfb55
  janb84:
    ACK [fa7a40d](fa7a40d952)

Tree-SHA512: 6c97861306e2fececa14b2d12deafb78995fc2bcf75e4e22773cb0ab4231de78834db9f1f89b30c49d77499433b1c16c1d90b97eb4069c81855bd2a7944b554f
2025-03-22 11:12:14 +08:00
merge-script
8046759305
Merge bitcoin/bitcoin#31870: fuzz: split coinselection harness
ba82240553ddd534287845e10bc76b46b45329fe fuzz: split `coinselection` harness (brunoerg)

Pull request description:

  This PR splits the `coinselection` fuzz harness into 3 targets (`coinselection_bnb`, `coinselection_knapsack`, `coinselection_srd`). The goal is to be able to fuzz each algorithm separately (to avoid performance issues) and also all of them together.

ACKs for top commit:
  janb84:
    Tested ACK [ba82240](ba82240553)
  maflcko:
    review ACK ba82240553ddd534287845e10bc76b46b45329fe 👐
  marcofleon:
    reACK ba82240553ddd534287845e10bc76b46b45329fe
  zaidmstrr:
    reACK [ba82240](ba82240553)

Tree-SHA512: 277cffd524e57d286dbbbcb2aa0a9f1d720b4c56331dfb0f4425e1666246330616508e47977da23f28a72705aa142bbaf536e2cf7fe4703a2cd2e4b2fd441d9d
2025-03-21 18:40:09 +08:00
merge-script
2db00278ea
Merge bitcoin/bitcoin#31910: qa: fix an off-by-one in utxo snapshot fuzz target and sanity check its snapshot data
63b534f97e591d4e107fd5148909852eb2965d27 fuzz: sanity check hardcoded snapshot in utxo_snapshot target (Antoine Poinsot)
3b85eba83abe561078c91f5a5c49cf26c682c19b test util: split up ConnectBlock from MineBlock (Antoine Poinsot)
d1527f6b88656ff4aab3c671c6d9780ea2ae986e qa: correct off-by-one in utxo snapshot fuzz target (Antoine Poinsot)

Pull request description:

  The assumeutxo data for the fuzz target could change and invalidate the hash silently, preventing the fuzz target from reaching some code paths. Fix this by introducing a unit test which would break if the snapshot data the fuzz target relies on were to change.

  In implementing this i noticed the height used for coins in the fuzz target is actually off-by-one (as if the first block in the created chain was the genesis but it's block `1`), so fix that too.

ACKs for top commit:
  mzumsande:
    Code Review ACK 63b534f97e591d4e107fd5148909852eb2965d27
  fjahr:
    tACK 63b534f97e591d4e107fd5148909852eb2965d27

Tree-SHA512: 2399b6e74db9b78aab8efba67c57a405d2d7d880ae3b7d8518a1c96cc6266f61f5e77722cd999adeac5d3e03e73d84cf9ae7bdbcc0afae198cc87049dde4012f
2025-03-21 16:46:54 +08:00
merge-script
c9a61509ba
Merge bitcoin/bitcoin#31979: torcontrol: Limit reconnect timeout to max seconds and log delay in whole seconds
f708498293c27f63507cfa08c74909ba3d1aa675 torcontrol: Limit reconnect timeout to max seconds and log delay in whole seconds (Eval EXEC)

Pull request description:

  I'm reviewing the Tor controller's reconnect-related code and noticed that the reconnect timeout had no limit. This could lead to excessively long delays.

  This PR introduces a maximum reconnect timeout of 600 seconds (10 minutes) to prevent excessive delays in reconnection attempts. It also updates the log message to display the retry delay in whole seconds for better readability.

ACKs for top commit:
  mabu44:
    ACK f708498293c27f63507cfa08c74909ba3d1aa675
  laanwj:
    Code review ACK f708498293c27f63507cfa08c74909ba3d1aa675
  luke-jr:
    utACK f708498293c27f63507cfa08c74909ba3d1aa675

Tree-SHA512: 8f18c6c84da6b4e7328638fd74539fbd3dd44f46c5107638de56b72fc079487690861199ceba1197ca34421dcedf79a1ca6bacf2a918a683e71bce9ff710b5d4
2025-03-21 15:34:29 +08:00
merge-script
b43cfa20fd
Merge bitcoin/bitcoin#30142: doc: add guidance for RPC to developer notes
c6eca6f3961d780d6a395c3346e44be1a0072f08 doc: add guidance for RPC to developer notes (tdb3)

Pull request description:

  Adds guidance statements to the RPC interface section of the developer notes with examples of when to implement `-deprecatedrpc=`.

  Wanted to increase awareness of preferred RPC implementation approaches for newer contributors.

  This implements some of what's discussed in https://github.com/bitcoin/bitcoin/issues/29912#issuecomment-2081678433

  Opinions may differ, so please don't be shy.  We want to make RPC as solid/safe as possible.

  Examples of discussions where guidelines/context might have added value:
  https://github.com/bitcoin/bitcoin/pull/30212#issuecomment-2347371722
  https://github.com/bitcoin/bitcoin/pull/29845#discussion_r1571053657
  https://github.com/bitcoin/bitcoin/pull/30381#pullrequestreview-2160865613
  https://github.com/bitcoin/bitcoin/pull/29954#issuecomment-2103628952
  https://github.com/bitcoin/bitcoin/pull/30410#pullrequestreview-2167870869
  https://github.com/bitcoin/bitcoin/pull/30713
  https://github.com/bitcoin/bitcoin/pull/30381
  https://github.com/bitcoin/bitcoin/pull/29060#pullrequestreview-2406688998

ACKs for top commit:
  l0rinc:
    ACK c6eca6f3961d780d6a395c3346e44be1a0072f08
  fjahr:
    ACK c6eca6f3961d780d6a395c3346e44be1a0072f08
  maflcko:
    lgtm ACK c6eca6f3961d780d6a395c3346e44be1a0072f08
  jonatack:
    ACK c6eca6f3961d780d6a395c3346e44be1a0072f08

Tree-SHA512: 01a98a8dc0eb91762b225d3278cdb4a5e380ceb7486fd096b4ad9122bed859cea8584d8996d3dce51272fdb792f4a793a1bd1c5445efeb87f0a30f9b6e59a790
2025-03-21 13:47:48 +08:00
merge-script
85feb094d4
Merge bitcoin/bitcoin#32092: test: Fix intermittent issue in p2p_orphan_handling.py
fa310cc6f499e3e3dd58dc382e04e9db3f02bc3b test: Fix intermittent issue in p2p_orphan_handling.py (MarcoFalke)

Pull request description:

  The test may fail intermittently when the `net` thread is lagging while calling `DeleteNode`. This may result in a split `getdata`, meaning that `peer2.wait_for_parent_requests([int(parent_peekaboo_AB["txid"], 16), int(parent_missing["txid"], 16)])` fails.

  Fix it by adding a sync on the `net` thread.

  Fixes #31700

ACKs for top commit:
  mzumsande:
    Code Review ACK fa310cc6f499e3e3dd58dc382e04e9db3f02bc3b

Tree-SHA512: e4a58093ab5b9e280c479b845fecb5d228e65519ea3dc2111b393202225fd0feded423e8812452454b6b9348cb37a9c1b01b9d1b1802e9f4aa76b9e56b4b54ef
2025-03-21 13:46:11 +08:00
merge-script
b858b72903
Merge bitcoin/bitcoin#31841: fuzz: Use immediate task runner to increase fuzz stability
fa4fb6a8f15c295a2a3d3ffd737e115b8be46c1f fuzz: Use serial task runner to increase fuzz stability (MarcoFalke)

Pull request description:

  Leaking a scheduler with a non-empty queue from the fuzz initialization phase into the fuzz target execution phase is problematic, because it messes with coverage data. This in turn is problematic, because it leads to:

  * Decrease in fuzz target execution stability (non-determinism when running the fuzz target).
  * Decrease in fuzz input merge stability (non-determinism when selecting a minimum set of fuzz input to reach maximum coverage), which leads to qa-assets bloat.

  Fix one such issue. Tracking issue: https://github.com/bitcoin/bitcoin/issues/29018

  Can be tested via: `RUST_BACKTRACE=1 cargo run --manifest-path ./contrib/devtools/deterministic-fuzz-coverage/Cargo.toml -- $PWD/bld-cmake $PWD/../b-c-qa-assets/fuzz_corpora/ partially_downloaded_block`.

  The failure is non-deterministic (obviously) and will show coverage in validation signals such as `UpdatedBlockTip` before this change and will have this one fixed after this change.

ACKs for top commit:
  marcofleon:
    ACK fa4fb6a8f15c295a2a3d3ffd737e115b8be46c1f
  dergoegge:
    Code review ACK fa4fb6a8f15c295a2a3d3ffd737e115b8be46c1f

Tree-SHA512: fd1f66562c1d3c21553c7dd324399cdc16faa2fedfdb8e7544ea6a68b8b356e7c81d81815ecf70e0d334307dab6b275c1889b3b889b6f15eec514beee22c95f4
2025-03-21 08:25:41 +08:00
MarcoFalke
fa7a40d952
contrib: Print deterministic-coverage runs 2025-03-20 15:59:14 +01:00
MarcoFalke
fa751639fb
contrib: Make deterministic-coverage error messages more readable 2025-03-20 15:59:03 +01:00
Ryan Ofsky
998386d446
Merge bitcoin/bitcoin#31866: test, refactor: Add TestNode.binaries to hold binary paths
d190f0facc8379da7610d7161e532d57c6a7eb96 test, contrib: Fix signer/miner command line escaping (Ryan Ofsky)
0d2eefca8bf3cb64e3f2f912ed32118524430967 test, refactor: Add TestNode.binaries to hold binary paths (Ryan Ofsky)

Pull request description:

  Add new `TestNode.binaries` object to manage paths to bitcoin binaries.

  The `binaries` object makes it possible for the test framework to exercise the bitcoin wrapper executable introduced in https://github.com/bitcoin/bitcoin/pull/31375 and also makes it easier in general to add new binaries, and new options and environment variables controlling how they are invoked, because logic for invoking them that was previously spread out is now consolidated in one place.

  These changes were originally part of #31375 but made that PR harder to review because they were unrelated to the other changes there. If this PR can get merged first, python changes in #31375 will be simple, and the test framework changes here should also get a higher quality review.

ACKs for top commit:
  maflcko:
    re-review-ACK d190f0facc8379da7610d7161e532d57c6a7eb96 🍓
  Sjors:
    ACK d190f0facc8379da7610d7161e532d57c6a7eb96
  vasild:
    ACK d190f0facc8379da7610d7161e532d57c6a7eb96

Tree-SHA512: 5a6c0553cd2822585810d827ef1c1772cbf3097d3336daf733f8378dd3da79c00fc3721e50ed0f7455908fbd7a509e9739f9be33f588d6bc1aaa400b9d75c650
2025-03-20 09:06:19 -04:00
merge-script
aa87e0b446
Merge bitcoin/bitcoin#31519: refactor: Use std::span over Span
ffff4a293ad878494e12f8f00108cc99ee2b713e bench: Update span-serialize comment (MarcoFalke)
fa4d6ec97bcb1790a7cd4363a13fda7c80c3dd90 refactor: Avoid false-positive gcc warning (MarcoFalke)
fa942332b40c97375af0722f32f7575bca3af819 scripted-diff: Bump copyright headers after std::span changes (MarcoFalke)
fa0c6b7179c062b7ca92d120455ce02a9f4e9e19 refactor: Remove unused Span alias (MarcoFalke)
fade0b5e5e6e80e3da1ab6448b6212244bafa5d3 scripted-diff: Use std::span over Span (MarcoFalke)
fadccc26c03db00a2be3f703aa7e5eec4312bd2e refactor: Make Span an alias of std::span (MarcoFalke)
fa27e36717ec18d64b7ff7bba71b8f0c202ba31d test: Fix broken span_tests (MarcoFalke)
fadf02ef8bf96ad5b3b8e34fd425b31b555f4371 refactor: Return std::span from MakeUCharSpan (MarcoFalke)
fa720b94be17fa9e7c91188710e6a04939ceab11 refactor: Return std::span from MakeByteSpan (MarcoFalke)

Pull request description:

  `Span` has some issues:

  * It does not support fixed-size spans, which are available through `std::span`.
  * It is confusing to have it available and in use at the same time with `std::span`.
  * It does not obey the standard library iterator build hardening flags. See https://github.com/bitcoin/bitcoin/issues/31272 for a discussion. For example, this allows to catch issues like the one fixed in commit fabeca3458b38a3d8930cb0cbc866388c3f120f1.

  Both types are type-safe and can even implicitly convert into each other in most contexts.

  However, exclusively using `std::span` seems less confusing, so do it here with a scripted-diff.

ACKs for top commit:
  l0rinc:
    reACK ffff4a293ad878494e12f8f00108cc99ee2b713e
  theuni:
    ACK ffff4a293ad878494e12f8f00108cc99ee2b713e.

Tree-SHA512: 9cc2f1f43551e2c07cc09f38b1f27d11e57e9e9bc0c6138c8fddd0cef54b91acd8b14711205ff949be874294a121910d0aceffe0e8914c4cff07f1e0e87ad5b8
2025-03-20 13:41:54 +08:00
merge-script
ef525e8b7c
Merge bitcoin/bitcoin#31457: fuzz: Speed up *_package_eval fuzz targets a bit
fac3d93c2ba84899c2c6516b5449f61ef653d9fa fuzz: Speed up *_package_eval fuzz targets a bit (MarcoFalke)
fa40fd043ab23eb8948c208ca82f75f3d40bb2e4 fuzz: [refactor] Avoid confusing c-style cast (MarcoFalke)

Pull request description:

  Each target is at least 10% faster for me when running over the current set of qa-assets, which seems nice.

  The changes `outpoints_value` from a map to an unordered map, which is safe, because the element order is not used in the fuzz test and the map is only used for lookup.

  (`mempool_outpoints` can't be changed, because the order matters here. Using unordered_set here may result in a non-deterministic fuzz target, given the same fuzz input.)

ACKs for top commit:
  l0rinc:
    ACK fac3d93c2ba84899c2c6516b5449f61ef653d9fa
  dergoegge:
    Code review ACK fac3d93c2ba84899c2c6516b5449f61ef653d9fa

Tree-SHA512: 8ae5d4e281505aff76a4003d6e9ea388dbb73860e167385bd6a0a201b3acc939db29ee212594952a9e80e85b3cc4cd726ce6dd49551f74013cb4da8a15cbdfb3
2025-03-20 13:06:17 +08:00
merge-script
7d76c9725c
Merge bitcoin/bitcoin#31766: leveldb: pull upstream C++23 changes
c8fab356171a0e283d5716647e3243c04810ac51 ci: remove -Wno-error=deprecated-declarations from ASAN (fanquake)
a130bbd154d535b80fe9f602a13bf2e322817881 Squashed 'src/leveldb/' changes from 04b5790928..4188247086 (fanquake)

Pull request description:

  Cherry-picks two commits from upstream (302786e211, e829478c6a), which remove the usage of `std::aligned_storage/std::aligned_union`.

  Note the first cherry-pick is not clean, because due to Google tooling issues, it accidently contained a revert of the prior two commits. See https://github.com/google/leveldb/pull/1249 for more details.

  Also see https://issues.chromium.org/issues/388068052, although note that they [reverted the roll to latest leveldb](https://issues.chromium.org/issues/388068052#comment9). I'm guessing due to the acidental reversion issue above.

ACKs for top commit:
  l0rinc:
    ACK c8fab356171a0e283d5716647e3243c04810ac51
  darosior:
    ACK c8fab356171a0e283d5716647e3243c04810ac51 -- checked it's a clean subtree pull from https://github.com/bitcoin-core/leveldb-subtree/tree/bitcoin-fork
  dergoegge:
    utACK c8fab356171a0e283d5716647e3243c04810ac51

Tree-SHA512: 966e61b9ac88af5ae7bf71514bfd5bbdbd8c38c7af65feb6d5e4415062dcff5896dc33fe968ded3462cc599abd921d49ee8336db3e12ed3f59c91ceb949317b7
2025-03-20 13:03:52 +08:00
merge-script
780bcf80b5
Merge bitcoin/bitcoin#32091: test: replace assert with assert_equal and assert_greater_than
387385ba1edf9febdc75d39bd77b35b29714b3d0 test: replace assert with assert_equal and assert_greater_than (Chandra Pratap)

Pull request description:

  In `test/functional/interface_usdt_net.py`, `assert_equal` is already used to check for equality between objects. Replace `assert.*==` with `assert_equal` and `assert.*>` with `assert_greater_than` to further easify debugging.

  Relevant issue: #23119

ACKs for top commit:
  maflcko:
    lgtm ACK 387385ba1edf9febdc75d39bd77b35b29714b3d0
  0xB10C:
    had a quick look, lgtm ACK 387385ba1edf9febdc75d39bd77b35b29714b3d0
  theStack:
    utACK 387385ba1edf9febdc75d39bd77b35b29714b3d0
  brunoerg:
    code review ACK 387385ba1edf9febdc75d39bd77b35b29714b3d0
  i-am-yuvi:
    Great! ACK 387385ba1edf9febdc75d39bd77b35b29714b3d0

Tree-SHA512: 741a3d98288c9999f62bcbaa3806716b0519ec9b521e1e6e17aa458392245f6eff886af6cb601c66f2147e0265ff1eae57cea3dcfd67af93bef6dff25b056935
2025-03-20 12:59:35 +08:00
tdb3
c6eca6f396
doc: add guidance for RPC to developer notes
Adds deprecatedrpc guidance statement to the
RPC interface guidelines section.
2025-03-19 18:56:17 -04:00
MarcoFalke
fa310cc6f4
test: Fix intermittent issue in p2p_orphan_handling.py 2025-03-19 20:21:14 +01:00
Sjors Provoost
288481aabd
doc: clarify that testnet min-difficulty is not optional 2025-03-19 08:59:08 +01:00
merge-script
e568c1dd13
Merge bitcoin/bitcoin#32088: test: switch wallet_crosschain.py to signet and drop testnet4
cec14ee47d71d8dd5ca8f90b760d807c3c8933a5 test: switch wallet_crosschain.py to signet (Sjors Provoost)
9c2951541c22c1e2fb9406095487ce8c5c360769 test: drop testnet4 from wallet_crosschain.py (Sjors Provoost)

Pull request description:

  It's sufficient to check only one test network, so this PR reverts the addition of testnet4 from #29775.

  Testnet3 is deprecated. Instead of moving to testnet4, which might also be deprecated in the future, use signet.

ACKs for top commit:
  fjahr:
    utACK cec14ee47d71d8dd5ca8f90b760d807c3c8933a5
  maflcko:
    lgtm ACK cec14ee47d71d8dd5ca8f90b760d807c3c8933a5 🌰

Tree-SHA512: c5aad6e7d251957f090145eac906f7985fddc3e3ba82df7184d72b961f9c856d324a1065ac98323b75501d136bd7b669fcc2565b9e66b0743eb3f3906ef37570
2025-03-19 07:39:30 +08:00
merge-script
e8f6a48e31
Merge bitcoin/bitcoin#32057: test: avoid disk space warning for non-regtest
20fe41e9e83d510fd467f5a999d55a614b16ef89 test: avoid disk space warning for non-regtest (Sjors Provoost)

Pull request description:

  `feature_config_args.py` incorrectly assumed that its testnet4 node would not log a disk space warning.

  But when #31978 increased `m_assumed_blockchain_size` on testnet4 from 1 to 11 GiB, it triggered this bug on my RAM disk, see https://github.com/bitcoin/bitcoin/tree/master/test#speed-up-test-runs-with-a-ram-disk

  This PR fixes the issue by using `-prune` which prevents the warning.

ACKs for top commit:
  fjahr:
    ACK 20fe41e9e83d510fd467f5a999d55a614b16ef89
  maflcko:
    lgtm ACK 20fe41e9e83d510fd467f5a999d55a614b16ef89
  rkrux:
    ACK 20fe41e9e83d510fd467f5a999d55a614b16ef89

Tree-SHA512: f4bbb3ede307e06bf097a3cf7a4099eacc9388e33f551e1d0c4c5f53747bfa593a4b22e5d2e713ce6dd8adf91602fade36fbec9cfc2b250a6b1cf09f11bc8473
2025-03-19 07:22:00 +08:00
Chandra Pratap
387385ba1e test: replace assert with assert_equal and assert_greater_than
In test/functional/interface_usdt_net.py, assert_equal is already
used to check for equality between objects. Replace 'assert.*=='
with 'assert_equal' and 'assert.*>' with 'assert_greater_than'
to further easify debugging.
2025-03-18 14:05:43 +00:00
Ryan Ofsky
d190f0facc test, contrib: Fix signer/miner command line escaping
Pass bitcoin binary command lines from test framework to signet/miner utility
using shell escaping so they are unambigous and don't get mangled if they
contain spaces.

This change is not needed for tests to pass currently, but is a useful change
to avoid CI failures in followup PR
https://github.com/bitcoin/bitcoin/pull/31375 and to avoid other bugs.
2025-03-18 07:36:41 -05:00
Ryan Ofsky
223fc24c4e
Merge bitcoin/bitcoin#31603: descriptor: check whitespace in keys within fragments
21e9d39a3725cd6107b742f0cb97f65b3640201b docs: add release notes for 31603 (brunoerg)
a8b548d75d9a376c9bb66e06bb918c876416d615 test: `getdescriptorinfo`/`importdescriptors` with whitespace in pubkeys (brunoerg)
c7afca3d62cf5d3ea9b98d5a76e4e54cac07bc3c test: descriptor: check whitespace into keys (brunoerg)
cb722a3cea16a04844c83e56fd6deaa1f0dc0a7e descriptor: check whitespace in ParsePubkeyInner (brunoerg)
50856695ef6c02ecbaa0cf448567355b6b86b510 test: fix descriptors in `ismine_tests` (brunoerg)

Pull request description:

  Currently, we successfully parse descriptors which contains spaces in the beginning or end of the public/private key within a fragment (e.g. `pk( KEY)`, `pk(KEY )` or `pk( KEY )`). I have noticed that one of the reasons is that the `DecodeBase58` function simply ignore these whitespaces.

  This PR changes the `ParsePubkeyInner ` to reject pubkeys that contain a whitespace at the beginning and/or at the end. We will only check the whitespace in some RPCs (e.g. `importdescriptors`), but an already imported descriptor won't be affected by this check, especially because we store descriptors from `ToString`.

  For context: https://github.com/brunoerg/bitcoinfuzz/issues/72

ACKs for top commit:
  rkrux:
    tACK 21e9d39a3725cd6107b742f0cb97f65b3640201b
  darosior:
    re-ACK 21e9d39a3725cd6107b742f0cb97f65b3640201b
  sipa:
    utACK 21e9d39a3725cd6107b742f0cb97f65b3640201b

Tree-SHA512: 54f48a89a235517e5cdc29a46dceeb7dabbee93c7616a166288ff3f90131808eb0ece43b0797a11fe827a5f7bd51d65e3e75c16789b0a42020934cabb684cc8f
2025-03-18 08:36:41 -04:00
Ryan Ofsky
0d2eefca8b test, refactor: Add TestNode.binaries to hold binary paths
Add new TestNode.binaries object to manage paths to bitcoin binaries.

Having this object makes it possible for the test framework to exercise the
bitcoin wrapper executable introduced in
https://github.com/bitcoin/bitcoin/pull/31375 and also makes it easier to add
new binaries and options and environment variables controlling how they are
invoked, because logic for invoking them that was previously spread out is now
consolidated in one place.

Co-authored-by: Sjors Provoost <sjors@sprovoost.nl>
2025-03-18 07:36:41 -05:00
merge-script
d61a847af0
Merge bitcoin/bitcoin#32019: cmake: Check for makensis and zip tools before using them for optional deploy targets
1f9b2e150ce5aa192226d2daae73f7d678c47d65 cmake: Require `zip` only for `deploy` target (Hennadii Stepanov)
0aeff2995138c247f1b1f843c30eb547e199f5f7 cmake: Check for `makensis` tool before using it (Hennadii Stepanov)

Pull request description:

  For `x86_64-w64-mingw32` and `*-apple-darwin` targets, the optional `deploy` target requires dedicated tools: `makensis` and `zip`, respectively.

  This PR introduces a uniform checks for those tools when attempting to build the `deploy` target, ensuring they are not required for configuring and building any other targets.

  Here is an example of workflow for `x86_64-w64-mingw32`:
  ```
  $ # `nsis` is not installed
  $ cmake -B build -G "GNU Makefiles" --toolchain depends/x86_64-w64-mingw32/toolchain.cmake
  $ cmake --build build -j $(nproc)
  $ cmake --build build -t deploy

  Error: NSIS not found.
  Please install NSIS and/or ensure that its executable is accessible to the find_program() command—
  for example, by setting the MAKENSIS_EXECUTABLE variable or another relevant CMake variable.
  Then re-run cmake to regenerate the build system.

  Built target deploy
  $ sudo apt install nsis
  $ cmake -B build
  $ cmake --build build -t deploy
  ...
  [100%] Generating bitcoin-win64-setup.exe
  [100%] Built target deploy
  ```

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

ACKs for top commit:
  hodlinator:
    re-ACK 1f9b2e150ce5aa192226d2daae73f7d678c47d65
  fanquake:
    ACK 1f9b2e150ce5aa192226d2daae73f7d678c47d65

Tree-SHA512: 5e2bd28a13bd8fa7c4ba8cf1756d200a4651afe83c463d76ece10027cca343e124eff97012a5368028f761df60f420ab891106b4e33b50045051d57c7464ff98
2025-03-18 17:10:40 +08:00
Sjors Provoost
cec14ee47d
test: switch wallet_crosschain.py to signet
Testnet3 is deprecated. Instead of moving to testnet4, which might
also be deprecated in the future, use signet.
2025-03-18 09:45:04 +01:00
Sjors Provoost
9c2951541c
test: drop testnet4 from wallet_crosschain.py
This reverts the changes to test/functional/wallet_crosschain.py
in commit 74a04f9e7ad6a16988149cc3438b9ce13c91cdb9.

It's sufficient to check only one test network. The next commit
will change that network away from testnet3.
2025-03-18 09:20:13 +01:00
merge-script
14fec6380d
Merge bitcoin/bitcoin#32059: test: Update coverage.cpp to drop linux restriction
54e6eacc1fccd602897d9e3025c62f83194ffd5b test: Enable ResetCoverageCounters beyond Linux (janb84)

Pull request description:

  In PR [#31901](https://github.com/bitcoin/bitcoin/pull/31901), Coverage.cpp was introduced as a separate utility file, based on existing code. However, the macro defined in Coverage.cpp was limited to Clang and Linux, which caused issues for users on macOS when using the newly introduced deterministic test tooling.

  This change adds fallback functions which are used when building without code coverage on non linux env.
  This adds support for macOS to ResetCoverageCounters. ResetCoverageCounters is used by the unit tests in `g_rng_temp_path_init` to support the deterministic unit test tooling. It is also used in fuzz tests to completely suppress coverage from anything init-related.

  See [Readme](https://github.com/bitcoin/bitcoin/blob/master/contrib/devtools/README.md) on how to test this for deterministic unit & fuzz test.

  Suggestion for test files:

  - for  unit test: `util_string_tests`
  - for fuzz test: `addition_overflow `

  These files should give deterministic results

ACKs for top commit:
  maflcko:
    review-only ACK 54e6eacc1fccd602897d9e3025c62f83194ffd5b
  hodlinator:
    re-ACK 54e6eacc1fccd602897d9e3025c62f83194ffd5b

Tree-SHA512: dd71da6f76d4fc9e64bf521bbfe5e7483d77c2ca0380f9e692502e64b529068ea33f21b19399481feb7c6780a23d893d8b7f733cef641a2db18a13397c98deea
2025-03-18 15:22:44 +08:00
merge-script
ece0b41da6
Merge bitcoin/bitcoin#32087: ci: Drop ENABLE_HARDENING=OFF from clang-tidy
7d34c19853e7a5528d69c5f30580e7e9712e61f0 ci: Drop ENABLE_HARDENING=OFF from clang-tidy (David Gumberg)

Pull request description:

  Split out from #32071

  It's not clear why this was added in the first place, but it is not necessary currently.

  https://github.com/bitcoin/bitcoin/pull/32038#issuecomment-2723888193 https://github.com/bitcoin/bitcoin/pull/24753.

ACKs for top commit:
  fanquake:
    ACK 7d34c19853e7a5528d69c5f30580e7e9712e61f0

Tree-SHA512: 9ffab10349f52aed77d002155da59f13f0954e6bc1ac1edbddcbb9e70aa2db3b0b0307eb35f8b791589f2157705a96d463589d4270f4873e9037a9ef88807b56
2025-03-18 12:47:02 +08:00
merge-script
c9b633d119
Merge bitcoin/bitcoin#31948: ci: [lint] Use Cirrus dockerfile cache
fa3b4427158d48f7d899582580f8f6a7b1bc981d ci: Use Cirrus dockerfile cache (MarcoFalke)

Pull request description:

  The lint task is problematic, because:

  * It doesn't check modifications to `ci/lint_imagefile`
  * It calls a separate script that installs packages on every run (taking time)
  * It uses `*_cache` instructions to cache some installed parts, but not all

  Fix all issues by using `ci/lint_imagefile` (https://cirrus-ci.org/guide/docker-builder-vm/#dockerfile-as-a-ci-environment)

ACKs for top commit:
  willcl-ark:
    ACK fa3b4427158d48f7d899582580f8f6a7b1bc981d

Tree-SHA512: 243d78219639b83721d4e5cb32d16e5c208a61c919d04646279be5825ba92d97c490b5d4d28ea103eb820b1a259904574cb3e32eaca3f11c3031810e3d87ff4a
2025-03-18 11:42:41 +08:00
merge-script
6245c23504
Merge bitcoin/bitcoin#32083: doc: shallow clone qa-assets
6f9f415a4fa3a3c1dc87c207b0192a5ed0a91e0f doc: shallow clone qa-assets (Lőrinc)

Pull request description:

  While reviewing https://github.com/bitcoin/bitcoin/pull/31457#pullrequestreview-2690077410 I noticed that cloning `qa-assets` takes a lot of time - shallow cloning should suffice here.

  I haven't checked the other clones in this file but suggestion are welcome.

ACKs for top commit:
  maflcko:
    lgtm ACK 6f9f415a4fa3a3c1dc87c207b0192a5ed0a91e0f

Tree-SHA512: 21bd676c7709dbf7fd30b239d0a72f9c230453ed8f8a1b5319ac92ef9c5e67780939f095a239dd31bcb4550f8d69eaed4931a221e19cb0b957f18fac623c4a01
2025-03-18 08:06:17 +08:00
Hodlinator
6869fb4170
net: Block v2->v1 transport downgrade if !CConnman::fNetworkActive
We might have just set CNode::fDisconnect in the first loop because of being offline.

Also caches CConnman::fNetworkActive in case it's changed concurrently with our own thread.
2025-03-17 16:56:39 +01:00
Hennadii Stepanov
257fd27e4b
Merge bitcoin/bitcoin#32033: test: Check datadir cleanup after assumeutxo was successful
52482cb24400f8c44ba9628aaaecb7c04b11beb2 test: Check datadir cleanup after assumeutxo was successful (Fabian Jahr)

Pull request description:

  I noticed that the proper datadir cleanup after a successful restart of an assumutxo node does not seem to be covered in our tests. This is added here.

ACKs for top commit:
  l0rinc:
    utACK 52482cb24400f8c44ba9628aaaecb7c04b11beb2
  mabu44:
    Re-ACK 52482cb24400f8c44ba9628aaaecb7c04b11beb2
  Prabhat1308:
    re-ACK [`52482cb`](52482cb244)
  TheCharlatan:
    Re-ACK 52482cb24400f8c44ba9628aaaecb7c04b11beb2

Tree-SHA512: cc941afeba250050eaccf5112255d961253fec9b2683545454a0d2fbe4d542178394b301d169a9dd79edbf6b5d478d95282727dbb0aca96ee79d4cd1ff80f19b
2025-03-17 13:43:45 +00:00
Lőrinc
6f9f415a4f doc: shallow clone qa-assets
While reviewing https://github.com/bitcoin/bitcoin/pull/31457#pullrequestreview-2690077410 I noticed that cloning `qa-assets` takes a lot of time - shallow cloning should suffice here.

I haven't checked the other clones in this file.
2025-03-17 13:06:22 +01:00
Hennadii Stepanov
db2c57ae9e
Merge bitcoin-core/gui#858: qt: doc: adapt outdated binary paths to CMake changes
7ebc458a8cb994bc3c0c129da61353968d955bc2 qt: doc: adapt outdated binary paths to CMake changes (Sebastian Falbesoner)

Pull request description:

  Adapt the qt-related instances of outdated binary paths to `./build/bin/...` (see [#30454](https://github.com/bitcoin/bitcoin/pull/30454) and the more recently merged [#31161](https://github.com/bitcoin/bitcoin/pull/31161)). According to `$ git grep src/qt.*bitcoin` there should be no more left to address.

ACKs for top commit:
  maflcko:
    lgtm ACK 7ebc458a8cb994bc3c0c129da61353968d955bc2
  Sjors:
    utACK 7ebc458a8cb994bc3c0c129da61353968d955bc2
  fanquake:
    ACK 7ebc458a8cb994bc3c0c129da61353968d955bc2
  hebasto:
    ACK 7ebc458a8cb994bc3c0c129da61353968d955bc2.

Tree-SHA512: 8cd6579fdf209ec4ee3c4c9cfb94cb11d5d5115068d31613d356ca1303214dc4461580535c2d3f2773f373a4271e9a82df25596d8369eef8235822f7030d88bd
2025-03-17 09:06:21 +00:00
fanquake
c8fab35617
ci: remove -Wno-error=deprecated-declarations from ASAN
This is no-longer needed after the changes to leveldb.
2025-03-17 15:59:47 +08:00
fanquake
24fd0235e4
Update leveldb subtree to latest upstream 2025-03-17 15:59:05 +08:00
fanquake
a130bbd154 Squashed 'src/leveldb/' changes from 04b5790928..4188247086
4188247086 Merge bitcoin-core/leveldb-subtree#47: Fix C++23 compilation errors in leveldb
183e79a495 Fix speculatively some "placement new" issues in leveldb
82c31046ed Fix C++23 compilation errors in leveldb

git-subtree-dir: src/leveldb
git-subtree-split: 41882470862df219f74cdd38354007b91eb98191
2025-03-17 15:59:05 +08:00
merge-script
a799415d84
Merge bitcoin/bitcoin#31904: refactor: modernize outdated trait patterns using helper aliases (C++14/C++17)
4cd95a2921805f447a8bcecc6b448a365171eb93 refactor: modernize remaining outdated trait patterns (Lőrinc)
ab2b67fce20fd7d8017f8a26425cab99e91f420d scripted-diff: modernize outdated trait patterns - values (Lőrinc)
8327889f358289f918d04ddb9469fb5562720bf4 scripted-diff: modernize outdated trait patterns - types (Lőrinc)

Pull request description:

  The use of [`std::underlying_type_t<T>`](https://en.cppreference.com/w/cpp/types/underlying_type) or [`std::is_enum_v<T>`](https://en.cppreference.com/w/cpp/types/is_enum) (and similar ones, introduced in C++14) replace the `typename std::underlying_type<T>::type` and  `std::is_enum<T>::value` constructs (available in C++11).

  The `_t` and `_v` helper alias templates offer a more concise way to extract the type and value directly.

  I've modified the instances I found in the codebase one-by-one (noticed them while investigating https://github.com/bitcoin/bitcoin/pull/31868), and afterwards extracted scripted diff commits to do the trivial ones automatically.
  The last commit contains the values that were easier done manually.

  I've excluded changes from `src/bench/nanobench.h`, `src/leveldb`, `src/minisketch`, `src/span.h` and `src/sync.h` - let me know if you think they should be included instead.

  A few of the code changes can also be reproduced by clang-tidy (but not all of them):
  ```bash
  cmake -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DBUILD_FOR_FUZZING=ON && cmake --build build -j$(nproc)
  run-clang-tidy -quiet -p build -j $(nproc) -checks='-*,modernize-type-traits' -fix $(git grep -lE '::(value|type)' ./src ':(exclude)src/bench/nanobench.h' ':(exclude)src/leveldb' ':(exclude)src/minisketch' ':(exclude)src/span.h' ':(exclude)src/sync.h')
  ```

ACKs for top commit:
  laanwj:
    Concept and code review ACK 4cd95a2921805f447a8bcecc6b448a365171eb93

Tree-SHA512: a4bcf0f267c0f4e02983b4d548ed6f58d464ec379ac5cd1f998b9ec0cf698b53a9f2557a05a342b661f1d94adefc9a0ce2dc8f764d49453aaea95451e2c4c581
2025-03-17 13:10:10 +08:00
merge-script
5f4422d68d
Merge bitcoin/bitcoin#32010: qa: Fix TxIndex race conditions
3301d2cbe8c3b76c97285d75fa59637cb6952d0b qa: Wait for txindex to avoid race condition (Hodlinator)
9bfb0d75ba10591cc6c9620f9fd1ecc0e55e7a48 qa: Remove unnecessary -txindex args (Hodlinator)
7ac281c19cd3d11f316dbbb3308eabf1ad4f26d6 qa: Add missing coverage of corrupt indexes (Hodlinator)

Pull request description:

  - Add synchronization in 3 places where if the Transaction Index happens to be slow, we get rare test failures when querying it for transactions (one such case experienced on Windows, prompting investigation).
  - Remove unnecessary TxIndex initialization in some tests.
  - Add some test coverage where TxIndex aspect could be tested in feature_init.py.

ACKs for top commit:
  fjahr:
    re-ACK 3301d2cbe8c3b76c97285d75fa59637cb6952d0b
  mzumsande:
    Code Review ACK 3301d2cbe8c3b76c97285d75fa59637cb6952d0b
  furszy:
    Code review ACK 3301d2cbe8c3b76c97285d75fa59637cb6952d0b
  Prabhat1308:
    Concept ACK [`3301d2c`](3301d2cbe8)

Tree-SHA512: 7c2019e38455f344856aaf6b381faafbd88d53dc88d13309deb718c1dcfbee4ccca7c7f1b66917395503a6f94c3b216a007ad432cc8b93d0309db9805f38d602
2025-03-17 10:28:14 +08:00
Fabian Jahr
52482cb244
test: Check datadir cleanup after assumeutxo was successful 2025-03-16 18:48:15 +01:00
Sebastian Falbesoner
7ebc458a8c qt: doc: adapt outdated binary paths to CMake changes 2025-03-16 17:15:04 +01:00
merge-script
cd8089c20b
Merge bitcoin/bitcoin#32069: test: fix intermittent failure in wallet_reorgsrestore.py
36b0713edc4655f6e0c291975d6d280fbc89cf2e test: fix intermittent failure in wallet_reorgsrestore.py (furszy)

Pull request description:

  In response to #32066 intermittent failure.

  Wait until the node's process has fully stopped before starting a new instance of it.
  Same behavior as in the [tool_wallet.py](698f86964c/test/functional/tool_wallet.py (L540)) test.

ACKs for top commit:
  maflcko:
    lgtm ACK 36b0713edc4655f6e0c291975d6d280fbc89cf2e
  Chand-ra:
    tACK [36b0713](36b0713edc)

Tree-SHA512: 8e01493ef1fb58589479f3e12d7429d02ca75a2183d5f79d3b6a2fbf13334878926274a20857f1b4729afc1d30b65789daed229ce06ba236b91d949b73f45d5a
2025-03-16 22:29:14 +08:00