46238 Commits

Author SHA1 Message Date
Max Edwards
4664621abe
ci: use a more generic way of finding mt.exe
This sets up a vs developer command prompt and should hopefully should
be more resilient to upstream changes

Co-authored-by: David Gumberg <davidzgumberg@gmail.com>

Github-Pull: #32513
Rebased-From: e1a1b14c9359751a4d0117a27a303d1f1d3ed30f
2026-01-29 14:07:32 +00:00
Max Edwards
aa93758932
ci: remove 3rd party js from windows dll gha job
We can use vswhere.exe directly to create a vs developer
prompt and so can remove this third party dependency.

Co-authored-by: David Gumberg <davidzgumberg@gmail.com>

Github-Pull: #32513
Rebased-From: 7ae0497eef8f5b37fc1184897a5bbc9f023dfa67
2026-01-29 14:07:28 +00:00
Martin Zumsande
290526bc6d
wallet: fix removeprunedfunds bug with conflicting transactions
removeprunedfunds removes all entries from mapTxSpends for the
inputs of the pruned tx. However, this is incorrect, because there could be
multiple entries from conflicting transactions (that shouldn't be
removed as well). This could lead to the wallet creating invalid
transactions, trying to double spend utxos.
The bug persists when the conflicting tx was mined, because
the wallet trusts its internal accounting instead of calling
AddToSpends again.

Github-Pull: #34358
Rebased-From: 1f60ca360eb83fa7982b1aac402eaaf477294197
2026-01-29 09:53:37 +00:00
MarcoFalke
4deda48fa4
build: Remove outdated comment about -ffile-prefix-map
The -ffile-prefix-map option is no longer used and it seems fine to
remove the warning about it possibly breaking coverage builds.

If this needs documentation, the dev notes seem like a better place,
because it also affects other places, such as depends. C.f. commit
407062f2ac93624f350e9e8a4f641c882a2aaf2f

Github-Pull: #34413
Rebased-From: fa2e1b85dd6b263a77294566bd361d7873731045
2026-01-28 14:24:23 +00:00
MarcoFalke
eda6c979bd
doc: Remove outdated -fdebug-prefix-map section in dev notes
The section claims to be for ccache builds, however those are already
fixed after commit 1cc58d3a0c653ac30df04d1010a3cf84c6bc307a.

If there are still any build or debug problems after that commit,
dedicated instructions can be added back, along with exact steps to
reproduce and test.

Github-Pull: #34413
Rebased-From: fa06cd4ba7303bd3036467cf00d12f36c94bcaff
2026-01-28 14:24:19 +00:00
MarcoFalke
c294b66126
build: Temporarily remove confusing and brittle -fdebug-prefix-map
Github-Pull: #34281
Rebased-From: fa37928536e0048a262260baf998ead026b14bb9
2026-01-27 10:15:31 +00:00
fanquake
33195bdd9e
test: allow overriding tar in get_previous_releases
Facilitate use on distros that might have 'tar' as something else, such
as 'gtar', i.e Chimera.

Github-Pull: #34390
Rebased-From: be2b48b9f3e56b672e391e18a09f2d5f4e78d74e
2026-01-27 09:49:27 +00:00
Padraic Slattery
810c75b9b1
chore: Update outdated GitHub Actions versions
Github-Pull: #34344
Rebased-From: 9482f00df0b05e8ef710a7f0fac3262855ce335f
2026-01-23 10:57:42 +00:00
Hennadii Stepanov
de79f7d01c
qa: Fix Windows logging bug
The regex `(.*)` was capturing `\r` from subprocess output on Windows,
causing the closing parenthesis in logs to wrap to the next line.

Stripping whitespace from the regex match fixes the formatting.

Github-Pull: #34282
Rebased-From: 979d41bfab248990d7d520873d17fe52daa8d402
2026-01-15 15:22:26 +00:00
brunoerg
311da7fee3
test: check wallet rescan properly in feature_pruning
Github-Pull: #34185
Rebased-From: 8fb5e5f41ddf550a78b1253184d79a107097815a
2026-01-15 11:22:07 +00:00
brunoerg
4431a60f9c
test: fix feature_pruning when built without wallet
Github-Pull: #34185
Rebased-From: 9b57c8d2bd15a414e08a9e43367d8d3d82c25fe4
2026-01-15 11:22:02 +00:00
Lőrinc
7e1090f5e8
psbt: Fix PSBTInputSignedAndVerified bounds assert
The previous `assert` used `>=`, allowing `input_index == psbt.inputs.size()` and out-of-bounds access in `psbt.inputs[input_index]`.

Found during review: https://github.com/bitcoin/bitcoin/pull/31650#discussion_r2685892867

Github-Pull: #34272
Rebased-From: 2f5b1c5f80590ffa6b5a5bcfb21fddb1dc22e852
2026-01-14 12:19:04 +00:00
Sebastian Falbesoner
22bd00651a
doc: add 433 (Pay to Anchor) to bips.md
Github-Pull: #34252
Rebased-From: 44b12cdb11f0fd3264f24f537a5d6989e4fe96a9
2026-01-14 12:18:36 +00:00
merge-script
4d7d5f6b79
Merge bitcoin/bitcoin#34229: [30.2] Backports & Final
04a996b1a77b5e4c73df27540eca0e1f6587c56e doc: update manual pages for v30.2 (fanquake)
ed355b8f57920714b7cc1775d60f3c4b0098ad04 build: bump version to v30.2 (fanquake)
6c98d68be1478e3420a8e3b093f355ac038fe87c doc: update release notes for v30.2 (fanquake)
6d86b32e780e3df5bcc163ed5c288144aa234b78 guix: Fix `osslsigncode` tests (Hennadii Stepanov)
1dae0027cd43583302c1950492568198f2dcf3a9 wallet: test: Failed migration cleanup (David Gumberg)
9e59047a7e5a6d23520fce156dea2ae6b32415ca test: migration, avoid backup name mismatch in default_wallet_failure (furszy)

Pull request description:

  Backports:
  * #34221
  * #34226
  * #34227

ACKs for top commit:
  hebasto:
    ACK 04a996b1a77b5e4c73df27540eca0e1f6587c56e, I have reviewed the code and it looks OK.
  willcl-ark:
    ACK 04a996b1a77b5e4c73df27540eca0e1f6587c56e
  marcofleon:
    ACK 04a996b1a77b5e4c73df27540eca0e1f6587c56e

Tree-SHA512: 3389b9b629dcb920186b383353fd386bb757967d224e0267501b5e2083dc1e6cba051df6ef646de05c0e58fd43c9f549b9175eefb77fed1fe9ab7d1648b2d9e7
v30.2
2026-01-09 14:04:54 +00:00
fanquake
04a996b1a7
doc: update manual pages for v30.2 2026-01-09 11:23:01 +00:00
fanquake
ed355b8f57
build: bump version to v30.2 2026-01-09 11:17:00 +00:00
fanquake
6c98d68be1
doc: update release notes for v30.2 2026-01-09 11:16:32 +00:00
Hennadii Stepanov
6d86b32e78
guix: Fix osslsigncode tests
Github-Pull: #34227
Rebased-From: 194114daf385a5db50e1507fda79a1a93240d494
2026-01-09 11:15:58 +00:00
David Gumberg
1dae0027cd
wallet: test: Failed migration cleanup
Refactor a common way to perform the failed migration test that exists
for default wallets, and add relative-path wallets and absolute-path
wallets.

Github-Pull: #34226
Rebased-From: eeaf28dbe0e09819ab0e95bb7762b29536bdeef6
2026-01-09 10:11:19 +00:00
furszy
9e59047a7e
test: migration, avoid backup name mismatch in default_wallet_failure
The test calls migrate_and_get_rpc(), which sets mock time internally.
The caller caches a mock time value and later relies on it to predict the
backup filename, so setting the mock time again could cause a naming
mismatch.

Fix this by calling the migration RPC directly. Since the test expects the
migration to fail, migrate_and_get_rpc() is unnecessary here.

Github-Pull: #34221
Rebased-From: cbf0bd35bbf312f3b13d92d281d7112e4b43b9c3
2026-01-08 10:21:49 +00:00
merge-script
abb6ae2ec5
Merge bitcoin/bitcoin#34209: [30.x]: Final backports & 30.2rc1
483d158f538c3d7c1cac30d2b299bc10b256972e doc: update manual pages for v30.2rc1 (fanquake)
747a863f5b6f45f6a4bb8ad6811ef800cf4afb58 build: bump version to v30.2rc1 (fanquake)
cc3cdbe9214f80ab43b66af121fb78abcb9e2d1d doc: update release notes for v30.2rc1 (fanquake)
c4082a45e64d81dda5ec093a8ba3b6dad4b946a8 wallettool: do not use fs::remove_all in createfromdump cleanup (Ava Chow)
185ca0e391aea530db37dd5bbc0e150286083ea9 test: coverage for migration failure when last sync is beyond prune height (furszy)
bc71372c0e3b552fff174772ef9e5c65177405c3 wallet: migration, fix watch-only and solvables wallets names (furszy)
bef4b1fdee1f386662855fb66409c323eee4bae4 wallet: improve post-migration logging (furszy)
ac940ac2ca6d427970b7ebbd8227154cf0159875 test: restorewallet, coverage for existing dirs, unnamed wallet and prune failure (furszy)
8e5c02a77f1b18ae37829200f96ef3fa1cc91246 test: add coverage for unnamed wallet migration failure (furszy)
ac4d0956ccccb43082991d89a8601c39d490d3a5 wallet: fix unnamed wallet migration failure (furszy)
454ac8e7db0f8b2c000b1d2e943bde95dff0127d wallet: RestoreWallet failure, erase only what was created (furszy)

Pull request description:

  Backports:
  * #34156
  * #34215

ACKs for top commit:
  darosior:
    ACK 483d158f538c3d7c1cac30d2b299bc10b256972e
  willcl-ark:
    tACK 483d158f538c3d7c1cac30d2b299bc10b256972e
  janb84:
    ACK 483d158f538c3d7c1cac30d2b299bc10b256972e
  w0xlt:
    ACK 483d158f53
  marcofleon:
    lgtm ACK 483d158f538c3d7c1cac30d2b299bc10b256972e

Tree-SHA512: b43485a8745a663d3a031113a6a266af699b3e70b77f72a0e69ea1986adcaa0ee0d4ce51aacd0fde91611cb4bdba9b6be52e5dca59ff8b12135715b8b1ed5ef2
v30.2rc1
2026-01-07 15:44:56 +00:00
fanquake
483d158f53
doc: update manual pages for v30.2rc1 2026-01-07 14:34:29 +00:00
fanquake
747a863f5b
build: bump version to v30.2rc1 2026-01-07 14:34:28 +00:00
fanquake
cc3cdbe921
doc: update release notes for v30.2rc1 2026-01-07 14:34:24 +00:00
Ava Chow
c4082a45e6
wallettool: do not use fs::remove_all in createfromdump cleanup
Github-Pull: #34215
Rebased-From: f78f6f1dc8e16d5a8a23749e77bc3bf17c91ae42
2026-01-07 14:33:39 +00:00
furszy
185ca0e391
test: coverage for migration failure when last sync is beyond prune height
Github-Pull: #34156
Rebased-From: b7c34d08dd9549a95cffc6ec1ffa4bb4f81e35eb
2026-01-07 11:20:07 +00:00
furszy
bc71372c0e
wallet: migration, fix watch-only and solvables wallets names
Because the default wallet has no name, the watch-only and solvables
wallets created during migration end up having no name either.

This fixes it by applying the same prefix name we use for the backup
file for an unnamed default wallet.

Before: watch-only wallet named "_watchonly"
After:  watch-only wallet named "default_wallet_watchonly"

Github-Pull: #34156
Rebased-From: 82caa8193a3e36f248dcc949e0cd41def191efac
2026-01-07 11:20:04 +00:00
furszy
bef4b1fdee
wallet: improve post-migration logging
Right now, after migration the last message users see is "migration completed",
but the migration isn't actually finished yet. We still need to load the new wallets
to ensure consistency, and if that fails, the migration will be rolled back. This
can be confusing for users.

This change logs the post-migration loading step and if a wallet fails to load and
the migration will be rolled back.

Github-Pull: #34156
Rebased-From: d70b159c42008ac3b63d1c43d99d4f1316d2f1ef
2026-01-07 11:20:00 +00:00
furszy
ac940ac2ca
test: restorewallet, coverage for existing dirs, unnamed wallet and prune failure
The first test verifies that restoring into an existing empty directory
or a directory with no .dat db files succeeds, while restoring into a
dir with a .dat file fails.

The second test covers restoring into the default unnamed wallet
(wallet.dat), which also implicitly exercises the recovery path used
after a failed migration.

The third test covers failure during restore on a prune node. When
the wallet last sync was beyond the pruning height.

Github-Pull: #34156
Rebased-From: f011e0f0680a8c39988ae57dae57eb86e92dd449
2026-01-07 11:19:57 +00:00
furszy
8e5c02a77f
test: add coverage for unnamed wallet migration failure
Verifies that a failed migration of the unnamed (default) wallet
does not erase the main /wallets/ directory, and also that the
backup file exists.

Github-Pull: #34156
Rebased-From: 36093bde63286e19821a9e62cdff1712b6245dc7
2026-01-07 11:19:39 +00:00
furszy
ac4d0956cc
wallet: fix unnamed wallet migration failure
When migrating any legacy unnamed wallet, a failed migration would
cause the cleanup logic to remove its parent directory. Since this
type of legacy wallet lives directly in the main '/wallets/' folder,
this resulted in unintentionally erasing all wallets, including the
backup file.

To be fully safe, we will no longer call `fs::remove_all`. Instead,
we only erase the individual db files we have created, leaving
everything else intact. The created wallets parent directories are
erased only if they are empty.
As part of this last change, `RestoreWallet` was modified to allow
an existing directory as the destination, since we no longer remove
the original wallet directory (we only remove the files we created
inside it). This also fixes the restore of top-level default wallets
during failures, which were failing due to the directory existence
check that always returns true for the /wallets/ directory.

This bug started after:
f6ee59b6e2
Previously, the `fs::copy_file` call was failing for top-level wallets,
which prevented the `fs::remove_all` call from being reached.

Github-Pull: #34156
Rebased-From: f4c7e28e80bf9af50b03a770b641fd309a801589
2026-01-07 11:19:35 +00:00
furszy
454ac8e7db
wallet: RestoreWallet failure, erase only what was created
Track what RestoreWallet creates so only those files and directories
are removed during a failure and nothing else. Preexisting paths
must be left untouched.

Note:
Using fs::remove_all() instead of fs::remove() in RestoreWallet does
not cause any problems currently, but the change is necessary for the
next commit which extends RestoreWallet to work with existing directories,
which may contain files that must not be deleted.

Github-Pull: #34156
Rebased-From: 4ed0693a3f2a427ef9e7ad016930ec29fa244995
2026-01-07 11:18:38 +00:00
merge-script
e9f73b8149
Merge bitcoin/bitcoin#34192: [30.x] Backports
f22122bc27b52f4d82fb0a79e5e145f1e4112732 doc: update release notes for v30.x (fanquake)
7568bc3ab08e7a4c9b7bdbf4e14e73f5c5fcbfe1 test: Avoid hard time.sleep(1) in feature_init.py (MarcoFalke)
c065bcd2d7edd79b60c3224911640817b3cb837a init: Signal m_tip_block_cv on Ctrl-C (Ryan Ofsky)
6983c7d7695198b8cefe67b43b7061de93320aa1 test: Test SIGTERM handling during waitforblockheight call (Ryan Ofsky)
8769c718f419519e9267b282475c342bf4688cb9 doc: Update OpenBSD Build Guide (Hennadii Stepanov)
ed0774bd08b83813f162be33672b7d6c7fff9933 doc: update copyright year (fanquake)
f620dde4113924c6153c3d8b6c4210c128761325 fuzz: doc: remove any mention to address_deserialize_v2 (brunoerg)
b734c4026b008f16e318fab7471984c0c1a87e88 guix: reduce allowed exported symbols (fanquake)
7ea855fd551738cabb215e1172097c319574cf8b build: Update minimum required Boost version (Hennadii Stepanov)

Pull request description:

  Backports:
  * #33511
  * #33950
  * #34091
  * #34107
  * #34137
  * #34174
  * #34182

ACKs for top commit:
  willcl-ark:
    ACK f22122bc27b52f4d82fb0a79e5e145f1e4112732
  marcofleon:
    ACK f22122bc27b52f4d82fb0a79e5e145f1e4112732

Tree-SHA512: a4486d331ce8fef07e611188098a965348cdfb081b81e5a2c700e119b1cf3c28cddbeca883ab512a510f6aaa5fc14bf896f70823fa63afcdd0762d9fbda0118b
2026-01-05 17:27:19 +00:00
fanquake
f22122bc27
doc: update release notes for v30.x 2026-01-05 12:09:33 +00:00
MarcoFalke
7568bc3ab0
test: Avoid hard time.sleep(1) in feature_init.py
Github-Pull: #34137
Rebased-From: fa727e3ec984106371eeedb34d7bbbbc3dcce4ff
2026-01-05 12:09:02 +00:00
Ryan Ofsky
c065bcd2d7
init: Signal m_tip_block_cv on Ctrl-C
Signal m_tip_block_cv when Ctrl-C is pressed or SIGTERM is received, the same
way it is currently signalled when the `stop` RPC is called. This lets RPC
calls like `waitforblockheight` and IPC calls like `waitTipChanged` be
interrupted, instead of waiting for their original timeouts and delaying
shutdown.

Historical notes:

- The behavior where `stop` RPC signals `m_tip_block_cv`, but CTRL-C does not,
  has been around since the condition variable was introduced in #30409
  (7eccdaf16081d6f624c4dc21df75b0474e049d2b).
- The signaling was later moved without changing behavior in #30967
  (5ca28ef28bcca1775ff49921fc2528d9439b71ab). This commit moves it again to
  the Interrupt() function, which is probably the place it should have been
  added initially, so it works for Ctrl-C shutdowns as well as `stop`
  shutdowns.
- A Qt shutdown bug calling wait methods was fixed previously in #18452
  (da73f1513a637a9f347b64de66564d6cdb2541f8), and this change updates that
  fix to avoid the hang happening again in Qt.

Github-Pull: #33511
Rebased-From: c25a5e670b27d3b6eb958ce437dbe89678bd1511
2026-01-05 12:07:02 +00:00
Ryan Ofsky
6983c7d769
test: Test SIGTERM handling during waitforblockheight call
Currently when CTRL-C is pressed and there is an active `waitforblockheight`,
or `waitforblock`, or `waitfornewblock` RPC call, or a mining interface
`waitTipChanged` IPC call with a long timeout, the node will not shut down
right away, and will wait for the timeout to be reached before exiting.

This behavior is not ideal and only happens when the node is stopped with
CTRL-C or SIGTERM. When the node is stopped with `bitcoin-cli stop`, the wait
calls are interrupted and the node does shut down right away.

The next commit improves node behavior. This commit just adds test coverage to
simplify the next commit and clarify the change in behavior there.

Github-Pull: #33511
Rebased-From: 6a29f79006a9d60b476893dface5eea8f9bf271c
2026-01-05 12:06:57 +00:00
Hennadii Stepanov
8769c718f4
doc: Update OpenBSD Build Guide
Github-Pull: #34182
Rebased-From: 84d8c52662545b33c0d02c8ac02ae694950ad9d4
2026-01-05 11:58:47 +00:00
fanquake
ed0774bd08
doc: update copyright year
Github-Pull: #34174
Rebased-From: b23b901363c56043c536f32261ac8cb540624a84
2026-01-05 11:41:23 +00:00
brunoerg
f620dde411
fuzz: doc: remove any mention to address_deserialize_v2
Github-Pull: #34091
Rebased-From: caf4843a59a9d2512d69f8fd88a9672112bd80ac
2025-12-31 12:30:48 +00:00
fanquake
b734c4026b
guix: reduce allowed exported symbols
Github-Pull: #33950
Rebased-From: 7b90b4f5bb10e2156709b07e3996f867e2421232
2025-12-31 12:27:29 +00:00
Hennadii Stepanov
7ea855fd55
build: Update minimum required Boost version
Building with Boost 1.73.0 is broken.

Github-Pull: #34107
Rebased-From: f480c1e7177744d11b058c3a9422975d7ec1af46
2025-12-31 12:22:49 +00:00
merge-script
dd47caee82
Merge bitcoin/bitcoin#34092: [30.x] Finalise v30.1
2a21824b1190968ee8ba3120400c00e56be10591 doc: update manual pages for v30.1 (fanquake)
57264431ff900b7846076a01a79241b352811365 build: bump version to v30.1 (fanquake)
26294d627eb540496d6323e9074f92bb7ae1f3ac doc: update release notes for v30.1 (fanquake)

Pull request description:

  Finalise `v30.1`.

ACKs for top commit:
  waketraindev:
    ACK 2a21824b11
  hebasto:
    ACK 2a21824b1190968ee8ba3120400c00e56be10591, I have reviewed the code and it looks OK.
  brunoerg:
    code review ACK 2a21824b1190968ee8ba3120400c00e56be10591
  janb84:
    ACK 2a21824b1190968ee8ba3120400c00e56be10591
  w0xlt:
    Code Review ACK 2a21824b11

Tree-SHA512: 622d289db49c793fcb7b415d5113495eb824dc87780b082ccd5c43e37d116dca5a606340979a77cad1bfdbfac2c5fd5f18262746ed0e492d9e87bb0d802386ee
v30.1
2025-12-18 15:54:33 +00:00
fanquake
2a21824b11
doc: update manual pages for v30.1 2025-12-17 15:40:17 +00:00
fanquake
57264431ff
build: bump version to v30.1 2025-12-17 15:29:05 +00:00
fanquake
26294d627e
doc: update release notes for v30.1 2025-12-17 15:27:46 +00:00
merge-script
b1499ddf8b
Merge bitcoin/bitcoin#33997: [30.x] Backports & 30.1rc1
d59ebac7187dceb60f880ee3d2c5fab8368da176 doc: update manual pages for v30.1rc1 (fanquake)
b83d4f7c5723095cbf268ce8dc60bd703eb8950c build: bump version to v30.1rc1 (fanquake)
b26c93a9dfa56cac5d86a5c3e25a055ced4d91ce doc: update release notes for v30.1rc1 (fanquake)
18f3ada0379a321414a37ea65af05266412fede3 Remove unreliable seed from chainparams.cpp, and the associated README (SatsAndSports)
187e3b89b54203e850fb15d4dd5e7124704c5cfd [test] wallet send 3 generation TRUC (glozow)
ab58b2c0f8cf20dcbefba095308e9da2cc24b0ec [wallet] never try to spend from unconfirmed TRUC that already has ancestors (glozow)
d872277db5ae4a6e93f5ca8b36273743c6150b6c contrib: fix manpage generation (fanquake)
2256f8965e474dc7553de3554c76ea42baecd351 contrib: rename gen-sdk to gen-sdk.py (fanquake)
5408e8514575bfbb04474ae7b9a7d2f919f2dea3 macdeploy: disable compression in macOS gen-sdk script (fanquake)
338570de5c07abeb8a62b24ca667c72308d747f1 contrib: more selectively pick files for macOS SDK (fanquake)

Pull request description:

  Backports:
  * #32009
  * #33528
  * #33723
  * #33996

  Prior `30.x` backports in #33609.

ACKs for top commit:
  hebasto:
    re-ACK d59ebac7187dceb60f880ee3d2c5fab8368da176.
  marcofleon:
    ACK d59ebac7187dceb60f880ee3d2c5fab8368da176

Tree-SHA512: 41656dc7c2e7a023325b288ff38cf95877a3c223ed5c6defc1c0939b725fb5423455583881f283aff14821bc4fea5a4d4d0ac458cab6450eb9b1bc7730fc027c
v30.1rc1
2025-12-05 14:44:42 +00:00
fanquake
d59ebac718
doc: update manual pages for v30.1rc1 2025-12-05 09:46:37 +00:00
fanquake
b83d4f7c57
build: bump version to v30.1rc1 2025-12-05 09:46:37 +00:00
fanquake
b26c93a9df
doc: update release notes for v30.1rc1 2025-12-05 09:46:37 +00:00