Backports:
- #33144
- #34451
- #34589
- #34727
- #34750
- #34755
- #34776
- #34787
- #34802
- #34814
- #34815
- #34820
- #34852
- #34832
- #34848
- #34850
- #34857
- #34859
- #34869
- #34870
- #34878
- #34888
Gui:
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
See the guideline for information on the review process.
| Type | Reviewers |
|---|---|
| ACK | Sjors, achow101 |
| Stale ACK | willcl-ark, hebasto |
If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.
Possible places where named args for integral literals may be used (e.g. func(x, /*named_arg=*/0) in C++, and func(x, named_arg=0) in Python):
template.submitSolution(ctx, 0, 0, 0, b"") in test/functional/interface_ipc_mining.py2026-03-25 00:59:20
Github-Pull: #34755
Rebased-From: 168997e9b5720e3c58e2fc1a073d0be3cd39d971
Github-Pull: #34755
Rebased-From: 0ebc6891e2168c3ff1c9ad2250e765446610e75e
Github-Pull: #34802
Rebased-From: fadaa7db335d1b1bd2674c51d89d6c0820ddb887
To work around https://github.com/bitcoin/bitcoin/issues/34810
Github-Pull: #34814
Rebased-From: faae981d354e13de96442159d604a831b6c3a71e
Github-Pull: #34815
Rebased-From: 9a968ad35efe04bfd86299c5dfbc48ada41bc46e
the test silently passes on master because SetupAddressRelay
isn't called by default for inbound connections.
Github-Pull: #34750
Rebased-From: ecb5ce6e76ef9391d636e7e4f6be7e3f7ed05550
since we're bumping mocktime more than CHAIN_SYNC_TIMEOUT = 20 * 60,
it's possible for disconnections like this to happen in the test:
$ test/functional/p2p_addr_relay.py --randomseed=7758649581790797022
...
TestFramework (INFO): Check that we answer getaddr messages only once per connection
TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:58829 due to [Errno 54] Connection reset by peer
...
Github-Pull: #34750
Rebased-From: 7ee8c0abc629f0658b6c36f36b5da11c51cbb39d
we don't need to send GETADDR for initial self announcement
anymore + can construct addr_receivers using
AddrReceiver(send_getaddr=False).
however we would need to send an empty ADDR message to each
of the addr_receivers to initialise addr relay for inbound
connections. so current code is simpler and we can just
clarify the comment.
Github-Pull: #34750
Rebased-From: 57bfa864fe69ea5610399f9db60cf2299930703a
* Show preview and ask for confirmation before git clean unless used with "--force"
* Error out when trying to pass args such as "guix-clean --help"
Github-Pull: #34776
Rebased-From: be6d24ec22cc2ef8086098d6322b024e07c5758c
Github-Pull: #33144
Rebased-From: fa6497ba71e9573d341c1c051af09b3ec2fc8d74
Calling shutil.make_archive(), does not preserve symlinks when using the
zip format, see https://github.com/python/cpython/issues/139679.
Call `zip` using subprocess instead. This code is only run when using a
macos machine, and I think it's safe to assume that zip is available, same
as codesign, and all other tools we call in this script.
Github-Pull: #34787
Rebased-From: ab137cbfe2763f2306e52c7c5f1860d87defc636
Rather than looking for /translations, which might not exist (it doesn't
in a recent brew installed qt on macOS). i.e:
```bash
ls /opt/homebrew/opt/qtbase/share/qt
doc
libexec
metatypes
mkspecs
modules
plugins
sbom
```
Github-Pull: #34787
Rebased-From: 66d80d57b48982d8301e21321a9d82780586908d
Github-Pull: #34787
Rebased-From: d03e3be246f64065002268e74ee9a834089de37a
Replace the hardcoded x86_64 binary name with $(uname --machine) so the
correct binary is downloaded when building the lint container, where at
all possible.
Github-Pull: #34832
Rebased-From: 551875360cdb3b9997dded22b929039eac635fd0
Github-Pull: #34820
Rebased-From: fa9168ffcd6354db6daf759ace123a88fb60cbb2
This should fix https://github.com/bitcoin/bitcoin/issues/34367
I am not familiar with Windows sockets thread-safety, but creating the
event loop on the main thread, and running it in the network thread
could lead to a fast abort in Python on Windows (without any stderr):
```
77/276 - wallet_txn_clone.py failed, Duration: 1 s
stdout:
2025-12-10T08:04:27.500134Z TestFramework (INFO): PRNG seed is: 4018092284830106117
stderr:
Combine the logs and print the last 99999999 lines ...
============
Combined log for D:\a\_temp/test_runner_₿_🏃_20251210_075632/wallet_txn_clone_196:
============
test 2025-12-10T08:04:27.500134Z TestFramework (INFO): PRNG seed is: 4018092284830106117
test 2025-12-10T08:04:27.500433Z TestFramework (DEBUG): Setting up network thread
```
Also, I couldn't find any docs that require the loop must be created on
the thread that runs them:
* https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.new_event_loop
* https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_forever
However, the patch seems trivial to review, harmless, and easy to
revert, so it may be a good try to fix the intermittent Windows Python
crash.
Github-Pull: #34820
Rebased-From: fa050da9805d5388ec74e2e0f92e59e861f11918
Github-Pull: #34852
Rebased-From: 99996f6c06dff19cd99131d0469b84c01c216cbb
This is less confusing than the verbose=0 alias.
Github-Pull: #34852
Rebased-From: faf71d6cb49b8a668c417d80bc56277f30cbf2e1
CMake version 4.3 deprecated the imported target `Sqlite::Sqlite3`.
Use the preferred name `Sqlite3::Sqlite3` instead and provide an
alias for older versions of CMake. Also define the same alias when
using vcpkg.
Github-Pull: #34848
Rebased-From: 498b6eb6b5e8aceb372d3097df2715d9c7fc416b
Fix an assertion failure in gettxoutsetinfo (issue #34263) caused by
capturing the best block before releasing cs_main, then checking it
against a potentially newer best block in GetUTXOStats().
Remove the early pindex capture since ComputeUTXOStats() independently
fetches the current best block under lock. Use stats.hashBlock and
stats.nHeight (the actual computed values) instead of the potentially
stale pindex when building the response.
Github-Pull: #34451
Rebased-From: 5e77072fa60110a00d2bff31798d58b6c10bd3da
Acquire the cursor and block index under the same cs_main lock to
eliminate a potential race where a new block could be connected
between capturing the block info and acquiring the cursor, causing
the reported stats to reference a different block than the one
being iterated.
Github-Pull: #34451
Rebased-From: f3bf63ec4f028cf9ee0820226f44fcbe26d358c9
Github-Pull: #34859
Rebased-From: fa71c6e84c16418ffc5568c06aed863027cb238f
Github-Pull: #34869
Rebased-From: b14f2c76a1f6b41835c134584c82c45704c4cce0
Making sure that if the privacy mode is activaded during
the wallet selection, the transaction view is not shown.
Github-Pull: #gui815
Rebased-From: 0dc337f73d013e342b880746292f1c3247b287cf
1. Use `build_os` instead of `host_os` for native packages.
2. `XCODE_VERSION` is available only for `darwin` hosts. Therefore,
simply disable the Xcode version check for `native_qt`.
Github-Pull: #34878
Rebased-From: 7a9304f8872eb4183a7a74279a7aefcdac25b468
Github-Pull: #34850
Rebased-From: 578525d31d47bad878f8609a04258920b1deab42
This allows to run the test under valgrind:
./bld-cmake/test/functional/feature_dbcrash.py --timeout-factor=10 --valgrind
For testing, the same test can be run multiple times in parallel:
./bld-cmake/test/functional/test_runner.py -j 10 $( printf 'feature_dbcrash.py %.0s' {1..10} ) --timeout-factor=10 --valgrind
(Running the test under valgrind may take several hours!)
I found that before this commit, 9 out of the 10 runs failed via:
```
...
TestFramework (INFO): Iteration 36, generating 2500 transactions [11, 5, 6]
TestFramework (ERROR): Unexpected exception
Traceback (most recent call last):
File "/b-c/test/functional/test_framework/test_framework.py", line 142, in main
self.run_test()
~~~~~~~~~~~~~^^
File "/b-c/bld-cmake/test/functional/feature_dbcrash.py", line 262, in run_test
self.sync_node3blocks(block_hashes)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "/b-c/bld-cmake/test/functional/feature_dbcrash.py", line 151, in sync_node3blocks
nodei_utxo_hash = self.restart_node(i, block_hash)
File "/b-c/bld-cmake/test/functional/feature_dbcrash.py", line 102, in restart_node
raise AssertionError(f"Unable to successfully restart node {node_index} in allotted time")
AssertionError: Unable to successfully restart node 0 in allotted time
```
With this commit, all 10 runs passed.
Github-Pull: #34589
Rebased-From: fadb77169bed77e0df8d42d55599615b916ee6e8
A build with system libs (or with a normal depends build) will fail
with:
```sh
$ valgrind --exit-on-first-error=yes --error-exitcode=1 --quiet ./bld-cmake/bin/test_bitcoin-qt
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
********* Start testing of AppTests *********
Config: Using QtTest library 6.10.2, Qt 6.10.2 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 15.2.0), ubuntu 26.04
PASS : AppTests::initTestCase()
QINFO : AppTests::appTests() Backing up GUI settings to "/tmp/test_common bitcoin/60d474ffae390f81657d/regtest/guisettings.ini.bak"
==18007== Conditional jump or move depends on uninitialised value(s)
==18007== at 0x12655E26: ???
==18007== by 0xCB28E7F: ???
==18007==
==18007==
==18007== Exit program on first error (--exit-on-first-error=yes)
```
A DEBUG=1 depends build would work, but that seems tedious for
questionable benefit.
Github-Pull: #34589
Rebased-From: faf3ef4ee79ba4dc77340f47bf8eb303ef6ac825
valgrind currently does not work on GCC -O2 compiled executables, which
contain std::optional use, due to an upstream bug. See
https://bugs.kde.org/show_bug.cgi?id=472329
One workaround could be to use -O1. However, that seems brittle, as
variantions of the bug were seen with -O1 as well.
So temporarily use clang in the valgrind CI tasks, because this also
allows to drop a false-positive suppression for:
-DCMAKE_CXX_FLAGS='-Wno-error=array-bounds'
Also, update the comment in contrib/valgrind.supp to mention the
background:
* GCC -O2 wasn't tested with the suppressions file, due to the mentioned
bug.
* Clang-17 (or later) on aarch64 wasn't tested due to bug
https://github.com/bitcoin/bitcoin/issues/29635 and the minimum
supported clang version is clang-17 right now.
* GUI isn't tested, because it requires a debug build, see the prior
commit.
This means the only tested config right now is the one mentioned in the
suppression file.
Github-Pull: #34589
Rebased-From: fa70b9ebaa46b5fedcc02200626499d25762d44a
The comparison is evaluated before the assignment, so total_amount
ends up holding a boolean instead of the actual amount:
total_amount = (a - b < c)
which is not what we want here. This has been working by accident.
Github-Pull: #34888
Rebased-From: 0026b330c4abbbbdb96e4f0c4d380d70d8e592ab
When a large cluster of unconfirmed transactions exceeds the limit,
calculateCombinedBumpFee() returns std::nullopt.
Previously, we continued executing and the optional value was
accessed unconditionally, leading to a std::bad_optional_access
exception.
Fix this by returning early when the returned bumped fee is null.
Note:
This is a crash for the GUI, and an uncaught exception for the RPC
bumpfee and psbtbumpfee.
Github-Pull: #34870
Rebased-From: 6072a2a6a1fdde8444e3515f0d201de3fb3923a1
Github-Pull: #34857
Rebased-From: fa30951af5b174a1ee5e1c23d84b115c542a9570
ACK e3d571691ae4a5d799d64fbb945774b57a2e17f7
All backports nice and (fresh and) clean. No release notes, I assume because these are targeted for rc2?
This adds a complementary test to interface_ipc_mining.py to ensure
that createNewBlock() wakes up immediately once submitblock advances
the tip, rather than needlessly waiting for the cooldown timer to
expire on its own.
Github-Pull: #34727
Rebased-From: 4ada575d6c6880f7d302c1f37581a82f394c0b5e
The async routines in both interface_ipc.py and interface_ipc_mining.py
contain redundant code to initialize the mining proxy object.
Move the make_mining_ctx helper into test_framework/ipc_util.py and
update both test files to use it. This removes the boilerplate and
prevents code duplication across the IPC test suite.
Github-Pull: #34727
Rebased-From: 63684d6922e5c034ff620d23c35ba175edae49c4
Add a test case to interface_ipc_mining.py to verify that the IPC
server correctly handles and reports serialization errors rather than
crashing the node.
This covers the scenario where submitSolution is called with data
that cannot be deserialized, as discussed in #33341
Also introduces the assert_capnp_failed helper in ipc_util.py to
cleanly handle macOS-specific Cap'n Proto exception strings, and
refactors an existing block weight test to use it.
Github-Pull: #34727
Rebased-From: e7a918b69a5e6aaf3f02ca84ca6cde14401928ed
The IPC mining tests (interface_ipc_mining.py) currently use
hardcoded timeouts (e.g., 1000ms, 60000ms) for operations like
waitTipChanged and waiting for block templates. In heavily
loaded CI environments, such as those running sanitizers with
high parallelism, these hardcoded timeouts can be too short,
leading to spurious test failures and brittleness.
This commit multiplies these timeout variables by the test
suite's global `self.options.timeout_factor`. This ensures that
the IPC wait conditions scale appropriately when the test suite
is run with a higher timeout factor, making the tests robust
against slow execution environments.
Addresses CI brittleness observed in bitcoin-core/libmultiprocess#253.
Github-Pull: #34727
Rebased-From: ad75b147b5c3ab5eac268a1c1ced23894a8a79ba