{
 "number": 34909,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/34909",
 "title": "wallet, refactor: modularise wallet by extracting out legacy wallet migration",
 "author": "rkrux",
 "author_association": "MEMBER",
 "created_at": "2026-03-24T13:00:36Z",
 "updated_at": "2026-09-17T03:50:35Z",
 "age_days": 177,
 "draft": false,
 "labels": [],
 "milestone": null,
 "base": "master",
 "head_sha": "370ebec504ef5d252d61188ab4b9b710c4740cde",
 "head_ref": "wallet-migration",
 "head_repo": "rkrux/bitcoin",
 "head_history": [
  {
   "t": "2026-03-24T13:06:19Z",
   "sha": "902339aa28fed9e31786fc20b770bc90b0b81d4f"
  },
  {
   "t": "2026-03-24T13:10:55Z",
   "sha": "d41f17f99188db13ff205093b043009033a68ac7"
  },
  {
   "t": "2026-03-25T11:01:58Z",
   "sha": "1b3fc52e249f3950a09cf3e4d84449813886d20f"
  },
  {
   "t": "2026-03-25T11:32:37Z",
   "sha": "8723a4f06dc553b1d868c47733b5e82358f3585f"
  },
  {
   "t": "2026-04-22T14:20:29Z",
   "sha": "ecaef3d2bfc4260cde19608ae3f707823f06b872"
  },
  {
   "t": "2026-04-22T14:46:45Z",
   "sha": "7b873340e00007f29f444bd060977c0671e4fb6b"
  },
  {
   "t": "2026-04-23T09:43:10Z",
   "sha": "e9f50dbf71131ae980d1f3344c653e831144ee15"
  },
  {
   "t": "2026-04-23T09:51:04Z",
   "sha": "fa7fb5a09f97360d9b92de504e80b4480bd591e0"
  },
  {
   "t": "2026-05-05T09:23:38Z",
   "sha": "0f33f64120eed641c57e05f455c1b17acd5a5af6"
  },
  {
   "t": "2026-05-22T09:49:55Z",
   "sha": "5350537fd2d1d8da8f3ca8d2c4141ed7a953f9be"
  },
  {
   "t": "2026-05-22T10:57:38Z",
   "sha": "98602085e3639c6cfd8e51a331e85eb2abd7284c"
  },
  {
   "t": "2026-05-29T11:15:34Z",
   "sha": "5447bdf536bda8ee4023aa93c37195935b7a890c"
  },
  {
   "t": "2026-06-15T14:44:23Z",
   "sha": "0446427b8ce06de8d8f99e8650ae545fc36ce473"
  },
  {
   "t": "2026-06-25T09:28:17Z",
   "sha": "9df71e0b45bda37e665d9b4fea63ae7d67309e5d"
  },
  {
   "t": "2026-06-25T09:31:28Z",
   "sha": "c0d25cd3e19b7f18417fbd52c978c1a91f432241"
  },
  {
   "t": "2026-07-07T12:38:16Z",
   "sha": "56b532324bed0db62ed6ead8f26c344b96482a92"
  },
  {
   "t": "2026-08-11T10:11:24Z",
   "sha": "e10469bfdf0028d15efbe21e2e7e328492194901"
  },
  {
   "t": "2026-09-02T10:34:03Z",
   "sha": "640e8b1d60af7fa7584f6ed97a533df2bd3a4116"
  },
  {
   "t": "2026-09-12T12:23:36Z",
   "sha": "1637ee533abf26a747d491d17d9624728f31f03d"
  },
  {
   "t": "2026-09-14T14:06:35Z",
   "sha": "370ebec504ef5d252d61188ab4b9b710c4740cde"
  }
 ],
 "additions": 864,
 "deletions": 832,
 "changed_files": 16,
 "commit_count": 5,
 "size_bucket": "XL",
 "mergeable_state": "clean",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {
    "concept_ack": [
     {
      "login": "pablomartin4btc",
      "url": "https://github.com/bitcoin/bitcoin/pull/34909#pullrequestreview-4492046409"
     }
    ]
   },
   "conflicts": [
    {
     "number": 36133,
     "title": "wallet: store multipath descriptor",
     "author": "Sjors"
    },
    {
     "number": 35998,
     "title": "wallet: Handle or explicitly ignore `WalletBatch` write failures",
     "author": "achow101"
    },
    {
     "number": 35752,
     "title": "wallet: make encryption state updates atomic",
     "author": "l0rinc"
    },
    {
     "number": 35716,
     "title": "wallet: Replace mapWallet and wtxOrdered with a boost::multi_index",
     "author": "achow101"
    },
    {
     "number": 34603,
     "title": "wallet: Fix detection of symlinks on Windows",
     "author": "achow101"
    },
    {
     "number": 33034,
     "title": "wallet: Store transactions in a separate sqlite table",
     "author": "achow101"
    },
    {
     "number": 32895,
     "title": "wallet: Prepare for future upgrades by recording versions of last client to open and decrypt",
     "author": "achow101"
    },
    {
     "number": 29700,
     "title": "kernel, refactor: return error status on all fatal errors",
     "author": "ryanofsky"
    },
    {
     "number": 27865,
     "title": "wallet: Track no-longer-spendable TXOs separately",
     "author": "achow101"
    },
    {
     "number": 26022,
     "title": "Add util::ResultPtr class",
     "author": "ryanofsky"
    },
    {
     "number": 25665,
     "title": "refactor: Add util::Result failure types and ability to merge result values",
     "author": "ryanofsky"
    }
   ]
  }
 },
 "acks_parsed": {
  "pablomartin4btc": {
   "kind": "concept_ack",
   "hash": null,
   "t": "2026-06-13T21:17:28Z",
   "stale": false
  }
 },
 "acks_tally": {
  "ack": 0,
  "stale_ack": 0,
  "concept_ack": 1,
  "approach_ack": 0,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 0,
  "changes_requested": 0,
  "distinct_reviewers": [
   "fanquake",
   "pablomartin4btc"
  ]
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "clean",
  "last_author_activity": "2026-09-14T14:06:39Z",
  "last_reviewer_activity": "2026-06-13T21:17:28Z",
  "last_reviewer": "pablomartin4btc",
  "author_silent_days": 3,
  "waiting_on_author_days": 0,
  "days_since_update": 0
 },
 "refs": {
  "mentioned": [
   28333,
   32489,
   34544,
   34681,
   34806,
   34910,
   35266,
   35414,
   35436,
   35501,
   35935
  ],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [
   {
    "number": 28333,
    "type": "pull",
    "state": "closed",
    "merged": true,
    "merged_at": "2026-05-28",
    "title": "wallet: Construct ScriptPubKeyMans with all data rather than loaded progressively"
   },
   {
    "number": 32489,
    "type": "pull",
    "state": "closed",
    "merged": true,
    "merged_at": "2026-07-03",
    "title": "wallet: Add `exportwatchonlywallet` RPC to export a watchonly version of a wallet"
   },
   {
    "number": 34544,
    "type": "pull",
    "state": "closed",
    "merged": true,
    "merged_at": "2026-05-02",
    "title": "wallet: Disallow wallet names that are paths including `..` and `.` elements"
   },
   {
    "number": 34681,
    "type": "pull",
    "state": "closed",
    "merged": true,
    "merged_at": "2026-09-14",
    "title": "wallet: move rescan logic into ChainScanner and wallet/scan"
   },
   {
    "number": 34806,
    "type": "pull",
    "state": "closed",
    "merged": true,
    "merged_at": "2026-05-22",
    "title": "refactor: logging: Various API improvements"
   },
   {
    "number": 34910,
    "type": "pull",
    "state": "closed",
    "merged": false,
    "merged_at": null,
    "title": "wallet, refactor: rename file from migrate to legacybdb"
   },
   {
    "number": 35266,
    "type": "pull",
    "state": "closed",
    "merged": true,
    "merged_at": "2026-06-24",
    "title": "rpc, wallet: add an option to not load the wallet after migrating"
   },
   {
    "number": 35414,
    "type": "pull",
    "state": "closed",
    "merged": true,
    "merged_at": "2026-06-15",
    "title": "iwyu: Fix warnings in `src/bench` and treat them as error"
   },
   {
    "number": 35436,
    "type": "pull",
    "state": "closed",
    "merged": true,
    "merged_at": "2026-09-14",
    "title": "wallet: Add addHDkey interface"
   },
   {
    "number": 35501,
    "type": "pull",
    "state": "closed",
    "merged": true,
    "merged_at": "2026-08-04",
    "title": "wallet: store all witness variants of a transaction"
   },
   {
    "number": 35935,
    "type": "pull",
    "state": "closed",
    "merged": true,
    "merged_at": "2026-09-12",
    "title": "wallet: Avoid unnecessary wtxvariant rewrites"
   }
  ],
  "conflicts": [
   36133,
   35998,
   35752,
   35716,
   34603,
   33034,
   32895,
   29700,
   27865,
   26022,
   25665
  ]
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [],
 "body": "I've been meaning to scratch this itch for quite some time. It has been noted\nby many developers that the `wallet/wallet.cpp` file is quite hard to reason\nabout.\n\nIt is more than 4500 lines long currently and this patch is an attempt to\nshortern it by around 800 lines by extracting out the wallet migration code into\na dedicated `wallet/migration.cpp` file.\n\nThe other benefits of this PR I see are that it moves the legacy wallet stuff\nfrom the main wallet file that paves the way for it being descriptor specific\n(as much as possible), and makes legacy wallet migration code a first-class\ncitizen in its own file.\n\nI hope it makes it easier for everyone to go through the main wallet file.\n\nThis patchset **should** be reviewed with --color-moved=dimmed-zebra option.",
 "commits": [
  {
   "sha": "ff45240f4413fb31e7dbe4ae5764515a66981e75",
   "date": "2026-09-14T13:54:08Z",
   "message": "wallet: (move-only) extract out migration specific CWallet methods\n\nFrom wallet/wallet.cpp to wallet/migration.cpp.\n\nThis patch should be reviewed with --color-moved=dimmed-zebra option."
  },
  {
   "sha": "1036c63b35fd1c92d3c5e1e807c670d9def35d33",
   "date": "2026-09-14T13:54:12Z",
   "message": "wallet: extract out utility functions from wallet/wallet\n\nTo wallet/walletutil.h\n\nCouple of functions had to be made non-static for them to be used by\nwallet/wallet.\n\nThis patch should be reviewed with --color-moved=dimmed-zebra option."
  },
  {
   "sha": "c7f988b5fc5580ef99e0eee803500222d598e8cf",
   "date": "2026-09-14T13:59:13Z",
   "message": "wallet: extract out public facing MigrateLegacyToDescriptor functions\n\nTo wallet/migration. Also, update the includes in the call sites.\n\nThis patch should be reviewed with --color-moved=dimmed-zebra."
  },
  {
   "sha": "1597d9fa30eca92e5256d7d00c3757fdf1286d49",
   "date": "2026-09-14T13:59:17Z",
   "message": "wallet: extract out migration specific LegacySPKM CWallet methods\n\nto wallet/migration.\n\nThis patch should be reviewed with --color-moved=dimmed-zebra."
  },
  {
   "sha": "370ebec504ef5d252d61188ab4b9b710c4740cde",
   "date": "2026-09-14T13:59:17Z",
   "message": "wallet, refactor: rename file from migrate to legacybdb\n\nThe wallet/migrate.h|cpp file contain all the code related to the\nBerkeley DB that was used in the legacy wallets. Although it's true\nthat this code is used only within the context of wallet migration\nbut the name of the file is not exact.\n\nThis patch renames the file to legacybdb so that the intent is clearer in the\ncall sites. I felt this rename might be necessary so that the name\ndoesn't conflict with the new migration.cpp introduced in the preceding commits."
  }
 ],
 "timeline": [
  {
   "t": "2026-03-24T13:06:19Z",
   "kind": "force_push",
   "who": "rkrux",
   "commit": "902339aa28fed9e31786fc20b770bc90b0b81d4f"
  },
  {
   "t": "2026-03-24T13:10:55Z",
   "kind": "force_push",
   "who": "rkrux",
   "commit": "d41f17f99188db13ff205093b043009033a68ac7"
  },
  {
   "t": "2026-03-24T13:12:04Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "Fixed two things:\n- the linter issue where the trailing new line at the end of the file was missing.\n- forgot to update the migration portion in bench for which I didn't get an error in local, checking why."
  },
  {
   "t": "2026-03-25T11:01:58Z",
   "kind": "force_push",
   "who": "rkrux",
   "commit": "1b3fc52e249f3950a09cf3e4d84449813886d20f"
  },
  {
   "t": "2026-03-25T11:24:24Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "Pushed an update where three more migration specific `CWallet` methods are extracted out."
  },
  {
   "t": "2026-03-25T11:32:37Z",
   "kind": "force_push",
   "who": "rkrux",
   "commit": "8723a4f06dc553b1d868c47733b5e82358f3585f"
  },
  {
   "t": "2026-04-22T14:20:29Z",
   "kind": "force_push",
   "who": "rkrux",
   "commit": "ecaef3d2bfc4260cde19608ae3f707823f06b872"
  },
  {
   "t": "2026-04-22T14:21:17Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "Rebased over master from [8723a4f](https://github.com/bitcoin/bitcoin/commit/8723a4f06dc553b1d868c47733b5e82358f3585f) to [ecaef3d](https://github.com/bitcoin/bitcoin/commit/ecaef3d2bfc4260cde19608ae3f707823f06b872)."
  },
  {
   "t": "2026-04-22T14:46:45Z",
   "kind": "force_push",
   "who": "rkrux",
   "commit": "7b873340e00007f29f444bd060977c0671e4fb6b"
  },
  {
   "t": "2026-04-22T14:48:23Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "Force pushed to fix the CI failures because of incorrectly resolving conflicts during rebase due to the [changes in this file of this PR](https://github.com/bitcoin/bitcoin/pull/33032/changes#diff-1f2db0e4d5c12d109c7f0962333c245b49b696cb39ff432da048e9d6c08944d8)."
  },
  {
   "t": "2026-04-23T09:43:10Z",
   "kind": "force_push",
   "who": "rkrux",
   "commit": "e9f50dbf71131ae980d1f3344c653e831144ee15"
  },
  {
   "t": "2026-04-23T09:43:45Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "Split the diff into multiple commits to aid review from [7b87334](https://github.com/bitcoin/bitcoin/commit/7b873340e00007f29f444bd060977c0671e4fb6b) to [e9f50db](https://github.com/bitcoin/bitcoin/commit/e9f50dbf71131ae980d1f3344c653e831144ee15)."
  },
  {
   "t": "2026-04-23T09:51:04Z",
   "kind": "force_push",
   "who": "rkrux",
   "commit": "fa7fb5a09f97360d9b92de504e80b4480bd591e0"
  },
  {
   "t": "2026-04-23T09:52:19Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "Fixed [lint failure](https://github.com/bitcoin/bitcoin/actions/runs/24828329553/job/72670043902?pr=34909) due to missing new line in wallet/migration.h."
  },
  {
   "t": "2026-05-05T09:23:38Z",
   "kind": "force_push",
   "who": "rkrux",
   "commit": "0f33f64120eed641c57e05f455c1b17acd5a5af6"
  },
  {
   "t": "2026-05-05T09:24:31Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "Rebased over master to incorporate changes from #34544."
  },
  {
   "t": "2026-05-22T09:49:55Z",
   "kind": "force_push",
   "who": "rkrux",
   "commit": "5350537fd2d1d8da8f3ca8d2c4141ed7a953f9be"
  },
  {
   "t": "2026-05-22T09:50:47Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "Rebased over master to incorporate changes from #34806."
  },
  {
   "t": "2026-05-22T10:34:41Z",
   "kind": "comment",
   "who": "fanquake",
   "assoc": "MEMBER",
   "text": "```bash\n Build FAILED.\n\n\"D:\\a\\bitcoin\\bitcoin\\build\\ALL_BUILD.vcxproj\" (default target) (1) ->\n\"D:\\a\\bitcoin\\bitcoin\\build\\src\\bench\\bench_bitcoin.vcxproj\" (default target) (4) ->\n\"D:\\a\\bitcoin\\bitcoin\\build\\src\\wallet\\bitcoin_wallet.vcxproj\" (default target) (12) ->\n(ClCompile target) ->\n  D:\\a\\bitcoin\\bitcoin\\src\\wallet\\walletutil.cpp(78,14): error C2027: use of undefined type 'UniValue' [D:\\a\\bitcoin\\bitcoin\\build\\src\\wallet\\bitcoin_wallet.vcxproj]\n  D:\\a\\bitcoin\\bitcoin\\src\\wallet\\walletutil.cpp(78,39): error C2027: use of undefined type 'UniValue' [D:\\a\\bitcoin\\bitcoin\\build\\src\\wallet\\bitcoin_wallet.vcxproj]\n  D:\\a\\bitcoin\\bitcoin\\src\\wallet\\walletutil.cpp(79,34): error C2027: use of undefined type 'UniValue' [D:\\a\\bitcoin\\bitcoin\\build\\src\\wallet\\bitcoin_wallet.vcxproj]\n  D:\\a\\bitcoin\\bitcoin\\src\\wallet\\walletutil.cpp(79,26): error C2530: 'value': references must be initialized [D:\\a\\bitcoin\\bitcoin\\build\\src\\wallet\\bitcoin_wallet.vcxproj]\n  D:\\a\\bitcoin\\bitcoin\\src\\wallet\\walletutil.cpp(79,26): error C3531: 'value': a symbol whose type contains 'auto' must have an initializer [D:\\a\\bitcoin\\bitcoin\\build\\src\\wallet\\bitcoin_wallet.vcxproj]\n  D:\\a\\bitcoin\\bitcoin\\src\\wallet\\walletutil.cpp(79,32): error C2143: syntax error: missing ';' before ':' [D:\\a\\bitcoin\\bitcoin\\build\\src\\wallet\\bitcoin_wallet.vcxproj]\n  D:\\a\\bitcoin\\bitcoin\\src\\wallet\\walletutil.cpp(79,59): error C2143: syntax error: missing ';' before ')' [D:\\a\\bitcoin\\bitcoin\\build\\src\\wallet\\bitcoin_wallet.vcxproj]\n  D:\\a\\bitcoin\\bitcoin\\src\\wallet\\walletutil.cpp(82,9): error C2027: use of undefined type 'UniValue' [D:\\a\\bitcoin\\bitcoin\\build\\src\\wallet\\bitcoin_wallet.vcxproj]\n  D:\\a\\bitcoin\\bitcoin\\src\\wallet\\walletutil.cpp(91,14): error C2027: use of undefined type 'UniValue' [D:\\a\\bitcoin\\bitcoin\\build\\src\\wallet\\bitcoin_wallet.vcxproj]\n  D:\\a\\bitcoin\\bitcoin\\src\\wallet\\walletutil.cpp(92,64): error C2027: use of undefined type 'UniValue' [D:\\a\\bitcoin\\bitcoin\\build\\src\\wallet\\bitcoin_wallet.vcxproj]\n  D:\\a\\bitcoin\\bitcoin\\src\\wallet\\walletutil.cpp(92,31): error C2079: 'new_value' uses undefined class 'UniValue' [D:\\a\\bitcoin\\bitcoin\\build\\src\\wallet\\bitcoin_wallet.vcxproj]\n  D:\\a\\bitcoin\\bitcoin\\src\\wallet\\walletutil.cpp(92,64): error C2065: 'VARR': undeclared identifier [D:\\a\\bitcoin\\bitcoin\\build\\src\\wallet\\bitcoin_wallet.vcxproj]\n  D:\\a\\bitcoin\\bitcoin\\src\\wallet\\walletutil.cpp(93,34): error C2027: use of undefined type 'UniValue' [D:\\a\\bitcoin\\bitcoin\\build\\src\\wallet\\bitcoin_wallet.vcxproj]\n  D:\\a\\bitcoin\\bitcoin\\src\\wallet\\walletutil.cpp(93,26): error C2530: 'value': references must be initialized [D:\\a\\bitcoin\\bitcoin\\build\\src\\wallet\\bitcoin_wallet.vcxproj]\n  D:\\a\\bitcoin\\bitcoin\\src\\wallet\\walletutil.cpp(93,26): error C3531: 'value': a symbol whose type contains 'auto' must have an initializer [D:\\a\\bitcoin\\bitcoin\\build\\src\\wallet\\bitcoin_wallet.vcxproj]\n  D:\\a\\bitcoin\\bitcoin\\src\\wallet\\walletutil.cpp(93,32): error C2143: syntax error: missing ';' before ':' [D:\\a\\bitcoin\\bitcoin\\build\\src\\wallet\\bitcoin_wallet.vcxproj]\n  D:\\a\\bitcoin\\bitcoin\\src\\wallet\\walletutil.cpp(93,59): error C2143: syntax error: missing ';' before ')' [D:\\a\\bitcoin\\bitcoin\\build\\src\\wallet\\bitcoin_wallet.vcxproj]\n  D:\\a\\bitcoin\\bitcoin\\src\\wallet\\walletutil.cpp(96,33): error C2027: use of undefined type 'UniValue' [D:\\a\\bitcoin\\bitcoin\\build\\src\\wallet\\bitcoin_wallet.vcxproj]\n  D:\\a\\bitcoin\\bitcoin\\src\\wallet\\walletutil.cpp(97,23): error C2582: 'operator =' function is unavailable in 'UniValue' [D:\\a\\bitcoin\\bitcoin\\build\\src\\wallet\\bitcoin_wallet.vcxproj]\n```"
  },
  {
   "t": "2026-05-22T10:57:38Z",
   "kind": "force_push",
   "who": "rkrux",
   "commit": "98602085e3639c6cfd8e51a331e85eb2abd7284c"
  },
  {
   "t": "2026-05-29T11:15:34Z",
   "kind": "force_push",
   "who": "rkrux",
   "commit": "5447bdf536bda8ee4023aa93c37195935b7a890c"
  },
  {
   "t": "2026-05-29T11:15:40Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "Rebased over master to incorporate changes from #28333."
  },
  {
   "t": "2026-06-13T21:17:28Z",
   "kind": "review",
   "who": "pablomartin4btc",
   "assoc": "MEMBER",
   "state": "COMMENTED",
   "commit": "5447bdf536bda8ee4023aa93c37195935b7a890c",
   "text": "Concept ACK\n\nI see you opened also #34910, wouldn't it make sense to add that commit here?\n\nAs a future consideration, have you thought about whether this structure could accommodate future migration types beyond legacy-to-descriptor, perhaps with a dedicated migration class? Curious if that's something worth exploring as a follow-up."
  },
  {
   "t": "2026-06-15T09:29:44Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nI had raised it separately because that change in itself seemed fine as well and I didn't want the changes of this PR to hold merging that PR. But given that #34910 has not been merged yet, I have cherry-picked that commit here and closed that PR now in favour of this one."
  },
  {
   "t": "2026-06-15T09:38:52Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nI believe the migration is more of a one-off event and the likelihood of adding other migration flows beyond legacy-to-descriptor is very low, so I don't think it's worth introducing a dedicated migration class at this stage."
  },
  {
   "t": "2026-06-15T14:44:23Z",
   "kind": "force_push",
   "who": "rkrux",
   "commit": "0446427b8ce06de8d8f99e8650ae545fc36ce473"
  },
  {
   "t": "2026-06-15T14:45:00Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "Rebased over master to incorporate changes from #35414."
  },
  {
   "t": "2026-06-16T07:00:03Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "The [CI / iwyu (pull_request)](https://github.com/bitcoin/bitcoin/actions/runs/27554400650/job/81597817969?pr=34909) failure is unrelated and should have been fixed post https://github.com/bitcoin/bitcoin/pull/35535."
  },
  {
   "t": "2026-06-25T09:28:17Z",
   "kind": "force_push",
   "who": "rkrux",
   "commit": "9df71e0b45bda37e665d9b4fea63ae7d67309e5d"
  },
  {
   "t": "2026-06-25T09:28:28Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "Rebased over master to incorporate changes from PR #35266."
  },
  {
   "t": "2026-06-25T09:31:28Z",
   "kind": "force_push",
   "who": "rkrux",
   "commit": "c0d25cd3e19b7f18417fbd52c978c1a91f432241"
  },
  {
   "t": "2026-06-25T09:32:54Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "Force-pushed to emphasise in the commit messages that most of the commits should be reviewed with the --color-moved=dimmed-zebra git option."
  },
  {
   "t": "2026-07-07T12:38:16Z",
   "kind": "force_push",
   "who": "rkrux",
   "commit": "56b532324bed0db62ed6ead8f26c344b96482a92"
  },
  {
   "t": "2026-07-07T12:38:52Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "Rebased over master to incorporate changes from #32489."
  },
  {
   "t": "2026-08-11T10:11:24Z",
   "kind": "force_push",
   "who": "rkrux",
   "commit": "e10469bfdf0028d15efbe21e2e7e328492194901"
  },
  {
   "t": "2026-08-11T10:11:58Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "Rebased over master to incorporate changes from #35501."
  },
  {
   "t": "2026-09-02T10:34:03Z",
   "kind": "force_push",
   "who": "rkrux",
   "commit": "640e8b1d60af7fa7584f6ed97a533df2bd3a4116"
  },
  {
   "t": "2026-09-02T10:34:18Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "Rebased over master to fix conflicts."
  },
  {
   "t": "2026-09-12T12:23:36Z",
   "kind": "force_push",
   "who": "rkrux",
   "commit": "1637ee533abf26a747d491d17d9624728f31f03d"
  },
  {
   "t": "2026-09-12T12:23:56Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "Rebased over master to incorporate changes from #35935."
  },
  {
   "t": "2026-09-14T14:06:35Z",
   "kind": "force_push",
   "who": "rkrux",
   "commit": "370ebec504ef5d252d61188ab4b9b710c4740cde"
  },
  {
   "t": "2026-09-14T14:06:39Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "Rebased over master to incorporate changes from #35436 and #34681."
  }
 ],
 "labels_log": [
  {
   "t": "2026-03-24T13:06:59Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-03-24T13:56:22Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-03-25T11:33:29Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-03-25T12:18:23Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-04-19T09:57:29Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-04-22T14:47:47Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-04-23T06:06:58Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-04-23T07:42:05Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-04-23T09:51:53Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-04-23T10:46:05Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-05-02T11:04:01Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-05-05T11:29:29Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-05-22T04:08:50Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-05-22T10:34:31Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-05-22T10:43:59Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-05-22T12:27:20Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-05-28T20:11:07Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-05-29T11:34:00Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-06-15T14:26:41Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-06-15T16:41:04Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-06-15T16:43:23Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-06-16T18:25:41Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-06-24T20:29:29Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-06-25T09:32:04Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-06-25T09:34:33Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-06-25T10:34:10Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-07-03T11:27:43Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-07-07T14:56:17Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-08-04T22:57:29Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-08-11T11:59:08Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-08-18T09:55:20Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-09-02T11:51:23Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-09-12T12:04:15Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-09-12T14:12:13Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-09-14T13:35:34Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-09-14T15:52:59Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  }
 ],
 "state_log": [
  {
   "t": "2026-03-25T11:21:09Z",
   "kind": "renamed",
   "who": "rkrux",
   "from": "wallet, refactor: extract migration portion from the wallet file",
   "to": "wallet, refactor: modularise wallet by extracting out legacy wallet migration "
  },
  {
   "t": "2026-03-25T11:21:14Z",
   "kind": "renamed",
   "who": "DrahtBot",
   "from": "wallet, refactor: modularise wallet by extracting out legacy wallet migration ",
   "to": "wallet, refactor: modularise wallet by extracting out legacy wallet migration"
  }
 ],
 "text_chars": 8722,
 "text_tokens_estimate": 2180,
 "changed_paths": [
  "src/bench/wallet_migration.cpp",
  "src/wallet/CMakeLists.txt",
  "src/wallet/interfaces.cpp",
  "src/wallet/{migrate.cpp => legacybdb.cpp}",
  "src/wallet/{migrate.h => legacybdb.h}",
  "src/wallet/migration.cpp",
  "src/wallet/migration.h",
  "src/wallet/rpc/wallet.cpp",
  "src/wallet/test/db_tests.cpp",
  "src/wallet/test/fuzz/wallet_bdb_parser.cpp",
  "src/wallet/test/wallet_tests.cpp",
  "src/wallet/wallet.cpp",
  "src/wallet/wallet.h",
  "src/wallet/walletdb.cpp",
  "src/wallet/walletutil.cpp",
  "src/wallet/walletutil.h"
 ],
 "files": [
  {
   "path": "src/bench/wallet_migration.cpp",
   "add": 1,
   "del": 0
  },
  {
   "path": "src/wallet/CMakeLists.txt",
   "add": 2,
   "del": 1
  },
  {
   "path": "src/wallet/interfaces.cpp",
   "add": 1,
   "del": 0
  },
  {
   "path": "src/wallet/{migrate.cpp => legacybdb.cpp}",
   "add": 1,
   "del": 1
  },
  {
   "path": "src/wallet/{migrate.h => legacybdb.h}",
   "add": 3,
   "del": 3
  },
  {
   "path": "src/wallet/migration.cpp",
   "add": 722,
   "del": 0
  },
  {
   "path": "src/wallet/migration.h",
   "add": 25,
   "del": 0
  },
  {
   "path": "src/wallet/rpc/wallet.cpp",
   "add": 1,
   "del": 0
  },
  {
   "path": "src/wallet/test/db_tests.cpp",
   "add": 1,
   "del": 1
  },
  {
   "path": "src/wallet/test/fuzz/wallet_bdb_parser.cpp",
   "add": 1,
   "del": 1
  },
  {
   "path": "src/wallet/test/wallet_tests.cpp",
   "add": 1,
   "del": 0
  },
  {
   "path": "src/wallet/wallet.cpp",
   "add": 0,
   "del": 799
  },
  {
   "path": "src/wallet/wallet.h",
   "add": 0,
   "del": 25
  },
  {
   "path": "src/wallet/walletdb.cpp",
   "add": 1,
   "del": 1
  },
  {
   "path": "src/wallet/walletutil.cpp",
   "add": 89,
   "del": 0
  },
  {
   "path": "src/wallet/walletutil.h",
   "add": 15,
   "del": 0
  }
 ],
 "test_lines": 6,
 "git": {
  "head": "370ebec504ef5d252d61188ab4b9b710c4740cde",
  "head_matches_backup": true,
  "base": "76343a09f8025f20ac6ec8dad073132e70ef2b0f",
  "commits": [
   {
    "sha": "ff45240f44",
    "subject": "wallet: (move-only) extract out migration specific CWallet methods",
    "files": 3,
    "add": 320,
    "del": 312
   },
   {
    "sha": "1036c63b35",
    "subject": "wallet: extract out utility functions from wallet/wallet",
    "files": 5,
    "add": 104,
    "del": 93
   },
   {
    "sha": "c7f988b5fc",
    "subject": "wallet: extract out public facing MigrateLegacyToDescriptor functions",
    "files": 8,
    "add": 409,
    "del": 396
   },
   {
    "sha": "1597d9fa30",
    "subject": "wallet: extract out migration specific LegacySPKM CWallet methods",
    "files": 2,
    "add": 23,
    "del": 23
   },
   {
    "sha": "370ebec504",
    "subject": "wallet, refactor: rename file from migrate to legacybdb",
    "files": 6,
    "add": 8,
    "del": 8
   }
  ],
  "patch_truncated": true
 },
 "input_hash": "0dee844f3a8943fe",
 "extracted_at": "2026-09-17T16:15:31+00:00"
}