-
Notifications
You must be signed in to change notification settings - Fork 46
Add docs + test on required use of xpub for multipath constructor #306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docs + test on required use of xpub for multipath constructor #306
Conversation
Pull Request Test Coverage Report for Build 17476589408Details
💛 - Coveralls |
oleonardolima
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK e647ed2
Yeah it's fuzzy for me too but I think the answer probably is in this video if I remember correctly. He goes over the ideas and tricks that make extended keys able to create children keys, and how this ability is broken by the "hardening" process. It's maybe that because you can't ensure that some of the multipath paths are not hardened, miniscript just errors out on all multipath xprv. But also, could you not just error out if one or more of those paths are hardened instead of in all cases? I might be thinking about this wrong. |
f73596e docs: add wording on required use of xpub for multipath constructor (thunderbiscuit) Pull request description: This is just a cherry pick of my #306 PR onto the 2.2 release branch. ACKs for top commit: ValuedMammal: ACK f73596e oleonardolima: ACK f73596e Tree-SHA512: f1e0f2acf9ab832e33fcf071b880de8df09b40bc755236c80f0045c48f667c10e4b38133f50f210acafe6d335e6a62b77037b6a5068d16d44a25dd46e138307c
This PR makes explicit a limitation of the
Wallet::create_from_two_path_descriptormethod, in that you must use public descriptors to build the wallet using this constructor, meaning you can only build watch-only wallets.I also added a test to showcase this and the error returned.
See my comment here for more:
From what I can tell the issue is that miniscript cannot parse an xprv (I saw a comment from Sanket about this somewhere but now I can't find it anymore) if the multipath contains hardened derivation paths, and therefore miniscipt cannot ensure the xprv will be parsable into public keys in all cases? Something like that. But our arguments for bdk wallet constructors require the
IntoWalletDescriptortrait:In other words, upon creation, the wallet will always try to parse the descriptor string into its public form, and here since it cannot be done by miniscript we fail to build.
Changelog notice
No changelog notice.
Checklists
All Submissions:
just pbefore pushing