wallet: Set descriptor cache upgraded flag for migrated wallets #33031

pull achow101 wants to merge 2 commits into bitcoin:master from achow101:lasthardened-cache-migratewallet changing 3 files +75 −6
  1. achow101 commented at 10:33 pm on July 21, 2025: member

    #32597 set the descriptor cache upgraded flag for newly created wallets, but migrated wallets still did not have the flag set when they are migrated. For consistency, and to avoid an unnecessary upgrade, we should be setting this flag for migrated wallets.

    The flag would end up being set anyways at the end of migration when the wallet is reloaded as it would perform the automatic upgrade at that time. However, this is unnecessary and we should just set it from the get go.

    This PR also adds a couple tests to verify that the flag is being set, and that the upgrade is being performed.

  2. DrahtBot added the label Wallet on Jul 21, 2025
  3. DrahtBot commented at 10:33 pm on July 21, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33031.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK w0xlt

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #32273 (wallet: Fix relative path backup during migration. by davidgumberg)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  4. tests: Check that the last hardened cache upgrade occurs
    When loading an older wallet without the last hardened cache, an
    automatic upgrade should be performed. Check this in
    wallet_backwards_compatibility.py
    
    When migrating a wallet, the migrated wallet should always have the last
    hardened cache, so verify in wallet_migration.py
    17bf901790
  5. wallet: Always write last hardened cache flag in migrated wallets 4e5faaba82
  6. achow101 force-pushed on Jul 21, 2025
  7. DrahtBot added the label CI failed on Jul 21, 2025
  8. DrahtBot commented at 11:11 pm on July 21, 2025: contributor

    🚧 At least one of the CI tasks failed. Task lint: https://github.com/bitcoin/bitcoin/runs/46428278739 LLM reason (✨ experimental): The CI failure is caused by lint errors due to undefined ‘self’ references in Python test files.

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

  9. DrahtBot removed the label CI failed on Jul 22, 2025
  10. rkrux commented at 1:06 pm on July 25, 2025: contributor
    I deleted my previous updated suggestion regarding importing pysqlite3 because it is not considerably better than the current implementation.

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-07-25 18:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me