wallet: Migrate non-HD keys with single combo containing a list of keys #26627

pull achow101 wants to merge 6 commits into bitcoin:master from achow101:migrate-nonhd-key-list changing 6 files +270 −42
  1. achow101 commented at 8:12 PM on December 2, 2022: member

    Based on #26626

    This PR changes the legacy to descriptor wallet migration from creating a new combo() for every individual key to creating one large combo() that has a list of every key. This improves the performance of the migrated wallet as it will only have one DescriptorSPKM for all of the non-HD keys.

    Note that this does not affect previously migrated wallets. Such wallets will still have a combo() for every key.

  2. DrahtBot commented at 8:12 PM on December 2, 2022: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #28333 (wallet: Construct ScriptPubKeyMans with all data rather than loaded progressively by achow101)
    • #22838 (descriptors: Be able to specify change and receiving in a single descriptor string by achow101)

    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.

  3. DrahtBot added the label Wallet on Dec 2, 2022
  4. achow101 marked this as a draft on Dec 2, 2022
  5. achow101 force-pushed on Dec 2, 2022
  6. achow101 force-pushed on Dec 12, 2022
  7. achow101 force-pushed on Jan 26, 2023
  8. achow101 force-pushed on Jan 26, 2023
  9. achow101 force-pushed on Jan 26, 2023
  10. DrahtBot added the label Needs rebase on Feb 1, 2023
  11. achow101 force-pushed on Feb 1, 2023
  12. DrahtBot removed the label Needs rebase on Feb 1, 2023
  13. DrahtBot added the label Needs rebase on Feb 16, 2023
  14. achow101 force-pushed on Feb 16, 2023
  15. DrahtBot removed the label Needs rebase on Feb 16, 2023
  16. DrahtBot added the label Needs rebase on Feb 17, 2023
  17. achow101 force-pushed on Feb 17, 2023
  18. DrahtBot removed the label Needs rebase on Feb 17, 2023
  19. darosior commented at 11:47 AM on March 22, 2023: member

    Wouldn't #20018 address most performance concerns of having a large number of DescriptorSPKMs? Albeit at the cost of a slightly higher memory footprint, especially in this case.

  20. achow101 commented at 3:59 PM on March 22, 2023: member

    Wouldn't #20018 address most performance concerns of having a large number of DescriptorSPKMs? Albeit at the cost of a slightly higher memory footprint, especially in this case.

    Yes, but these approaches aren't mutually exclusive, and I'd like to get feedback on both.

  21. DrahtBot added the label Needs rebase on May 8, 2023
  22. achow101 force-pushed on May 8, 2023
  23. DrahtBot removed the label Needs rebase on May 8, 2023
  24. DrahtBot added the label Needs rebase on May 15, 2023
  25. achow101 force-pushed on May 15, 2023
  26. DrahtBot removed the label Needs rebase on May 15, 2023
  27. achow101 force-pushed on May 15, 2023
  28. DrahtBot added the label CI failed on May 15, 2023
  29. DrahtBot removed the label CI failed on May 16, 2023
  30. achow101 force-pushed on May 27, 2023
  31. achow101 force-pushed on May 30, 2023
  32. DrahtBot added the label CI failed on May 30, 2023
  33. DrahtBot removed the label CI failed on May 31, 2023
  34. DrahtBot added the label CI failed on Jul 4, 2023
  35. descriptors: Add ListPubkeyProvider for lists of single keys
    ListPubkeyProvider is a ranged PubkeyProvider that returns individual
    public keys that it was constructed with.
    ec94996d99
  36. descriptors: Add key expression for list of public keys
    A new KEY expression is introduced which takes a list of non-ranged
    public keys. This expression itself is ranged and can provide the key at
    a particular index. It can take any KEY as long as it is not ranged.
    29c53f908a
  37. tests: Test descriptors with list of keys ee4c4bc588
  38. descriptors: Change pos to uint32_t 1488496613
  39. bench: Add a benchmark for ismine ee06828304
  40. wallet: Migrate non-HD keys to single combo with list of keys
    Instead of having several thousand individual combo descriptors, have a
    single large combo descriptor with a list of keys. This will improve
    performance in IsMine and other similar areas.
    dd1c9af2da
  41. achow101 force-pushed on Jul 21, 2023
  42. achow101 closed this on Sep 21, 2023

  43. bitcoin locked this on Sep 20, 2024

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: 2026-04-18 09:13 UTC

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