This PR adds an account parameter in createwallet RPC. It's the
BIP44 account that will be used in SetupDescriptorScriptPubKeyMans
to fetch the descriptors from the external signer.
wallet, rpc: add BIP44 `account` in `createwallet` #29129
pull brunoerg wants to merge 4 commits into bitcoin:master from brunoerg:2023-12-externalsigner-account-parameter changing 7 files +27 −11-
brunoerg commented at 1:31 PM on December 21, 2023: contributor
-
DrahtBot commented at 1:31 PM on December 21, 2023: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
Code Coverage
For detailed information about the code coverage, see the test coverage report.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
Type Reviewers Concept ACK BrandonOdiwuor If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #28710 (Remove the legacy wallet and BDB dependency by achow101)
- #28574 (wallet: optimize migration process, batch db transactions by furszy)
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.
- DrahtBot renamed this:
wallet, rpc: add BIP44 `account` in `createwallet`
wallet, rpc: add BIP44 `account` in `createwallet`
on Dec 21, 2023 - brunoerg force-pushed on Dec 21, 2023
- brunoerg referenced this in commit 523ad34656 on Dec 21, 2023
- brunoerg marked this as ready for review on Dec 21, 2023
-
BrandonOdiwuor commented at 5:08 AM on December 22, 2023: contributor
Concept ACK
-
luke-jr commented at 11:08 PM on December 26, 2023: member
Feels like this could be confused with real/beancounter accounts like we used to support years ago. Maybe
hd_accountor something? -
wallet: add `hd_account` parameter in `SetupDescriptorScriptPubKeyMans`/`CreateWallet` dec25cc521
-
c11a6ab516
wallet, rpc: add `hd_account` in `createwallet`
The `hd_account` parameter is the BIP44 account used to get the descriptors from the external signer.
-
test: add coverage for `hd_account` parameter from `createwallet` RPC a0fe82801e
-
docs: add release note for #29129 911eba3f7a
- brunoerg force-pushed on Dec 27, 2023
-
achow101 commented at 1:22 AM on December 27, 2023: member
I think this might be a better candidate for a
createwalletdescriptor(#29130) equivalent for external signers rather than continuing to jam more arguments intocreatewallet. -
brunoerg commented at 1:22 AM on December 27, 2023: contributor
Feels like this could be confused with real/beancounter accounts like we used to support years ago. Maybe hd_account or something?
I agree, had same thought. Just changed in latest push.
-
brunoerg commented at 1:25 AM on December 27, 2023: contributor
I think this might be a better candidate for a createwalletdescriptor (https://github.com/bitcoin/bitcoin/pull/29130) equivalent for external signers rather than continuing to jam more arguments into createwallet.
You mean have a specific RPC for external signers or extending
createwalletdescriptor? - luke-jr changes_requested
-
luke-jr commented at 8:19 PM on January 4, 2024: member
Beyond wallet_name, none of the positional parameters make sense as positional, and that goes for this new one too. Migrating this to an options object should probably be done sooner rather than after making the problem worse
-
achow101 commented at 8:43 PM on January 4, 2024: member
You mean have a specific RPC for external signers or extending
createwalletdescriptor?Unsure of the final design, but something like
createwalletdescriptorfor external signers seems like it would be useful, and having an account argument in that would probably also make sense. Actually, that might make sense forcreatewalletdescriptoritself. -
ryanofsky commented at 12:01 AM on January 10, 2024: contributor
re: #29129 (comment)
I think this might be a better candidate for a
createwalletdescriptor(#29130) equivalent for external signers rather than continuing to jam more arguments intocreatewallet.This makes sense, and I added this idea to my list of potential createwalletdescriptor extensions: #29130 (review)
But in general, as long as the createwallet
blankoption defaults to false and it creates descriptors by default, probably we should expectcreatewalletandcreatewalletdescriptorto accept some of the same options (and hopefully not duplicate the code implementing those options internally).In this case, I'm not sure if it will be more common to have single bitcoin core wallets with multiple hd_accounts, or multiple bitcoin core wallets with single hd_accounts? In the latter case, it really does make sense to add the option to
createwallet. And again as long asblankis not false, it seems like it would be useful to merge this PR to be able to control the descriptors thatcreatewalletwill add.Also agree very much with luke-jr that it would be good not to allow this option to be passed by position, and instead to add an OBJ_NAMED_PARAMS options parameter instead. It probably makes sense to have a separate PR disallowing the other options from being passed by position as well, especially since 6 of the 7 options are bool values, so very easy to confuse if passed by position.
- DrahtBot added the label CI failed on Jan 15, 2024
-
brunoerg commented at 4:24 PM on January 22, 2024: contributor
Also agree very much with luke-jr that it would be good not to allow this option to be passed by position, and instead to add an OBJ_NAMED_PARAMS options parameter instead. It probably makes sense to have a separate PR disallowing the other options from being passed by position as well, especially since 6 of the 7 options are bool values, so very easy to confuse if passed by position.
I strongly agree with that. I could turn this draft until we've that.
- brunoerg marked this as a draft on Feb 5, 2024
-
brunoerg commented at 3:24 PM on July 16, 2024: contributor
Closing for now.
- brunoerg closed this on Jul 16, 2024
- bitcoin locked this on Jul 16, 2025