rpc, docs: Add note for commands that supports only legacy wallets #25680

pull yusufsahinhamza wants to merge 1 commits into bitcoin:master from yusufsahinhamza:improve-rpchelpman-notes changing 3 files +17 −10
  1. yusufsahinhamza commented at 1:19 am on July 23, 2022: contributor

    Refs #25363, apparently issue is not updated since over a month, so i decided to put the same importaddress note in #25368 to other rpc commands that needs this note.

    Note is added for following commands:

    • importprivkey
    • importpubkey
    • importwallet
    • dumpprivkey
    • dumpwallet
    • importmulti
    • addmultisigaddress
    • sethdseed
  2. jonatack commented at 10:06 am on July 23, 2022: member
    This note you have copied over from #25368 does not seem relevant to these RPCs. In some cases, the error message may need to be updated as well.
  3. yusufsahinhamza commented at 11:58 am on July 23, 2022: contributor

    @jonatack

    Looks like no need of this note for getnewaddress.

    According to this release note:

    https://github.com/bitcoin/bitcoin/blob/194f6dc43ccc330a8a4607be3a2b8935490d6db0/doc/release-notes/release-notes-0.21.0.md?plain=1#L412-L422

    We can simply add “Note: This command is only compatible with legacy wallets.” note to these RPCs, but for example where there is alternative command to use for descriptor wallets; e.g. release note says:

    https://github.com/bitcoin/bitcoin/blob/194f6dc43ccc330a8a4607be3a2b8935490d6db0/doc/release-notes/release-notes-0.21.0.md?plain=1#L405-L406

    In this case for importmulti we can add additional note “Use “importdescriptors” with addr(X)” for descriptor wallets." after the first note to point out what to use as an alternative.

  4. Onyeali approved
  5. luke-jr commented at 2:32 am on July 26, 2022: member

    getnewaddress

    ?!?!?!

  6. yusufsahinhamza commented at 6:33 am on July 26, 2022: contributor

    getnewaddress

    ?!?!?!

    Didn’t do any changes as i’m waiting for an answer about my last message, or let’s say suggestion to what to do.

  7. yusufsahinhamza force-pushed on Jul 26, 2022
  8. in src/wallet/rpc/backup.cpp:1267 in 088547188d outdated
    1262@@ -1258,7 +1263,8 @@ RPCHelpMan importmulti()
    1263             "may report that the imported keys, addresses or scripts exist but related transactions are still missing.\n"
    1264             "The rescan parameter can be set to false if the key was never used to create transactions. If it is set to false,\n"
    1265             "but the key was used to create transactions, rescanwallet needs to be called with the appropriate block range.\n"
    1266-            "Note: Use \"getwalletinfo\" to query the scanning progress.\n",
    1267+            "Note: Use \"getwalletinfo\" to query the scanning progress.\n"
    1268+            "Note: This command is only compatible with legacy wallets. Use \"importdescriptors\" with \"addr(X)\" for descriptor wallets.\n",
    


    achow101 commented at 7:39 pm on July 28, 2022:
    I don’t think it’s useful to mention addr() here as importmulti allows the import of a ton of different things, including descriptors. Mentioning a specific descriptor type, which only applies to one of the things that importmulti can deal with, doesn’t seem to make sense to me.

    yusufsahinhamza commented at 0:01 am on July 29, 2022:

    @achow101 I agree, I’d rather like it as “Use “importdescriptors” for descriptor wallets.”, mentioning a specific parameter doesn’t seem necessary. People would get help by using only “importdescriptors” anyway.

    This line can also be changed: https://github.com/bitcoin/bitcoin/blob/1abbae65eb9c99df5d8941008068d83ad99bf117/src/wallet/rpc/backup.cpp#L213

  9. yusufsahinhamza force-pushed on Jul 29, 2022
  10. DrahtBot added the label Needs rebase on Aug 25, 2022
  11. bitcoin deleted a comment on Aug 26, 2022
  12. yusufsahinhamza force-pushed on Aug 26, 2022
  13. yusufsahinhamza force-pushed on Aug 26, 2022
  14. yusufsahinhamza force-pushed on Aug 26, 2022
  15. yusufsahinhamza force-pushed on Aug 26, 2022
  16. DrahtBot removed the label Needs rebase on Aug 27, 2022
  17. yusufsahinhamza commented at 1:48 am on August 27, 2022: contributor
    775ba9ccea0adcae349787647e8aa08844ff390d Conflicts are resolved and rebased.
  18. DrahtBot commented at 5:21 pm on September 22, 2022: contributor

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK achow101
    Concept ACK theStack

    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:

    • #27034 (rpc: make importaddress compatible with descriptors wallet by furszy)
    • #25907 (wallet: rpc to add automatically generated descriptors 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.

  19. theStack commented at 4:23 pm on November 27, 2022: contributor

    Concept ACK

    For the importprivkey and importpubkey RPC notes, it could make sense to suggest using importdescriptor with combo(X) for descriptor wallets?

  20. yusufsahinhamza commented at 12:22 pm on November 29, 2022: contributor

    For the importprivkey and importpubkey RPC notes, it could make sense to suggest using importdescriptor with combo(X) for descriptor wallets? @theStack It seems to make sense for me. I can rebase and push changes if no other suggestion about that.

  21. rpc, docs: Add note for commands that supports only legacy wallets
    Note is added for following rpc commands:
    
    importprivkey, importpubkey, importwallet, dumpprivkey,
    dumpwallet, importmulti, addmultisigaddress, sethdseed
    9141e4395a
  22. yusufsahinhamza force-pushed on Nov 30, 2022
  23. achow101 requested review from achow101 on Apr 25, 2023
  24. DrahtBot added the label CI failed on Apr 25, 2023
  25. DrahtBot removed the label CI failed on Apr 25, 2023
  26. achow101 commented at 12:18 pm on May 1, 2023: member
    ACK 9141e4395a5f923059ad61ac6ba42a1a89e92cb0
  27. DrahtBot removed review request from achow101 on May 1, 2023
  28. achow101 merged this on May 1, 2023
  29. achow101 closed this on May 1, 2023

  30. sidhujag referenced this in commit 042478444a on May 1, 2023
  31. luke-jr commented at 9:00 pm on July 25, 2023: member

    @achow101 Why was this merged?

    I’m not sure suggesting combo() is a good idea. Isn’t combo only for having a migration path, not something we want people to actually use?

  32. achow101 commented at 9:15 pm on July 25, 2023: member
    While I don’t think we should necessarily encourage people to use combo(), I don’t think it’s bad to mention it either. in the case of importpubkey and importprivkey, combo() with importdescriptors does replicate their behavior so it isn’t incorrect. I don’t really care either way whether it’s mentioned or not.
  33. luke-jr referenced this in commit 49a61ba7f0 on Sep 16, 2023
  34. bitcoin locked this on Aug 2, 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-12-22 00:12 UTC

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