no surprise rescan for importprivkey newbie #26115

issue katesalazar opened this issue on September 17, 2022
  1. katesalazar commented at 2:29 AM on September 17, 2022: contributor

    Is your feature request related to a problem? Please describe. Calling importprivkey(1) triggers rescan. Rescan of long chains using bad and old equipment takes many days.

    Describe the solution you'd like Reject importprivkey(1) completely. Deprecate in release i, disable in release i+1 (prompting user to use importprivkey(2) or importprivkey(3)), remove in release i+2.

    Describe alternatives you've considered Make the program so it knows that equipment is old and chain is long, then estimate rescan is large, if so rejecting importprivkey(1) unless confirmed YES when prompted.

    Additional context TBA.

  2. katesalazar added the label Feature on Sep 17, 2022
  3. sipa commented at 2:45 AM on September 17, 2022: member

    importprivkey already doesn't exist for the newer descriptor wallets. You have to use importdescriptor there, which takes as argument a birth date of the key, and only rescans the necessary portion of the chain. Similar functionality is available for legacy wallets using importmulti.

    RPCs are intended for program interaction though, it's very unclear how they could be made interactive like this.

  4. katesalazar commented at 8:19 AM on September 17, 2022: contributor

    Reading importdescriptors help, knowing about future wallets migration, I can agree this problem is essentially solved.

  5. katesalazar closed this on Sep 17, 2022

  6. fanquake locked this on Sep 17, 2022
Contributors
Labels

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-05-02 12:13 UTC

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