We support a change to the version bits of the HD serialization that will inform the receiving utility of the exact derivation method used for the pubkeys. Third-parties handling xpubs must not require additional information from the user about the derivation path or serialization format of the addresses under that xpub. When you have to ask, "Is this a SegWit xpub?" then you've already lost.

Avoiding a total UX nightmare is in everyone's interests.

I think Luke and Thomas may be talking past one another. When exporting a root master HD seed, encoding the {x,y,z}{pub,prv} distinctions makes no sense, as the root seed should derive all paths for all coins. Wallets may need additional code to discover which paths have been used when importing a root seed. But when exporting / importing an account-level seed for watch-only and receive address generation, changing the serialization version bytes is appropriate and (in our view) essential to avoid loss of funds.

The Electrum approach is nice but may not go far enough, as xpub and zpub both list "P2PKH or P2SH." Why not expand the number of version prefixes to eliminate the ambiguity?


On Tue, Sep 5, 2017 at 1:09 PM, Thomas Voegtlin via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> wrote:


On 05.09.2017 19:03, Luke Dashjr wrote:

> It seems desirable to use the same seed for all different script formats...

That does not seem desirable to everybody.

If you want to guarantee that users will be able to recover all their
funds from their mnemonic seed (and that is what they expect), then
wallets must implement all script formats, even the ones that are
deprecated. In addition, the list of script formats that must be
supported is not defined in advance, but it keeps growing. This makes
wallet implementation increasingly difficult. In the long run, seed
portability is guaranteed to fail in such a system.

> As you note, xpub\xprv are already being used for both P2PKH and P2SH. It
> really doesn't make sense to differentiate segwit specifically.

That's not a reason. The fact that xpub/xprv can be used for both P2PKH
and P2SH has already resulted in users receiving coins on addresses they
do not control.
_______________________________________________
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev



--
-Kabuto

PGP Fingerprint: 1A83 4A96 EDE7 E286 2C5A  B065 320F B934 A79B 6A99