fuzz: wallet: add target for spkm migration #29694

pull brunoerg wants to merge 1 commits into bitcoin:master from brunoerg:2024-03-fuzz-spkm-migration changing 1 files +79 −0
  1. brunoerg commented at 5:35 pm on March 21, 2024: contributor

    This PR adds a fuzz target for ScriptPubKeyMan migration. It creates a LegacyScriptPubKeyMan which can have some keys/HD keys/scripts/etc, and then migrate it to descriptor.

    I tried to keep it as compatible as possible with future legacy wallet removal.

  2. DrahtBot commented at 5:35 pm on March 21, 2024: contributor

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

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

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

  3. DrahtBot added the label Tests on Mar 21, 2024
  4. fuzz: wallet: add target for spkm migration d0c3ca9269
  5. brunoerg force-pushed on Apr 19, 2024
  6. brunoerg commented at 5:57 pm on May 27, 2024: contributor
    cc: @achow101
  7. in src/wallet/test/fuzz/scriptpubkeyman.cpp:228 in d0c3ca9269
    223+        keys.push_back(key);
    224+    }
    225+
    226+    if (keys.empty()) return;
    227+
    228+    auto& legacy_spkm{*wallet.GetOrCreateLegacyScriptPubKeyMan()};
    


    furszy commented at 10:35 pm on June 16, 2024:
    The legacy spkm class will be deleted soon in #28710. You might need to add a mechanism to mock the bdb reader class just so you can feed the migration process with a hand-crafted LegacyDataSPKM. This will let you avoid crafting the bdb file manually when bdb is not compiled anymore.

    brunoerg commented at 8:36 pm on June 25, 2024:

    You might need to add a mechanism to mock the bdb reader class just so you can feed the migration process with a hand-crafted LegacyDataSPKM. This will let you avoid crafting the bdb file manually when bdb is not compiled anymore.

    You’re right, I’ll move this PR to draft to work on it.

  8. Mazzika1 approved
  9. brunoerg marked this as a draft on Jun 25, 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: 2024-07-03 10:13 UTC

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