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
This commit is contained in:
merge-script 2026-01-09 14:04:54 +00:00
commit 4d7d5f6b79
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1
11 changed files with 94 additions and 44 deletions

View File

@ -30,7 +30,7 @@ set(CLIENT_NAME "Bitcoin Core")
set(CLIENT_VERSION_MAJOR 30)
set(CLIENT_VERSION_MINOR 2)
set(CLIENT_VERSION_BUILD 0)
set(CLIENT_VERSION_RC 1)
set(CLIENT_VERSION_RC 0)
set(CLIENT_VERSION_IS_RELEASE "true")
set(COPYRIGHT_YEAR "2026")

View File

@ -2,6 +2,7 @@
((gnu packages bash) #:select (bash-minimal))
(gnu packages bison)
((gnu packages certs) #:select (nss-certs))
((gnu packages check) #:select (libfaketime))
((gnu packages cmake) #:select (cmake-minimal))
(gnu packages commencement)
(gnu packages compression)
@ -209,7 +210,17 @@ and abstract ELF, PE and MachO formats.")
(base32
"1j47vwq4caxfv0xw68kw5yh00qcpbd56d7rq6c483ma3y7s96yyz"))))
(build-system cmake-build-system)
(inputs (list openssl))
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(if tests?
(invoke "faketime" "-f" "@2025-01-01 00:00:00" ;; Tests fail after 2025.
"ctest" "--output-on-failure" "--no-tests=error")
(format #t "test suite not run~%")))))))
(inputs (list libfaketime openssl))
(home-page "https://github.com/mtrojnar/osslsigncode")
(synopsis "Authenticode signing and timestamping tool")
(description "osslsigncode is a small tool that implements part of the

View File

@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH BITCOIN-CLI "1" "January 2026" "bitcoin-cli v30.2.0rc1" "User Commands"
.TH BITCOIN-CLI "1" "January 2026" "bitcoin-cli v30.2.0" "User Commands"
.SH NAME
bitcoin-cli \- manual page for bitcoin-cli v30.2.0rc1
bitcoin-cli \- manual page for bitcoin-cli v30.2.0
.SH SYNOPSIS
.B bitcoin-cli
[\fI\,options\/\fR] \fI\,<command> \/\fR[\fI\,params\/\fR]
@ -15,7 +15,7 @@ bitcoin-cli \- manual page for bitcoin-cli v30.2.0rc1
.B bitcoin-cli
[\fI\,options\/\fR] \fI\,help <command>\/\fR
.SH DESCRIPTION
Bitcoin Core RPC client version v30.2.0rc1
Bitcoin Core RPC client version v30.2.0
.PP
The bitcoin\-cli utility provides a command line interface to interact with a Bitcoin Core RPC server.
.PP

View File

@ -1,12 +1,12 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH BITCOIN-QT "1" "January 2026" "bitcoin-qt v30.2.0rc1" "User Commands"
.TH BITCOIN-QT "1" "January 2026" "bitcoin-qt v30.2.0" "User Commands"
.SH NAME
bitcoin-qt \- manual page for bitcoin-qt v30.2.0rc1
bitcoin-qt \- manual page for bitcoin-qt v30.2.0
.SH SYNOPSIS
.B bitcoin-qt
[\fI\,options\/\fR] [\fI\,URI\/\fR]
.SH DESCRIPTION
Bitcoin Core version v30.2.0rc1
Bitcoin Core version v30.2.0
.PP
The bitcoin\-qt application provides a graphical interface for interacting with Bitcoin Core.
.PP

View File

@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH BITCOIN-TX "1" "January 2026" "bitcoin-tx v30.2.0rc1" "User Commands"
.TH BITCOIN-TX "1" "January 2026" "bitcoin-tx v30.2.0" "User Commands"
.SH NAME
bitcoin-tx \- manual page for bitcoin-tx v30.2.0rc1
bitcoin-tx \- manual page for bitcoin-tx v30.2.0
.SH SYNOPSIS
.B bitcoin-tx
[\fI\,options\/\fR] \fI\,<hex-tx> \/\fR[\fI\,commands\/\fR]
@ -9,7 +9,7 @@ bitcoin-tx \- manual page for bitcoin-tx v30.2.0rc1
.B bitcoin-tx
[\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR]
.SH DESCRIPTION
Bitcoin Core bitcoin\-tx utility version v30.2.0rc1
Bitcoin Core bitcoin\-tx utility version v30.2.0
.PP
The bitcoin\-tx tool is used for creating and modifying bitcoin transactions.
.PP

View File

@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH BITCOIN-UTIL "1" "January 2026" "bitcoin-util v30.2.0rc1" "User Commands"
.TH BITCOIN-UTIL "1" "January 2026" "bitcoin-util v30.2.0" "User Commands"
.SH NAME
bitcoin-util \- manual page for bitcoin-util v30.2.0rc1
bitcoin-util \- manual page for bitcoin-util v30.2.0
.SH SYNOPSIS
.B bitcoin-util
[\fI\,options\/\fR] [\fI\,command\/\fR]
@ -9,7 +9,7 @@ bitcoin-util \- manual page for bitcoin-util v30.2.0rc1
.B bitcoin-util
[\fI\,options\/\fR] \fI\,grind <hex-block-header>\/\fR
.SH DESCRIPTION
Bitcoin Core bitcoin\-util utility version v30.2.0rc1
Bitcoin Core bitcoin\-util utility version v30.2.0
.PP
The bitcoin\-util tool provides bitcoin related functionality that does not rely on the ability to access a running node. Available [commands] are listed below.
.SH OPTIONS

View File

@ -1,12 +1,12 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH BITCOIN-WALLET "1" "January 2026" "bitcoin-wallet v30.2.0rc1" "User Commands"
.TH BITCOIN-WALLET "1" "January 2026" "bitcoin-wallet v30.2.0" "User Commands"
.SH NAME
bitcoin-wallet \- manual page for bitcoin-wallet v30.2.0rc1
bitcoin-wallet \- manual page for bitcoin-wallet v30.2.0
.SH SYNOPSIS
.B bitcoin-wallet
[\fI\,options\/\fR] \fI\,<command>\/\fR
.SH DESCRIPTION
Bitcoin Core bitcoin\-wallet utility version v30.2.0rc1
Bitcoin Core bitcoin\-wallet utility version v30.2.0
.PP
bitcoin\-wallet is an offline tool for creating and interacting with Bitcoin Core wallet files.
.PP

View File

@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH BITCOIN "1" "January 2026" "bitcoin v30.2.0rc1" "User Commands"
.TH BITCOIN "1" "January 2026" "bitcoin v30.2.0" "User Commands"
.SH NAME
bitcoin \- manual page for bitcoin v30.2.0rc1
bitcoin \- manual page for bitcoin v30.2.0
.SH SYNOPSIS
.B bitcoin
[\fI\,OPTIONS\/\fR] \fI\,COMMAND\/\fR...

View File

@ -1,12 +1,12 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH BITCOIND "1" "January 2026" "bitcoind v30.2.0rc1" "User Commands"
.TH BITCOIND "1" "January 2026" "bitcoind v30.2.0" "User Commands"
.SH NAME
bitcoind \- manual page for bitcoind v30.2.0rc1
bitcoind \- manual page for bitcoind v30.2.0
.SH SYNOPSIS
.B bitcoind
[\fI\,options\/\fR]
.SH DESCRIPTION
Bitcoin Core daemon version v30.2.0rc1 bitcoind
Bitcoin Core daemon version v30.2.0 bitcoind
.PP
The Bitcoin Core daemon (bitcoind) is a headless program that connects to the Bitcoin network to validate and relay transactions and blocks, as well as relaying addresses.
.PP

View File

@ -1,9 +1,9 @@
v30.2rc1 Release Notes
v30.2 Release Notes
===================
Bitcoin Core version v30.2rc1 is now available from:
Bitcoin Core version v30.2 is now available from:
<https://bitcoincore.org/bin/bitcoin-core-30.2/test.rc1/>
<https://bitcoincore.org/bin/bitcoin-core-30.2/>
This release includes new features, various bug fixes and performance
improvements, as well as updated translations.
@ -44,6 +44,7 @@ Notable changes
- #34156 wallet: fix unnamed legacy wallet migration failure
- #34215 wallettool: fix unnamed createfromdump failure walletsdir deletion
- #34221 test: migration, avoid backup name mismatch in default_wallet_failure
### IPC
@ -53,10 +54,12 @@ Notable changes
- #33950 guix: reduce allowed exported symbols
- #34107 build: Update minimum required Boost version
- #34227 guix: Fix osslsigncode tests
### Test
- #34137 test: Avoid hard time.sleep(1) in feature_init.py
- #34226 wallet: test: Relative wallet failed migration cleanup
### Fuzz
@ -77,6 +80,7 @@ Thanks to everyone who directly contributed to this release:
- Ava Chow
- brunoerg
- davidgumberg
- fanquake
- furszy
- Hennadii Stepanov

View File

@ -685,35 +685,61 @@ class WalletMigrationTest(BitcoinTestFramework):
wallet.unloadwallet()
self.clear_default_wallet(backup_file=Path(res["backup_path"]))
def test_default_wallet_failure(self):
self.log.info("Test failure during unnamed (default) wallet migration")
def test_migration_failure(self, wallet_name):
is_default = wallet_name == ""
wallet_pretty_name = "unnamed (default)" if is_default else f'"{wallet_name}"'
self.log.info(f"Test failure during migration of wallet named: {wallet_pretty_name}")
# Preface, set up legacy wallet and unload it
master_wallet = self.master_node.get_wallet_rpc(self.default_wallet_name)
wallet = self.create_legacy_wallet("", blank=True)
wallet = self.create_legacy_wallet(wallet_name, blank=True)
wallet.importaddress(master_wallet.getnewaddress(address_type="legacy"))
wallet.unloadwallet()
# Create wallet directory with the watch-only name and a wallet file.
# Because the wallet dir exists, this will cause migration to fail.
watch_only_dir = self.master_node.wallets_path / "default_wallet_watchonly"
if os.path.isabs(wallet_name):
old_path = master_path = Path(wallet_name)
else:
old_path = self.old_node.wallets_path / wallet_name
master_path = self.master_node.wallets_path / wallet_name
os.makedirs(master_path, exist_ok=True)
shutil.copyfile(old_path / "wallet.dat", master_path / "wallet.dat")
# This will be the watch-only directory the migration tries to create,
# we make migration fail by placing a wallet.dat file there.
wo_prefix = wallet_name or "default_wallet"
# wo_prefix might have path characters in it, this corresponds with
# DoMigration().
wo_dirname = f"{wo_prefix}_watchonly"
watch_only_dir = self.master_node.wallets_path / wo_dirname
os.mkdir(watch_only_dir)
shutil.copyfile(self.old_node.wallets_path / "wallet.dat", watch_only_dir / "wallet.dat")
shutil.copyfile(old_path / "wallet.dat", watch_only_dir / "wallet.dat")
mocked_time = int(time.time())
self.master_node.setmocktime(mocked_time)
assert_raises_rpc_error(-4, "Failed to create database", self.migrate_and_get_rpc, "")
assert_raises_rpc_error(-4, "Failed to create database", self.master_node.migratewallet, wallet_name)
self.master_node.setmocktime(0)
# Verify the /wallets/ path exists
# Verify the /wallets/ path exists.
assert self.master_node.wallets_path.exists()
# Check backup file exists. Because the wallet has no name, the backup is prefixed with 'default_wallet'
backup_path = self.master_node.wallets_path / f"default_wallet_{mocked_time}.legacy.bak"
assert backup_path.exists()
# Verify the original unnamed wallet was restored
assert (self.master_node.wallets_path / "wallet.dat").exists()
# And verify it is still a BDB wallet
self.assert_is_bdb("")
# Test cleanup: clear default wallet for next test
self.clear_default_wallet(backup_path)
# Verify both wallet paths exist.
assert Path(old_path / "wallet.dat").exists()
assert Path(master_path / "wallet.dat").exists()
backup_prefix = "default_wallet" if is_default else os.path.basename(os.path.abspath(master_path))
backup_path = self.master_node.wallets_path / f"{backup_prefix}_{mocked_time}.legacy.bak"
assert backup_path.exists()
self.assert_is_bdb(wallet_name)
# Cleanup
if is_default:
self.clear_default_wallet(backup_path)
else:
backup_path.unlink()
Path(watch_only_dir / "wallet.dat").unlink()
Path(watch_only_dir).rmdir()
Path(master_path / "wallet.dat").unlink()
Path(old_path / "wallet.dat").unlink(missing_ok=True)
def test_direct_file(self):
self.log.info("Test migration of a wallet that is not in a wallet directory")
@ -1631,7 +1657,16 @@ class WalletMigrationTest(BitcoinTestFramework):
self.test_wallet_with_relative_path()
self.test_wallet_with_path("path/to/mywallet/")
self.test_wallet_with_path("path/that/ends/in/..")
self.test_default_wallet_failure()
migration_failure_cases = [
"",
"../",
os.path.abspath(self.master_node.datadir_path / "absolute_path"),
"normallynamedwallet"
]
for wallet_name in migration_failure_cases:
self.test_migration_failure(wallet_name=wallet_name)
self.test_default_wallet()
self.test_default_wallet_watch_only()
self.test_direct_file()