Post
Topic
Board Development & Technical Discussion
Merits 6 from 3 users
Re: Why is there no possibility to export privkeys when creating a descriptor wallet
by
achow101
on 26/04/2022, 14:34:08 UTC
⭐ Merited by sha420hashcollision (3) ,garlonicon (2) ,vapourminer (1)
I don't think that's it. Then why remove dumpprivkey entirely? Why not update that CLI response to include the WIF and a descriptor of the path? Remember how long `getinfo` was deprecated before it was actually functionally removed? Not sure what the rush is...
That's unsafe. With unhardened derivation, if you have a child private key and the parent xpub, the parent xprv can be derived. Bitcoin Core now uses the various derivation path standards all of which use unhardened derivation. So allowing individual child keys to be exported exposes the user to potential wallet compromise. One of the requirements for moving to unhardened derivation was to disallow child private key export.

Exporting a child private key and the parent descriptor at the same time would be the same as exporting the parent descriptor with its xprv, except it is entirely non-obvious to the user that these two things are equivalent.

The confusion we all see on a regular basis is because of the backwards compatibility of output types, and because wallets are free to deviate from a standard (as they should be able to) -- to that end I think we just need to accept that confusion will always exist.

Creating yet another new standard that may not be adopted by most wallets just creates an opportunity in the future for more confusion. Similar to how we saw wallets completely diverge on an HD standard.

I know the goal is to improve bitcoin, help others and make loss of funds more difficult but I think in a few years time we will have some users with descriptors and some without. Users asking how to recover funds without descriptors, or how to import if their wallet doesn't support descriptors.
I don't think it's at all acceptable to continue with the obviously confusing solution if there is a solution which does not have the confusion in the first place. Continuing with the old just because adding something new will be confusing the users during the transition is not the way to move forward at all. We've been adding more and more output types, the confusion is just going to get worse without descriptors.

Furthermore, people have been looking at using more and more complicated scripts, and adding even more complicated things like covenants. These are fundamentally incompatible with having just private keys. Imagine the confusion when every wallet decides to define their own standards for dealing with these. Descriptors provides a framework for which all of these things can be implemented with and done in a standardized fashion. For at least these new things, everyone will be compatible as they will largely be using the descriptors standard that now exists.