Merge bitcoin/bitcoin#33186: wallet, test: Ancient Wallet Migration from v0.14.3 (no-HD and Single Chain)

ea59f17220 test: cover v0.14.3 wallet migration (w0xlt)
18b8afd093 test: support v0.14.x in dumb_sync_blocks (w0xlt)

Pull request description:

  This PR adds test coverage for migrating legacy Bitcoin Core wallets from v0.14.3 (released in 2017) to the descriptor wallet format. The test validates that users can safely upgrade their wallets while preserving all funds, transaction history, and addresses.

  This test was originally developed on top of #32977, as it was requested in reviews.
  However, since it also increases test coverage, it can be merged independently.

  The test covers two wallet migration scenarios:

  * Non-HD Wallet Migration - Tests migration of non-HD wallets (created with `-usehd=0`)
  * Single Chain HD Wallet Migration - Tests migration of HD wallets from v0.14.3 (`VERSION_HD_BASE`)

  The node v0.14.3 cannot be synced using the normal test framework helpers because it does not have the `syncwithvalidationinterfacequeue` RPC, so the test uses `dumb_sync_blocks` to submit blocks from the ancient node to the modern node before migrating the wallet.

  Each scenario uses its own dedicated old/new node pair, which keeps the setup isolated and makes this testing best managed in a separate file rather than in the existing migration test files.

  On the Windows cross-built CI job, this test is excluded from the main functional test runner and re-run sequentially in an ASCII-only tmpdir, because the v0.14.3 binary cannot handle non-ASCII characters in the temporary directory path.

ACKs for top commit:
  furszy:
    utACK ea59f17220
  pablomartin4btc:
    reACK ea59f17220

Tree-SHA512: 35ef7173e10fe52f20db0d6d1f144c5a1343ff406d294ab7d0e346d79546797f3f145f2893d99bb7b57d71aa14580690ab80eae148ec94b91498eb0938b2d15e
This commit is contained in:
merge-script
2026-08-10 21:51:17 +02:00
4 changed files with 246 additions and 12 deletions

View File

@@ -99,23 +99,26 @@ def run_functional_tests():
f"--tmpdirprefix={workspace / '_ _'}",
"--combinedlogslen=99999999",
*shlex.split(os.environ.get("TEST_RUNNER_EXTRA", "").strip()),
# feature_unsupported_utxo_db.py fails on Windows because of emojis in the test data directory.
# Tests using ancient releases fail on Windows because of emojis in the test data directory.
"--exclude",
"feature_unsupported_utxo_db.py",
"--exclude",
"wallet_ancient_migration.py",
]
run(test_runner_cmd)
# Run feature_unsupported_utxo_db sequentially in ASCII-only tmp dir,
# because it is excluded above due to lack of UTF-8 support in the
# Run ancient release tests sequentially in ASCII-only tmp dir,
# because they are excluded above due to lack of UTF-8 support in the
# ancient release.
cmd_feature_unsupported_db = [
sys.executable,
str(workspace / "test" / "functional" / "feature_unsupported_utxo_db.py"),
"--previous-releases",
"--tmpdir",
str(Path(workspace) / "test_feature_unsupported_utxo_db"),
]
run(cmd_feature_unsupported_db)
for test_name in ["feature_unsupported_utxo_db", "wallet_ancient_migration"]:
cmd = [
sys.executable,
str(workspace / "test" / "functional" / f"{test_name}.py"),
"--previous-releases",
"--tmpdir",
str(workspace / f"test_{test_name}"),
]
run(cmd)
def run_unit_tests():