44661 Commits

Author SHA1 Message Date
Ava Chow
eba5f9c4b6
Merge bitcoin/bitcoin#32403: test: remove Boost SIGCHLD workaround.
3add6ab9adcd722d57c6d488581358ae9b377f1a test: remove Boost SIGCHLD workaround. (fanquake)

Pull request description:

  The related code was removed from Boost in 2e3bd1025d.

ACKs for top commit:
  achow101:
    ACK 3add6ab9adcd722d57c6d488581358ae9b377f1a
  laanwj:
    ACK 3add6ab9adcd722d57c6d488581358ae9b377f1a
  hebasto:
    ACK 3add6ab9adcd722d57c6d488581358ae9b377f1a, I have reviewed the code and it looks OK.
  mabu44:
    ACK 3add6ab9adcd722d57c6d488581358ae9b377f1a

Tree-SHA512: a0db2bb4e6a476c920a97183bd807e800d935114ff28f8802373a08b5330df42a9be953e7ea6e3c09f2ed45175f60c26c33bb4e25010269e6e491f12867ba008
2025-05-02 14:10:23 -07:00
fanquake
3add6ab9ad
test: remove Boost SIGCHLD workaround.
The related code was removed from Boost in
2e3bd1025d.
2025-05-02 10:59:46 +01:00
Ava Chow
5b8046a6e8
Merge bitcoin/bitcoin#30611: validation: write chainstate to disk every hour
e976bd3045010ee217aa0f2dca4c962aabb789d5 validation: add randomness to periodic write interval (Andrew Toth)
2e2f41068128c38120a5b44d24ee30f71970455a refactor: replace m_last_write with m_next_write (Andrew Toth)
b557fa7a175f139614932fbb3a4ad0af8271c73c refactor: rename fDoFullFlush to should_write (Andrew Toth)
d73bd9fbe483ad1397f62dc1d580314202351ace validation: write chainstate to disk every hour (Andrew Toth)
0ad7d7abdbcffc11a46413545a214a716f56dc95 test: chainstate write test for periodic chainstate flush (Andrew Toth)

Pull request description:

  Since #28233, periodically writing the chainstate to disk every 24 hours does not clear the dbcache. Since #28280, periodically writing the chainstate to disk is proportional only to the amount of dirty entries in the cache. Due to these changes, it is no longer beneficial to only write the chainstate to disk every 24 hours. The periodic flush interval was necessary because every write of the chainstate would clear the dbcache. Now, we can get rid of the periodic flush interval and simply write the chainstate along with blocks and block index at least every hour.

  Three benefits of doing this:
  1. For IBD or reindex-chainstate with a combination of large dbcache setting, slow CPU, slow internet speed/unreliable peers, it could be up to 24 hours until the chainstate is persisted to disk. A power outage or crash could potentially lose up to 24 hours of progress. If there is a very large amount of dirty cache entries, writing to disk when a flush finally does occur will take a very long time. Crashing during this window of writing can cause https://github.com/bitcoin/bitcoin/issues/11600. By syncing every hour in unison with the block index we avoid this problem. Only a maximum of one hour of progress can be lost, and the window for crashing during writing is much smaller. For IBD with lower dbcache settings, faster CPU, or better internet speed/reliable peers, chainstate writes are already triggered more often than every hour so this change will have no effect on IBD.
  2. Based on discussion in #28280, writing only once every 24 hours during long running operation of a node causes IO spikes. Writing smaller chainstate changes every hour like we do with blocks and block index will reduce IO spikes.
  3. Faster shutdown speeds. All dirty chainstate entries must be persisted to disk on shutdown. If we have a lot of dirty entries, such as when close to 24 hours or if we sync with a large dbcache, it can take a long time to shutdown. By keeping the chainstate clean we avoid this problem.

  Inspired by [this comment](https://github.com/bitcoin/bitcoin/pull/28280#issuecomment-2121088705).

  Resolves https://github.com/bitcoin/bitcoin/issues/11600

ACKs for top commit:
  achow101:
    ACK e976bd3045010ee217aa0f2dca4c962aabb789d5
  davidgumberg:
    utACK e976bd3045
  sipa:
    utACK e976bd3045010ee217aa0f2dca4c962aabb789d5
  l0rinc:
    ACK  e976bd3045010ee217aa0f2dca4c962aabb789d5

Tree-SHA512: 5bccd8f1dea47f9820a3fd32fe3bb6841c0167b3d6870cc8f3f7e2368f124af1a914bca6acb06889cd7183638a8dbdbace54d3237c3683f2b567eb7355e015ee
2025-05-01 12:11:55 -07:00
merge-script
fc6346dbc8
Merge bitcoin/bitcoin#32389: doc: Fix test_bitcoin path
6cbc28b8dd629062950f195facc009fd8ba86310 doc: Fix test_bitcoin path (monlovesmango)

Pull request description:

  This commit fixes a couple command paths for interacting with the test_bitcoin binary within the Unit Test documentation.

  If the commands are run as is a `command not found` error is returned.

  ```bash
  ❯ test_bitcoin --list_content
  bash: test_bitcoin: command not found
  ```

  ```bash
  ❯ test_bitcoin --help
  bash: test_bitcoin: command not found
  ```

ACKs for top commit:
  davidgumberg:
    ACK 6cbc28b8dd

Tree-SHA512: 0b10bc3aead360fa499beef7c9715f95a9acacdda44cbfac15566428594a7a8bdece24114a42618355959e20754bedc7a903bdddbf21b819c7b75375bdc80a93
2025-05-01 10:21:31 +01:00
monlovesmango
6cbc28b8dd doc: Fix test_bitcoin path
This commit fixes a couple command paths for interacting with the
test_bitcoin binary within the Unit Test documentation.
2025-05-01 03:05:57 +00:00
Andrew Toth
e976bd3045
validation: add randomness to periodic write interval
Co-Authored-By: Pieter Wuille <pieter@wuille.net>
Co-Authored-By: l0rinc <pap.lorinc@gmail.com>
2025-04-30 18:35:03 -04:00
Andrew Toth
2e2f410681
refactor: replace m_last_write with m_next_write
Co-Authored-By: l0rinc <pap.lorinc@gmail.com>
2025-04-30 18:33:43 -04:00
Andrew Toth
b557fa7a17 refactor: rename fDoFullFlush to should_write 2025-04-30 18:32:51 -04:00
Andrew Toth
d73bd9fbe4
validation: write chainstate to disk every hour
Remove the 24 hour periodic flush interval and
write the chainstate along with blocks and block
index every hour
2025-04-30 18:32:41 -04:00
Ava Chow
68ac9f116c
Merge bitcoin/bitcoin#32383: util: Remove fsbridge::get_filesystem_error_message()
97eaadc3bf9f621ba397e29bb1c0cd99af55f2e3 util: Remove `fsbridge::get_filesystem_error_message()` (Hennadii Stepanov)

Pull request description:

  The `fsbridge::get_filesystem_error_message()` function exhibits several drawbacks:

  1. It was introduced in https://github.com/bitcoin/bitcoin/pull/14192 to account for platform-specific variations in
  `boost::filesystem::filesystem_error::what()`. Since [migrating](https://github.com/bitcoin/bitcoin/pull/20744) to `std::filesystem`, those discrepancies no longer exist.

  2. It fails to display UTF-8 paths correctly on Windows:
  ```
  > build\bin\Release\bitcoind.exe -datadir="C:\Users\hebasto\dd_₿_🏃" -regtest
  ...
  2025-04-30T00:17:48Z DeleteAuthCookie: Unable to remove random auth cookie file: remove: Access is denied.: "C:\Users\hebasto\dd_?_??\regtest\.cookie"
  ...
  ```

  3. It relies on `std::wstring_convert`, which was deprecated in C++17 and removed in C++26 (also see https://github.com/bitcoin/bitcoin/issues/32361).

  This PR removes the obsolete `fsbridge::get_filesystem_error_message()` function, thereby resolving all of the above issues.

ACKs for top commit:
  maflcko:
    lgtm re-ACK 97eaadc3bf9f621ba397e29bb1c0cd99af55f2e3
  davidgumberg:
    untested crACK 97eaadc3bf
  achow101:
    ACK 97eaadc3bf9f621ba397e29bb1c0cd99af55f2e3
  laanwj:
    Code review ACK 97eaadc3bf9f621ba397e29bb1c0cd99af55f2e3

Tree-SHA512: 3c7378a9b143ac2a71add967318a13c346ae3bccbec6e9879d7873083f3fa469b3eef529b2c9c142b2489ba9563e4e12f685745c09a8a219d58b384f7ecf1be1
2025-04-30 10:56:14 -07:00
Hennadii Stepanov
97eaadc3bf
util: Remove fsbridge::get_filesystem_error_message()
The `fsbridge::get_filesystem_error_message()` function exhibits several
drawbacks:

1. It was introduced in https://github.com/bitcoin/bitcoin/pull/14192 to
account for platform-specific variations in
`boost::filesystem::filesystem_error::what()`. Since migrating to
`std::filesystem`, those discrepancies no longer exist.

2. It fails to display UTF-8 paths correctly on Windows.

3. It relies on `std::wstring_convert`, which was deprecated in C++17
and removed in C++26.

This change removes the `fsbridge::get_filesystem_error_message()`
function, thereby resolving all of the above issues.

Additionally, filesystem error messages now use the "Warning" log level.
2025-04-30 10:41:34 +01:00
Ava Chow
14b8dfb2bd
Merge bitcoin/bitcoin#31398: wallet: refactor: various master key encryption cleanups
a8333fc9ff9adaa97a1f9024f5783cc071777150 scripted-diff: wallet: rename plain and encrypted master key variables (Sebastian Falbesoner)
5a92077fd5317f936da2fa0aa45e0173248f765b wallet: refactor: dedup master key decryption (Sebastian Falbesoner)
846545947cd3b993c40362b9d0afcd7b4f5f05bd wallet: refactor: dedup master key encryption / derivation rounds setting (Sebastian Falbesoner)
a6d9b415aa3afcfe463887d0fde00c3d2d32672a wallet: refactor: introduce `CMasterKey::DEFAULT_DERIVE_ITERATIONS` constant (Sebastian Falbesoner)
62c209f50d9c33fde5062ebca317b9a4233aff62 wallet: doc: remove mentions of unavailable scrypt derivation method (Sebastian Falbesoner)

Pull request description:

  This PR contains various cleanups around the wallet's master key encryption logic. The default/minimum key derivation rounds magic number of 25000 is hoisted into a constant (member of `CMasterKey`) and two new functions `EncryptMasterKey`/`DecryptMasterKey` are introduced in order to deduplicate code for the derivation round determination and master key en/decryption. Also, mentions of the never-implemented derivation method `scrypt` are removed from the wallet crypter header and both plain and encrypted master key instances are renamed to adapt to moderning coding style (hopefully improving readability).

ACKs for top commit:
  davidgumberg:
    ACK a8333fc9ff
  achow101:
    ACK a8333fc9ff9adaa97a1f9024f5783cc071777150

Tree-SHA512: 5a66d3b26f481347d0b5b4f742dd237803a35aad6e3480ed15fd38b7fa3700650bd5f67f4c30ed88f5fad45d6cd4c893fe4f1657e36e563b4294fd3596187724
2025-04-29 16:32:21 -07:00
Ava Chow
a60445cd04
Merge bitcoin/bitcoin#32355: Bugfix: Miner: Don't reuse block_reserved_weight for "block is full enough to give up" weight delta
524f981bb87319fdd6ff2ab4a932c4b4e31a7398 Bugfix: Miner: Don't reuse block_reserved_weight for "block is full enough to give up" weight delta (Luke Dashjr)

Pull request description:

  PR #30356 incorrectly changed a constant of `4000` to `m_options.coinbase_max_additional_weight` in the check for when to give up finding another transaction to fill the block:

  ```diff
               if (nConsecutiveFailed > MAX_CONSECUTIVE_FAILURES && nBlockWeight >
  -                    m_options.nBlockMaxWeight - 4000) {
  +                    m_options.nBlockMaxWeight - m_options.block_reserved_weight) {
                   // Give up if we're close to full and haven't succeeded in a while
                   break;
               }
  ```

  But this constant did not deal with the reserved weight at all. It was in fact simply checking if the block was close to full, and if so, giving up finding another transaction to pad it with after `MAX_CONSECUTIVE_FAILURES` failed attempts.

  It doesn't seem very logical to reuse the reserve weight for this purpose, and it would be overcomplicated to add yet another setting, so this PR changes it to a new constexpr.

ACKs for top commit:
  achow101:
    ACK 524f981bb87319fdd6ff2ab4a932c4b4e31a7398
  darosior:
    utACK 524f981bb87319fdd6ff2ab4a932c4b4e31a7398
  ismaelsadeeq:
    ACK 524f981bb87319fdd6ff2ab4a932c4b4e31a7398

Tree-SHA512: c066debc34a021380424bd21b40444071b736325e41779a41590c2c8a6822ceeaf910fe067817c1dba108210b24c574977b0350b29520502e7af79d3b405928b
2025-04-29 15:51:18 -07:00
Ava Chow
2d5b424414
Merge bitcoin/bitcoin#32351: test: avoid stack overflow in FindChallenges via manual iteration
7e8ef959d0637ca5543ed33d3919937e0d053e70 refactor: Fix Sonar rule `cpp:S4998` - avoid unique_ptr const& as parameter (Lőrinc)
e400ac53524d143467740e2f59698a7c94644c21 refactor: simplify repeated comparisons in `FindChallenges` (Lőrinc)
f670836112c01feb3cb71618192e9c0c2e55767f test: remove old recursive `FindChallenges_recursive` implementation (Lőrinc)
b80d0bdee4603aa8ab69587d0c311aad1a9b3c7a test: avoid stack overflow in `FindChallenges` via manual iteration (Lőrinc)

Pull request description:

  `FindChallenges` explores the `Miniscript` node tree by going deep into the first child's subtree, then the second, and so on - effectively performing a pre-order Traversal (Depth-First Search) recursively, using the call stack which can result in stack overflows on Windows debug builds.

  This change replaces the recursive implementation with an iterative version using an explicit stack. The new implementation also performs a pre-order depth-first traversal, though it processes children in right-to-left order (rather than left-to-right) due to the LIFO nature of the stack. Since both versions store results in a `std::set`, which automatically sorts and deduplicates elements, the exact traversal order doesn't affect the final result.

  It is an alternative to increasing the Windows stack size, as proposed in #32349, and addresses the issue raised in #32341 by avoiding deep recursion altogether.

  The change is done in two commits:
  * add a new iterative `FindChallenges` method and rename the old method to `*_recursive` (to simplify the next commit where we remove it), asserting that its result matches the original;
  * remove the original recursive implementation.

  This approach avoids ignoring the `misc-no-recursion` warning as well.

  I tried modifying the new method to store results in a vector instead, but it demonstrated that the deduplication provided by `std::set` was necessary. One example showing the need for deduplication:

  Recursive (using set):
  ```
    (6, 9070746)
    (6, 19532513)
    (6, 3343376967)
  ```
  Iterative (using vector attempt):
  ```
    (6, 19532513)
    (6, 9070746)
    (6, 3343376967)
    (6, 9070746)  // Duplicate entry
  ```

  The performance of the test is the same as before, with the recursive method.

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

ACKs for top commit:
  achow101:
    ACK 7e8ef959d0637ca5543ed33d3919937e0d053e70
  sipa:
    utACK 7e8ef959d0637ca5543ed33d3919937e0d053e70
  hodlinator:
    re-ACK 7e8ef959d0637ca5543ed33d3919937e0d053e70

Tree-SHA512: 9e52eff82a7d76f5d37e3b74c508f08e5fced5386dad504bed111b27ed2b529008a6dd12a5116f009609a94c7ee7ebe3e80a759dda55dd1cb3ae52078f65ec71
2025-04-29 15:29:50 -07:00
Ava Chow
0ed5f37afe
Merge bitcoin/bitcoin#31014: net: Use GetAdaptersAddresses to get local addresses on Windows
b9d4d5f66a5a35c47e7abc9ec6ef5ab242b3f1e1 net: Use GetAdaptersAddresses to get local addresses on Windows (laanwj)

Pull request description:

  Instead of a `gethostname` hack, which is not guaranteed to return all addresses, use the official way of calling `GetAdaptersAddresses` to get local network addresses on Windows.

  Do the same checks as the UNIX path: interface is up, interface is not loopback.

  Suggested by Ava Chow.

  Addiional changes:

  - Cleanup: move out `FromSockAddr` in `netif.cpp` from MacOS and use it everywhere appropriate. This avoids code duplication.

ACKs for top commit:
  davidgumberg:
    utreACK b9d4d5f66a
  achow101:
    ACK b9d4d5f66a5a35c47e7abc9ec6ef5ab242b3f1e1

Tree-SHA512: e9f0a7ec0c46f21c0377d5174e054a6569f858630727f94dac00c0cb7c241c56892d0b902706d6dd53880cc3b5ae1f2dba9caa1fec40e64cd4cf0d34493a49c1
2025-04-29 15:13:39 -07:00
Ava Chow
7a4a2a38ea
Merge bitcoin/bitcoin#27826: validation: log which peer sent us a header
abe43dfadd6325f80975a76aea57a549c3162191 doc: release note for #27826 (Sjors Provoost)
f9fa28788e63e2bd059a21ec0e76ae6903b2a6be Use LogBlockHeader for compact blocks (Sjors Provoost)
bad7c914793134abe2f64d96c367d5e9b07e60fd Log which peer sent us a header (Sjors Provoost)
9d3e39c29c31775fd82af319d1d4dfbbd3e21bfa Log block header in net_processing (Sjors Provoost)

Pull request description:

  Fixes #27744

  Since #27278 we log received headers. For compact blocks we also log which peer sent it (e5ce8576349d404c466b2f4cab1ca7bf920904b2), but not for regular headers. That required an additional refactor, which this PR provides.

  Move the logging from validation to net_processing.

  This also reduces the number of log entries (under default configuration) per compact block header from 3 to 2: one for the header and one for the connected tip.

  The PR introduces a new helper method `LogBlockHeader`.

  When receiving a _compact block_ we call `LogBlockHeader` from the exact same place as where we previously logged. So that log message doesn't change. What does change is that we no longer _also_ log from `AcceptBlockHeader`.

  When receiving a regular header(s) message, _we only log the last one_. This is a change in behaviour because it was simpler to implement, but it's probably better anyway. It does mean that if a peer sends of a bunch of headers of which _any_ is invalid, we won't log it (here).

  Lastly I expanded the code comment explaining why we log this. It initially only covered selfish mining, but we also care about peers sending us headers but not following up (see e.g. #27626).

  Example log:

  ```
  2023-06-05T13:12:21Z Saw new header hash=000000000000000000045910263ef84b575ae3af151865238f1e5c619e69c330 height=792964 peer=0
  2023-06-05T13:12:23Z UpdateTip: new best=000000000000000000045910263ef84b575ae3af151865238f1e5c619e69c330 height=792964 version=0x20000000 log2_work=94.223098 tx=848176824 date='2023-06-05T13:11:49Z' progress=1.000000 cache=6.4MiB(54615txo)
  2023-06-05T13:14:05Z Saw new cmpctblock header hash=00000000000000000003c6fd4ef2e1246a3f9e1fffab7247344f94cadb9de979 height=792965 peer=0
  2023-06-05T13:14:05Z UpdateTip: new best=00000000000000000003c6fd4ef2e1246a3f9e1fffab7247344f94cadb9de979 height=792965 version=0x20000000 log2_work=94.223112 tx=848179461 date='2023-06-05T13:13:58Z' progress=1.000000 cache=7.2MiB(61275txo)
  2023-06-05T13:14:41Z Saw new header hash=000000000000000000048e6d69c8399992782d08cb57f5d6cbc81a9f996c3f43 height=792966 peer=8
  2023-06-05T13:14:42Z UpdateTip: new best=000000000000000000048e6d69c8399992782d08cb57f5d6cbc81a9f996c3f43 height=792966 version=0x2db3c000 log2_work=94.223126 tx=848182944 date='2023-06-05T13:14:35Z' progress=1.000000 cache=8.0MiB(69837txo)
  ```

ACKs for top commit:
  danielabrozzoni:
    tACK abe43dfadd6325f80975a76aea57a549c3162191
  achow101:
    ACK abe43dfadd6325f80975a76aea57a549c3162191
  vasild:
    ACK abe43dfadd6325f80975a76aea57a549c3162191

Tree-SHA512: 081e0de62cbd8a0b35cf54daaa09e3e6991d0cc9f706ef3eb50908752fe7815de69b367f7313381c90cd8d5de0ae5f532d1cd54948c5c1133b1832f266d9c232
2025-04-29 14:48:16 -07:00
Ava Chow
4694732bc4
Merge bitcoin/bitcoin#32338: net: remove unnecessary check from AlreadyConnectedToAddress()
f1b142856a4ecd0a0d90bc3d73ef5137997b14ff test: Same addr, diff port is already connected (David Gumberg)
94e85a82a753a0aa5ad688fc46330e83c9a697fe net: remove unnecessary check from AlreadyConnectedToAddress() (Vasil Dimov)

Pull request description:

  `CConnman::AlreadyConnectedToAddress()` searches the existent nodes by address or by address-and-port:

  ```cpp
  FindNode(static_cast<CNetAddr>(addr)) || FindNode(addr.ToStringAddrPort())
  ```

  but:

  * if there is a match by just the address, then the address-and-port search will not be evaluated and the whole condition will be `true`
  * if the there is no node with the same address, then the second search by address-and-port will not find a match either.

  The search by address-and-port is comparing against `CNode::m_addr_name` which could be a hostname, e.g. `"node.foobar.com:8333"`, but `addr.ToStringAddrPort()` is always going to be numeric.

  ---

  In other words: let `A` be "CNetAddr equals" and `B` be "addr:port string matches", then:

  * If `A` (is `true`), then `B` is irrelevant, so the condition `A || B` is equivalent to `A` is `true`.
  * Observation in this PR: if `!A` (`A` is `false`), then `!B` for sure, thus the condition `A || B` is equivalent to `A` is `false`.

  So, simplify `A || B` to `A`.

  https://en.wikipedia.org/wiki/Modus_tollens `!A => !B` is equivalent to `B => A`. So the added fuzz test asserts that if `B` is `true`, then `A` is `true`.

ACKs for top commit:
  davidgumberg:
    crACK f1b142856a4ecd0a0d90bc3d
  achow101:
    ACK f1b142856a4ecd0a0d90bc3d73ef5137997b14ff
  theuni:
    utACK f1b142856a4ecd0a0d90bc3d73ef5137997b14ff
  mzumsande:
    Code Review ACK f1b142856a4ecd0a0d90bc3d73ef5137997b14ff

Tree-SHA512: d744b60e9bace121faa3a746463f6b6e0e6ef08eac0e7879326cbd5f4721e47e6e10f6203dfd3870a2057c4ddd1860692c070ef048a76d773b84e6c2f840cc86
2025-04-29 14:31:59 -07:00
Ava Chow
7db096121d
Merge bitcoin/bitcoin#29039: versionbits refactoring
e3014017bacff42d8d69f3061ce1ee621aaa450a test: add IsActiveAfter tests for versionbits (Anthony Towns)
60950f77c35e54e2884cfc14ab67623f3e325099 versionbits: docstrings for BIP9Info (Anthony Towns)
7565563bc7a5bb98ebf03a7d6881912a74d3f302 tests: refactor versionbits fuzz test (Anthony Towns)
2e4e9b9608c722aaf767638e9dba498d8dc3e772 tests: refactor versionbits unit test (Anthony Towns)
525c00f91bb27d0f2a1b2e5532aebec7fac97d3a versionbits: Expose VersionBitsConditionChecker via impl header (Anthony Towns)
e74a7049b477d1853191ded75fdf25024a6e233f versionbits: Expose StateName function (Anthony Towns)
d00d1ed52c8ee95eeed665d68d6715a694bd4c1f versionbits: Split out internal details into impl header (Anthony Towns)
37b9b67a39554465104c9cf1a74690f40019dbad versionbits: Simplify VersionBitsCache API (Anthony Towns)
1198e7d2fd665bf2bc49fd26773d4fd5fbc2b716 versionbits: Move BIP9 status logic for getblocktemplate to versionbits (Anthony Towns)
b1e967c3ec92738affb22d3b58483ebcdd8dfea2 versionbits: Move getdeploymentinfo logic to versionbits (Anthony Towns)
3bd32c20550e69688a4ff02409fb34b9a637b9c4 versionbits: Move WarningBits logic from validation to versionbits (Anthony Towns)
5da119e5d0e61f0b583f0fe21b9a00ee815a3e46 versionbits: Change BIP9Stats to uint32_t types (Anthony Towns)
a679040ec19ef17f3f03988a52207f1c03af701e consensus/params: Move version bits period/threshold to bip9 param (Anthony Towns)
e9d617095d4ce9525a4337d33624cac9d6b4abe6 versionbits: Remove params from AbstractThresholdConditionChecker (Anthony Towns)
9bc41f1b48b2e0cc6abf9714e860a29989d7809c versionbits: Use std::array instead of C-style arrays (Anthony Towns)

Pull request description:

  Increases the encapsulation/modularity of the versionbits code, moving more of the logic into the versionbits module rather than having it scattered across validation and rpc code. Updates unit/fuzz tests to test the actual code used rather than just a close approximation of it.

ACKs for top commit:
  achow101:
    ACK e3014017bacff42d8d69f3061ce1ee621aaa450a
  TheCharlatan:
    Re-ACK e3014017bacff42d8d69f3061ce1ee621aaa450a
  darosior:
    ACK e3014017bacff42d8d69f3061ce1ee621aaa450a

Tree-SHA512: 2978db5038354b56fa1dd6aafd511099e9c16504d6a88daeac2ff2702c87bcf3e55a32e2f0a7697e3de76963b68b9d5ede7976ee007e45862fa306911194496d
2025-04-29 14:06:45 -07:00
Ava Chow
51d76634fb
Merge bitcoin/bitcoin#32365: descriptors: Reject + sign while parsing unsigned
fa655da159876861251d1149a5c31a830bd35596 test: [refactor] Use ToIntegral in CheckInferDescriptor (MarcoFalke)
fa55dd01df8384e0d57fbb442d170c8a60d0260b descriptors: Reject + sign when parsing multi threshold (MarcoFalke)
fa6f77ed3c152e0ff695c36b7a4ebb2c2efe916f descriptors: Reject + sign in ParseKeyPathNum (MarcoFalke)

Pull request description:

  As a follow-up to https://github.com/bitcoin/bitcoin/pull/30577, reject `+` for unsigned values in key-path parsing and multi threshold parsing as well.

  Both of those are using unsigned, and Bitcoin Core would never serialize a descriptor string with a stray `+`. Accepting stray `+` signs could lead to checksum mismatches, or other incompatibilities later on.

  Just like https://github.com/bitcoin/bitcoin/pull/30577, both changes are breaking changes on the RPC interface, but hopefully no one should be relying on this behavior in production. Similarly, both changes should be fine for the wallet, because it normalizes the strings on import, see https://github.com/bitcoin/bitcoin/pull/30577#pullrequestreview-2218436014.

ACKs for top commit:
  achow101:
    ACK fa655da159876861251d1149a5c31a830bd35596
  brunoerg:
    code review ACK fa655da159876861251d1149a5c31a830bd35596
  janb84:
    tACK [fa655da](fa655da159)

Tree-SHA512: d0c7262a167f7ba98b44ed8bf49ff4c15a1eb647cbac39a59b83c7cc379903c24dae3996e5f557497eb08e16d7121417916147058d97bdf168cd6eada57dceef
2025-04-29 10:25:21 -07:00
merge-script
c5e44a0435
Merge bitcoin/bitcoin#32369: test: Use the correct node for doubled keypath test
32d55e28af69ef09094ba921289bf4d1ad79905a test: Use the correct node for doubled keypath test (Ava Chow)

Pull request description:

  #29124 had a silent merge conflict with #32350 which resulted in it using the wrong node. Fix the test to use the correct v22 node.

ACKs for top commit:
  maflcko:
    lgtm ACK 32d55e28af69ef09094ba921289bf4d1ad79905a
  rkrux:
    ACK 32d55e28af69ef09094ba921289bf4d1ad79905a
  BrandonOdiwuor:
    Code Review ACK 32d55e28af69ef09094ba921289bf4d1ad79905a

Tree-SHA512: 1e0231985beb382b16e1d608c874750423d0502388db0c8ad450b22d17f9d96f5e16a6b44948ebda5efc750f62b60d0de8dd20131f449427426a36caf374af92
2025-04-29 09:59:42 +01:00
Ava Chow
32d55e28af test: Use the correct node for doubled keypath test 2025-04-28 14:44:17 -07:00
Ava Chow
65714c162c
Merge bitcoin/bitcoin#32327: test: Add missing check for empty stderr in util tester
fadf12a56c294696052c4cb6ee5284030ada7498 test: Add missing check for empty stderr in util tester (MarcoFalke)

Pull request description:

  Now that wine support was removed from the CI in 25b56fd9b469f8e5d36f0132c3b79a5214e3372a, it can probably be removed from the util tester as well.

  If someone really needs this, they can comment the new check out, or submit a patch to add an option/env var to silence the new check.

ACKs for top commit:
  achow101:
    ACK fadf12a56c294696052c4cb6ee5284030ada7498
  i-am-yuvi:
    tACK fadf12a56c294696052c4cb6ee5284030ada7498
  BrandonOdiwuor:
    Code Review ACK fadf12a56c294696052c4cb6ee5284030ada7498
  ismaelsadeeq:
    Tested ACK fadf12a56c294696052c4cb6ee5284030ada7498

Tree-SHA512: d9e4d7a7f724e114391070ea7f17b585a7e4c4f3221c3bf510eeb11df6ccd089b881ab5654adfef8d3a1f8fa7ec6bf5e3a3feeb0cdfe724a8f3e5a146c388e66
2025-04-28 14:43:32 -07:00
merge-script
a4eee6d50b
Merge bitcoin/bitcoin#29124: test: Test that migration automatically repairs corrupted metadata with doubled derivation path
c7e2b9e2644442b147880becb8a659f3d00092d9 tests: Test migration cleans up bad inactive chain derivation path (Ava Chow)

Pull request description:

  A bug in 0.21.x and 22.x resulted in some wallets having invalid derivation paths that are the concatenation of two derivation paths. These appear only when inactive hd chains are topped up.

  Since key metadata is a legacy wallet only record, migrating legacy wallets to descriptor wallets will fix this issue as all key metadata records are deleted. The derivation path information is derived on-the-fly from the descriptor that is produced for the inactive hd chain.

  Thus we only need a test to verify that the derivation paths are good, and that all key metadata records are deleted from the migrated wallet.

ACKs for top commit:
  murchandamus:
    re-ACK c7e2b9e2644442b147880becb8a659f3d00092d9 via range-diff:
  rkrux:
    re-ACK c7e2b9e2644442b147880becb8a659f3d00092d9
  furszy:
    utACK c7e2b9e2644442b147880becb8a659f3d00092d9

Tree-SHA512: 3117c4a43798972109fe2d3539341a8b69db70c6457fcabdd019e6044834dc4b17212abbc006d7b8008f560dce4b7856142b057981b9404f406d58fa0955cbd9
2025-04-28 17:13:42 -04:00
Ava Chow
af6cffa36d
Merge bitcoin/bitcoin#32350: test: Slim down previous releases bdb check
fa58f40b898ba6c57655bf38a241fb10107d4a3a test: Slim down previous releases bdb check (MarcoFalke)

Pull request description:

  The check iterates over several previous BDB-only releases to check that descriptor wallets are considered "corrupt" when loading. It is unclear why this needs to be done for more than one release.

  Avoid the confusion by removing the unused releases from the test and from the download script.

ACKs for top commit:
  achow101:
    ACK fa58f40b898ba6c57655bf38a241fb10107d4a3a
  rkrux:
    ACK fa58f40b898ba6c57655bf38a241fb10107d4a3a

Tree-SHA512: 8084392481bfe1fba9b80bb865ffbdfa454e9e6e14e02c39fa3f61c1a596b1def2c531c5da1c7566e5fddb77ac7e56f19feabaaf9b5af043fa6c230d9e2370b5
2025-04-28 12:56:22 -07:00
Ava Chow
33e6538b30
Merge bitcoin/bitcoin#32360: test: Force named args for RPCOverloadWrapper optional args
fa48be3ba443d2436f754265b86331f84b866130 test: Force named args for RPCOverloadWrapper optional args (MarcoFalke)
aaaa45399ca3f9a5ed19c176b25e3165e1e4e0d9 test: Remove unused createwallet_passthrough (MarcoFalke)
cccc1f4e91902f2e95481630fd534b8c72452b44 test: Remove unused RPCOverloadWrapper is_cli field (MarcoFalke)

Pull request description:

  This can avoid bugs and makes the test code easier to read, because the
  order of positional args does not have to be known or assumed.

  Also, contains two commits to remove dead code.

ACKs for top commit:
  achow101:
    ACK fa48be3ba443d2436f754265b86331f84b866130
  rkrux:
    tACK fa48be3ba443d2436f754265b86331f84b866130
  janb84:
    tACK [fa48be3](fa48be3ba4)

Tree-SHA512: d938fbc18be5035ad0d0e1ad2bf7297b2b66ede3bb2d3f10b8d27aa2a19d27a897b024a5f5a2a1cceca467837890729c26054928cb06acbe282b9e9eea94ae69
2025-04-28 12:41:00 -07:00
merge-script
3a29ba33dc
Merge bitcoin/bitcoin#32357: depends: Fix cross-compiling qt package from macOS to Windows
35e57fbe336cdcb348ff088fc04216f1f5cf2742 depends: Fix cross-compiling `qt` package from macOS to Windows (Hennadii Stepanov)

Pull request description:

  Native packages cannot be used during cross-compiling. However, Qt still unconditionally tries to find them, which causes issues in some cases, such as when [cross-compiling from macOS to Windows](https://github.com/bitcoin/bitcoin/issues/32346).

  This PR explicitly disables this unnecessary Qt behaviour.

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

  Here is a full workflow on my macOS Sequoia 15.4.1 (Intel):
  ```
  % brew install make cmake ninja mingw-w64 nsis
  % gmake -C depends -j 10 HOST=x86_64-w64-mingw32
  % cmake -B build --toolchain depends/x86_64-w64-mingw32/toolchain.cmake
  % cmake --build build -j 10 -t deploy
  ```

ACKs for top commit:
  shahsb:
    ACK 35e57fbe33
  fanquake:
    ACK 35e57fbe336cdcb348ff088fc04216f1f5cf2742

Tree-SHA512: 2822fb49bc84dd094dbd189d8a9ca0f023e1e48127db7beaefb9db92de53df63bb0f399c9c430c33941f9a9ee6976b9161d80467d889f7717385b9d1ea9fee43
2025-04-28 16:15:13 +01:00
MarcoFalke
fa655da159
test: [refactor] Use ToIntegral in CheckInferDescriptor 2025-04-28 17:05:43 +02:00
MarcoFalke
fa55dd01df
descriptors: Reject + sign when parsing multi threshold 2025-04-28 17:05:37 +02:00
MarcoFalke
fa6f77ed3c
descriptors: Reject + sign in ParseKeyPathNum 2025-04-28 17:05:36 +02:00
Lőrinc
7e8ef959d0 refactor: Fix Sonar rule cpp:S4998 - avoid unique_ptr const& as parameter
Changed `FindChallenges()` parameter from `const std::unique_ptr<const Node<Key>>&` to const `Node*`.

Sonar rule `cpp:S4998` - https://sonarcloud.io/project/issues?issueStatuses=OPEN%2CCONFIRMED&branch=32351-8c0e673c4ac31c1c04750756de749fb813b2c33f&id=aureleoules_bitcoin&open=AZZ2q88IvFhp-eMuMy96:
> Replace this use of "unique_ptr" by a raw pointer or a reference (possibly const).
> Function parameters should not be of type "std::unique_ptr<T> const &" cpp:S4998
> Software qualities impacted: Maintainability
2025-04-28 16:10:35 +02:00
Lőrinc
e400ac5352 refactor: simplify repeated comparisons in FindChallenges
This obviates that the LHS of the comparison is always the same
2025-04-28 16:09:34 +02:00
Lőrinc
f670836112 test: remove old recursive FindChallenges_recursive implementation
The performance of the test is the same as before, with the recursive method.
2025-04-28 15:47:01 +02:00
Lőrinc
b80d0bdee4 test: avoid stack overflow in FindChallenges via manual iteration
The original recursive `FindChallenges` explores the Miniscript node tree using depth-first search. Specifically, it performs a pre-order traversal (processing the node's data, then recursively visiting children from left-to-right). This recursion uses the call stack, which can lead to stack overflows on platforms with limited stack space, particularly noticeable in Windows debug builds.

This change replaces the recursive implementation with an iterative version using an explicit stack. The iterative version also performs a depth-first search and processes the node's data before exploring children (preserving pre-order characteristics), although the children are explored in right-to-left order due to the LIFO nature of the explicit stack.
Critically, both versions collect challenges into a `std::set`, which automatically deduplicates and sorts elements. This ensures that not only the final result, but the actual state of the set at any equivalent point in traversal remains identical, despite the difference in insertion order.

This iterative approach is an alternative to increasing the default stack size (as proposed in #32349) and directly addresses the stack overflow issue reported in #32341 by avoiding deep recursion.

The change is done in two commits:
* add a new iterative `FindChallenges` method and rename the old method to `*_recursive` (to simplify removal in the next commit), asserting that its result matches the original;
* Remove the original recursive implementation.

This approach avoids needing to suppress `misc-no-recursion` warnings and provides a portable, low-risk fix.

Using a `std::set` is necessary for deduplication, matching the original function's behavior. An experiment using an `std::vector` showed duplicate challenges being added, confirming the need for the set:
Example failure with vector:
  Recursive (set):
    (6, 9070746)
    (6, 19532513)
    (6, 3343376967)
  Iterative (vector attempt):
    (6, 19532513)
    (6, 9070746)
    (6, 3343376967)
    (6, 9070746) // Duplicate

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2025-04-28 15:46:59 +02:00
MarcoFalke
fa48be3ba4
test: Force named args for RPCOverloadWrapper optional args
This can avoid bugs and makes the test code easier to read, because the
order of positional args does not have to be known or assumed.
2025-04-28 15:15:05 +02:00
MarcoFalke
aaaa45399c
test: Remove unused createwallet_passthrough 2025-04-28 15:14:52 +02:00
merge-script
f409444d02
Merge bitcoin/bitcoin#32071: build: Drop option to disable hardening.
77e553ab6a0a98d065884a83490f28eec6df0e23 build: refactor: hardening flags -> core_interface (David Gumberg)
00ba3ba30341a9073049125334f176d6c05d1b54 build: Drop option for disabling hardening (David Gumberg)
f57db75e91dec7e57a7eecfd5f6c914f278bc543 build: Use `-z noseparate-code` on NetBSD < 11.0 (David Gumberg)

Pull request description:

  Follow up to #32038 which dropped `NO_HARDEN` from depends builds, this PR drops the `ENABLE_HARDENING` build option since disabling hardening of binaries should not be a supported or maintained use case. With this change, hardening flags are always enabled.

  Individual hardening flags and options can still be disabled by appending flags, e.g.:

  ```bash
  cmake -B build \
    -DAPPEND_CPPFLAGS='-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -fno-stack-protector -fcf-protection=none -fno-stack-clash-protection' \
    -DAPPEND_LDFLAGS='-Wl,-z,lazy -Wl,-z,norelro -Wl,-z,noseparate-code'
  ```

  There is an issue with NetBSD 10.0's dynamic linker that makes one of the hardening linker flags, `-z separate-code`, [problematic](https://github.com/bitcoin/bitcoin/pull/28724#issuecomment-2589347934), so this PR also introduces a check to prevent the use of this flag in NetBSD versions < 11.0, (where this issue is [fixed](acf7fb3abf)). The fix for this [might be backported](https://mail-index.netbsd.org/tech-userlevel/2023/01/05/msg013670.html) to NetBSD 10.0.

  I suggest reviewing the diff with whitespace changes hidden (`git diff -w` or using github's hide whitespace option)

ACKs for top commit:
  hebasto:
    re-ACK 77e553ab6a0a98d065884a83490f28eec6df0e23.
  laanwj:
    re-ACK 77e553ab6a0a98d065884a83490f28eec6df0e23
  janb84:
    ACK [77e553a](77e553ab6a)
  vasild:
    ACK 77e553ab6a0a98d065884a83490f28eec6df0e23
  musaHaruna:
    tested ACK [77e553](77e553ab6a)

Tree-SHA512: b149fb0371d12312c140255bf674c2bdc9f5272a5750a5b9ec5f192323364bb2ea8e164af13b9ab981ab3aa7ceb91b7a64785081e7458470e81c2f5228abf7b1
2025-04-28 13:32:16 +01:00
MarcoFalke
cccc1f4e91
test: Remove unused RPCOverloadWrapper is_cli field 2025-04-28 10:18:59 +02:00
Hennadii Stepanov
d62c2d82e1
Merge bitcoin/bitcoin#32353: doc: Fix fuzz test_runner.py path
61f238e84ac6d24d8f420c2eabcbb2980d7fcb1e doc: Fix fuzz test_runner.py path (monlovesmango)

Pull request description:

  This commit fixes the path listed in the documentation for the fuzz testing test_runner.py. Previously the --help option worked but running fuzz tests from the documented path did not.

ACKs for top commit:
  kevkevinpal:
    ACK [61f238e](61f238e84a)
  maflcko:
    lgtm ACK 61f238e84ac6d24d8f420c2eabcbb2980d7fcb1e
  mabu44:
    Tested ACK 61f238e84ac6d24d8f420c2eabcbb2980d7fcb1e
  hebasto:
    ACK 61f238e84ac6d24d8f420c2eabcbb2980d7fcb1e.

Tree-SHA512: e8770f38e49a428e0e7f0450db193ec90cc1e66c05bcde307763c065ac7051f3f05923bb3e0eca7a337da9c14cfd17512ff0d01ffa330796159d4f3552103b7f
2025-04-27 16:16:21 +01:00
Hennadii Stepanov
35e57fbe33 depends: Fix cross-compiling qt package from macOS to Windows 2025-04-26 17:13:16 +01:00
Hennadii Stepanov
d2ac748e9e
Merge bitcoin-core/gui#864: Crash fix, disconnect numBlocksChanged() signal during shutdown
71656bdfaa6bfe08ce9651246a3ef606f923351b gui: crash fix, disconnect numBlocksChanged() signal during shutdown (furszy)

Pull request description:

  Aiming to fix bitcoin-core/gui#862.

  The crash stems from the order of the shutdown procedure:
  We first unset the client model, then destroy the wallet controller—but we leave
  the internal wallet models (`m_wallets`) untouched for a brief period. As a result,
  there’s a point in time where views still have connected signals and access to
  wallet models that are not connected to any wallet controller.
  Now.. since the `clientModel` is only replaced with nullptr locally and not destroyed
  yet, signals like `numBlocksChanged` can still emit. Thus, when wallet views receive
  them, they see a non-null wallet model ptr, and proceed to call backend functions
  from a model that is being torn down.

  As the shutdown procedure begins by unsetting `clientModel` from all views. It’s safe
  to ignore events when `clientModel` is nullptr.

ACKs for top commit:
  maflcko:
    lgtm ACK 71656bdfaa6bfe08ce9651246a3ef606f923351b
  pablomartin4btc:
    re-ACK 71656bdfaa6bfe08ce9651246a3ef606f923351b
  hebasto:
    ACK 71656bdfaa6bfe08ce9651246a3ef606f923351b, I have reviewed the code and it looks OK.

Tree-SHA512: e6a369c40aad8a5a3da64e92daa10250006f60c53feef353a5580e1bdb17fe8e1ad102abf5419ddeff1caa703b69ab634265ef3b9cfef87e9304f97bfdd2c4aa
2025-04-26 13:45:31 +01:00
Luke Dashjr
524f981bb8 Bugfix: Miner: Don't reuse block_reserved_weight for "block is full enough to give up" weight delta
PR #30356 incorrectly changed a constant of `4000` to `m_options.coinbase_max_additional_weight` in the check for when to give up finding another transaction to fill the block:

```diff
             if (nConsecutiveFailed > MAX_CONSECUTIVE_FAILURES && nBlockWeight >
-                    m_options.nBlockMaxWeight - 4000) {
+                    m_options.nBlockMaxWeight - m_options.block_reserved_weight) {
                 // Give up if we're close to full and haven't succeeded in a while
                 break;
             }
```

But this constant did not deal with the reserved weight at all. It was in fact simply checking if the block was close to full, and if so, giving up finding another transaction to pad it with after `MAX_CONSECUTIVE_FAILURES` failed attempts.

It doesn't seem very logical to reuse the reserve weight for this purpose, and it would be overcomplicated to add yet another setting, so this PR changes it to a new constexpr.
2025-04-26 07:45:12 +00:00
Hennadii Stepanov
de90b47ea0
Merge bitcoin-core/gui#868: Replace stray tfm::format to cerr with qWarning
edd46566bd66cea7d7f4116429fe1c11d2187ba2 qt: Replace stray tfm::format to cerr with qWarning (laanwj)

Pull request description:

  GUI warnings should go to the log, not to the console (which may not be connected at all).

ACKs for top commit:
  hebasto:
    ACK edd46566bd66cea7d7f4116429fe1c11d2187ba2, I have reviewed the code and it looks OK.

Tree-SHA512: 32944e00dae0c62bb23e3d7abd486b63e445702483ca03c74c3057ef942f06e771d4d3d3a58fd728582889d6b638fae11ecc536a25febfd89a28522b7d6d08ba
2025-04-26 07:56:23 +01:00
monlovesmango
61f238e84a doc: Fix fuzz test_runner.py path
This commit fixes the path listed in the documentation for the fuzz
testing test_runner.py. Previously the --help option worked but running
fuzz tests from the documented path did not.
2025-04-25 16:33:58 +00:00
Ava Chow
c7e2b9e264 tests: Test migration cleans up bad inactive chain derivation path
A bug in 0.21.x and 22.x resulted in some wallets having invalid
derivation paths that are the concatenation of two derivation paths.
These appear only when inactive hd chains are topped up.

Since key metadata is a legacy wallet only record, migrating legacy
wallets to descriptor wallets will fix this issue as all key metadata
records are deleted. The derivation path information is derived
on-the-fly from the descriptor that is produced for the inactive hd
chain.

Thus we only need a test to verify that the derivation paths are good,
and that all key metadata records are deleted from the migrated wallet.
2025-04-25 09:12:53 -07:00
MarcoFalke
fa58f40b89
test: Slim down previous releases bdb check 2025-04-25 16:04:07 +02:00
David Gumberg
f1b142856a
test: Same addr, diff port is already connected 2025-04-25 15:20:34 +02:00
Vasil Dimov
94e85a82a7
net: remove unnecessary check from AlreadyConnectedToAddress()
`CConnman::AlreadyConnectedToAddress()` searches the existent nodes by
address or by address-and-port:

```cpp
FindNode(static_cast<CNetAddr>(addr)) || FindNode(addr.ToStringAddrPort())
```

but:

* if there is a match by just the address, then the address-and-port
  search will not be evaluated and the whole condition will be `true`
* if the there is no node with the same address, then the second search
  by address-and-port will not find a match either.

The search by address-and-port is comparing against `CNode::m_addr_name`
which could be a hostname, e.g. `"node.foobar.com:8333"`, but
`addr.ToStringAddrPort()` is always going to be numeric.
2025-04-25 15:12:03 +02:00
merge-script
80e6ad9e30
Merge bitcoin/bitcoin#31250: wallet: Disable creating and loading legacy wallets
17bb63f9f9b08e6af60c089234fe878657dbc88e wallet: Disallow loading legacy wallets (Ava Chow)
9f04e02ffaee0fe64027dc56c7bea3885254321a wallet: Disallow creating legacy wallets (Ava Chow)
6b247279b72df17b1510241d75c970bc0514cbe2 wallet: Disallow legacy wallet creation from the wallet tool (Ava Chow)
5e93b1fd6c1e9e3aeaebcc688cdf667c61f9f305 bench: Remove WalletLoadingLegacy benchmark (Ava Chow)
56f959d829e90c8495968609eec4169502d6efc2 wallet: Remove wallettool salvage (Ava Chow)
7a41c939f05f2208c33e8f09eecbbfd579fb4023 wallet: Remove -format and bdb from wallet tool's createfromdump (Ava Chow)
c847dee1488a294c9a9632a00ba1134b21e41947 test: remove legacy wallet functional tests (Ava Chow)
20a9173717b1aa0d0706894f8bda47492e1d71a9 test: Remove legacy wallet tests from wallet_reindex.py (Ava Chow)
446d480cb22c6645ac75981dad180b579ef3283d test: Remove legacy wallet tests from wallet_backwards_compatibility.py (Ava Chow)
aff80298d05cfb26d142884c82538e9207938dae test: wallet_signer.py bdb will be removed (Ava Chow)
f94f9399ac476ae2996b2eb94a56e433a170a192 test: Remove legacy wallet unit tests (Ava Chow)
d9ac9dbd8ef57ad6e8e1716614025fdcfd098fb5 tests, gui: Use descriptors watchonly wallet for watchonly test (Ava Chow)

Pull request description:

  To prepare for the deletion of legacy wallet code, disable creating or loading new legacy wallets.

  Tests for the legacy wallet specifically are deleted.

  Split from https://github.com/bitcoin/bitcoin/pull/28710

ACKs for top commit:
  Sjors:
    re-ACK 17bb63f9f9b08e6af60c089234fe878657dbc88e
  pablomartin4btc:
    re-ACK 17bb63f9f9b08e6af60c089234fe878657dbc88e
  laanwj:
    re-ACK 17bb63f9f9b08e6af60c089234fe878657dbc88e

Tree-SHA512: d7a86df1f71f12451b335f22f7c3f0394166ac3f8f5b81f6bbf0321026e2e8ed621576656c371d70e202df1be4410b2b1c1acb5d5f0c341e7b67aaa0ac792e7c
2025-04-25 13:11:24 +01:00
merge-script
971952588d
Merge bitcoin/bitcoin#32242: guix: Remove unused file package
513e2020a9acdd366d4933780b331f97bac85597 guix: Remove unused `file` package (Hennadii Stepanov)

Pull request description:

  The `file` utility has not been required since Guix builds were introduced in https://github.com/bitcoin/bitcoin/pull/15277.

  My Guix build:
  ```
  feeb8da87994724878ac8a62a6e9bfb9b1ece855f336327c900214d84d0a2bb9  guix-build-513e2020a9ac/output/aarch64-linux-gnu/SHA256SUMS.part
  216b287ffbff054a14e60e14b3376acb8cd41dd224223ecd508bd46efad020ba  guix-build-513e2020a9ac/output/aarch64-linux-gnu/bitcoin-513e2020a9ac-aarch64-linux-gnu-debug.tar.gz
  3e68be5a329cbf5f389ca0dde51c1b1dd16b63ec26f42b8aa97dbd455ee3f30e  guix-build-513e2020a9ac/output/aarch64-linux-gnu/bitcoin-513e2020a9ac-aarch64-linux-gnu.tar.gz
  da2d239a78e7ceaa944bd20d15118577daf5cb3817cde4bfe39ea014707326bd  guix-build-513e2020a9ac/output/arm-linux-gnueabihf/SHA256SUMS.part
  0c05b2ab0cd048d4b3b66b97f433895ca0258a68485d641a1c7aaec198114a59  guix-build-513e2020a9ac/output/arm-linux-gnueabihf/bitcoin-513e2020a9ac-arm-linux-gnueabihf-debug.tar.gz
  8cf7ff862c9eccfa7ebfb573674485082b5b797f0a8e9ba058156d3131b144fd  guix-build-513e2020a9ac/output/arm-linux-gnueabihf/bitcoin-513e2020a9ac-arm-linux-gnueabihf.tar.gz
  9464457cb7832b1805a25bb86cdc7c8670dd3c02333e229470d5348c587a73b8  guix-build-513e2020a9ac/output/arm64-apple-darwin/SHA256SUMS.part
  21f0b343cfd5a85f5b563e92931b254874a6dfad21eec91d40b485320ea37a27  guix-build-513e2020a9ac/output/arm64-apple-darwin/bitcoin-513e2020a9ac-arm64-apple-darwin-codesigning.tar.gz
  e34a91173eae3b5ebb6dfa5ca39aa5bb782a2bfd30331edfa0075edda766ac7b  guix-build-513e2020a9ac/output/arm64-apple-darwin/bitcoin-513e2020a9ac-arm64-apple-darwin-unsigned.tar.gz
  6c42015d14fb82f124450498299db15147ee3d93d5192f2fa45d700db9ef0fb9  guix-build-513e2020a9ac/output/arm64-apple-darwin/bitcoin-513e2020a9ac-arm64-apple-darwin-unsigned.zip
  ddd176d8fcf325c23cb1d9c17933f651b26ce3ef13d1c4962460b3bfdb9fd7ff  guix-build-513e2020a9ac/output/dist-archive/bitcoin-513e2020a9ac.tar.gz
  92af97145e0dbeac11a49da48e567f3ee6e08c88c17aa434f10dc4ae13125a57  guix-build-513e2020a9ac/output/powerpc64-linux-gnu/SHA256SUMS.part
  fe980f2d4a6a6c567f447bd86221887ea3f9dcceb14a42e20f9cb8682ff66efe  guix-build-513e2020a9ac/output/powerpc64-linux-gnu/bitcoin-513e2020a9ac-powerpc64-linux-gnu-debug.tar.gz
  41c9f8c46acafec1c80fc1727eddeb8e0373ef06ffc221b16af82b6d61b9c49a  guix-build-513e2020a9ac/output/powerpc64-linux-gnu/bitcoin-513e2020a9ac-powerpc64-linux-gnu.tar.gz
  42051e97efd6178630c65bd398db075342d2c4722f97ec774b4e506b28f7e83b  guix-build-513e2020a9ac/output/riscv64-linux-gnu/SHA256SUMS.part
  f136a82ee58d10db1360d3aa00e695c8e4017db483fe84080e8050efe4436042  guix-build-513e2020a9ac/output/riscv64-linux-gnu/bitcoin-513e2020a9ac-riscv64-linux-gnu-debug.tar.gz
  78d23a7b622e894fa150706a5981ef0bf5ec35b93caaaafdd4aa95c76689ca14  guix-build-513e2020a9ac/output/riscv64-linux-gnu/bitcoin-513e2020a9ac-riscv64-linux-gnu.tar.gz
  7faaa7151d85482a48c73416f0efc124f92fdf26ef232ec0dc9aa131661b2aa8  guix-build-513e2020a9ac/output/x86_64-apple-darwin/SHA256SUMS.part
  13b1bb0026c2441903210f13e61be6220abb75f50dd775bb0bea3bc388ed047c  guix-build-513e2020a9ac/output/x86_64-apple-darwin/bitcoin-513e2020a9ac-x86_64-apple-darwin-codesigning.tar.gz
  80296525f4c797b24e0ac9617ef1e3d4edbce638be3dee823face9554ba9f373  guix-build-513e2020a9ac/output/x86_64-apple-darwin/bitcoin-513e2020a9ac-x86_64-apple-darwin-unsigned.tar.gz
  58a2a3f7335a61c68f7023aa6e2668a958ea2a4acf241c0c9968866ca5da1a21  guix-build-513e2020a9ac/output/x86_64-apple-darwin/bitcoin-513e2020a9ac-x86_64-apple-darwin-unsigned.zip
  511e2f63b1f25e7c4309d8328cd9fa09b8b65dbcce8124334f89445f127f1fd2  guix-build-513e2020a9ac/output/x86_64-linux-gnu/SHA256SUMS.part
  6458af46a7960b668651c59a2a0fef9d44c3c17489fad06f92ca2c43a60b2b23  guix-build-513e2020a9ac/output/x86_64-linux-gnu/bitcoin-513e2020a9ac-x86_64-linux-gnu-debug.tar.gz
  f259a3364bcc3a35346498fb224e061d37d30555aa263fe74bc45e701fb4c9a6  guix-build-513e2020a9ac/output/x86_64-linux-gnu/bitcoin-513e2020a9ac-x86_64-linux-gnu.tar.gz
  246ea6cb2218518c490f9a92bcd1dcb5589ed50f11b3713e4d2721990e655e39  guix-build-513e2020a9ac/output/x86_64-w64-mingw32/SHA256SUMS.part
  beb17556e14916e2af8463090c4f0787e16721961a88ef54975b61dde36d1503  guix-build-513e2020a9ac/output/x86_64-w64-mingw32/bitcoin-513e2020a9ac-win64-codesigning.tar.gz
  85a46d84c0433a50410f1929babc1b22721e8ee7853e57ec5370a072c05146dc  guix-build-513e2020a9ac/output/x86_64-w64-mingw32/bitcoin-513e2020a9ac-win64-debug.zip
  b7191d93cb1524cfd610cee6844119739b9301550b99babb0cefe10546e53445  guix-build-513e2020a9ac/output/x86_64-w64-mingw32/bitcoin-513e2020a9ac-win64-setup-unsigned.exe
  f6615296b46fd064e02fa9b4007e5d59c255595530fc91a8303e417579a7fe80  guix-build-513e2020a9ac/output/x86_64-w64-mingw32/bitcoin-513e2020a9ac-win64-unsigned.zip
  ```

ACKs for top commit:
  janb84:
    Code review and Tested ACK [513e202](513e2020a9)
  fanquake:
    ACK 513e2020a9acdd366d4933780b331f97bac85597

Tree-SHA512: 9c684ad473ba6b298dd50c6fb2fb274aa83f5fbe54f6c3d12cd3b30cbc3f77390966ce9ac3be3f675948642743bac4fb45dcda661400bdfde4f347d300478a2a
2025-04-25 10:54:29 +01:00
merge-script
ff69046e66
Merge bitcoin/bitcoin#32215: depends: Fix cross-compiling on macOS
d0cce4172c041fc9b2910b360fe496b1102b19d2 depends: Fix `mv` command compatibility with macOS (Hennadii Stepanov)
690f5da15a1e368b9ada6f14c6dc15d70dfab2f9 depends: Specify Objective C/C++ compilers for `native_qt` package (Hennadii Stepanov)

Pull request description:

  This PR:
  1. Specifies Objective C/C++ compilers for `native_qt` package.
  2. Removes the `-t` option, which is incompatible with `mv` on macOS.

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

ACKs for top commit:
  janb84:
    ACK [d0cce41](d0cce4172c)
  fanquake:
    ACK d0cce4172c041fc9b2910b360fe496b1102b19d2

Tree-SHA512: a224407f393cc9a90c73ce156674ec90ed74f59104849b312a993218e28f76c3f97335eed6bd5a3e552fd50002a59aa2de775d8ed7557a74c25202a638bfda8c
2025-04-25 10:15:04 +01:00