Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: ufaforwork2 on October 22, 2017, 12:50:29 PM



Title: Issue about Segwit HD
Post by: ufaforwork2 on October 22, 2017, 12:50:29 PM
This thread proposes changes to BIP49 to address segwit compatibility issues

Breaking backwards compatibility
The BIP talks about breaking this, and  but it really doesn't.  I really feel it should completely break this. Here is why

What would happen if you recover a wallet  using seed words ?
  1. Since there is no difference in seed words between segwit/non segwit, the wallet would discover both m/44' and m/49' accounts
  2. Note that we cannot ask the user to choose an account he wants to operate on (Segwit/Non segwit). This is like asking him the HD derivation path and a really bad UI
  3. The wallet now has to constantly monitor both m/44' and m/49' accounts for transactions
  
Basically we are always stuck with keeping compatibility with older seed words or always asking the user if the seed words came from segwit/non segwit wallet !

Here is my suggestion :
1. By default all new wallets will be created as segwit  m/49' without asking user anything. I think you would agree with me that in future we want most wallet to be default segwit (unless user chooses a non segwit from advanced options)!

2. Segwit wallet seed words have a different format which is incompatible with previous wallet seed words. This  encodes the information that this wallet is segwit in the seed words itself. We need to define a structure for this


XPUB Derivation
This is something not addressed in the BIP yet.

1. Right now you can get an xpub balance/transaction history. Now there is no way to know whether an xpub is from m/44' or m/49'

2. This breaks lots of things. Wallets like electrum/armory/mycelium support importing  xpub as a watch only wallet. Also services like blockonomics/blockchain.info use xpub for displaying balance/generating merchant addresses

Any help would be greatly appreciated.

Thanks

Billy.


Title: Re: Issue about Segwit HD
Post by: achow101 on January 06, 2018, 06:22:07 PM
This thread proposes changes to BIP49 to address segwit compatibility issues
It's better to do this on the bitcoin-dev mailing list.

What would happen if you recover a wallet  using seed words ?
That is orthogonal to BIP 49. That is something to do with BIP 39 and is unrelated to key derivation. Unfortunately BIP 39 does not have a versioning scheme to give seeds version numbers.