Author

Topic: Enable HD wallet (Read 3579 times)

hero member
Activity: 672
Merit: 504
a.k.a. gurnec on GitHub
November 01, 2016, 05:01:48 PM
#16
So I create a new wallet, and then encrypt it, and then dump it. Part of it shown below.

Quote
# Wallet dump created by Bitcoin v0.13.1
# * Created on 2016-11-01T16:49:59Z
# * Best block at time of backup was 436933 (000000000000000002ccbdae69c8d90f305e12a892ab89646f4b80e713fc1135),
#   mined on 2016-11-01T16:44:03Z


Would anyone know how to generate the extended public masterkey from the above private masterkey?

I'd like to create a HD watch-only wallet.

That's a wallet dump from Bitcoin Core—there is no associated master public key.

Core uses an entirely hardened BIP-32 path, which makes it impossible to create a master public key or an HD watch-only wallet. (edit: at least at the moment, there does seem to be a desire to do so eventually)
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
November 01, 2016, 03:25:13 PM
#15
So I create a new wallet, and then encrypt it, and then dump it. Part of it shown below.
You realize that that this dump is in plaintext and people can see the keys right?

You can get the xpub from http://bip32.org/.

Oh, thanks. It's a new wallet. Nothing there. Smiley

So, this should be my master public key: xpub661MyMwAqRbcFiokF16teAffFmrg9GGA9BgRwSU1APFUrc5RkqSkVrpuZGTEBRR11WkFGtwSBZW 9TMnGwYt1ZAjujtUWFyxvGqfgNr1BWS8
staff
Activity: 3458
Merit: 6793
Just writing some code
November 01, 2016, 02:18:09 PM
#14
So I create a new wallet, and then encrypt it, and then dump it. Part of it shown below.

Quote
# Wallet dump created by Bitcoin v0.13.1
# * Created on 2016-11-01T16:49:59Z
# * Best block at time of backup was 436933 (000000000000000002ccbdae69c8d90f305e12a892ab89646f4b80e713fc1135),
#   mined on 2016-11-01T16:44:03Z

# extended private masterkey: xprv9s21ZrQH143K3EjH8yZtH2ivhk2BjoYJmxkq944Pc3iVyokHDJ8Vx4WRhz92JSDpVAQhEKV3fhR UgdoEeCsPHbfsYfRbyE11UBbnAQ3zLm1

Ky6EKoKGkn5CibTqQNwr3AZG9ELVqzwCc8GdSiBQtTDh5yDWMaSJ 2016-11-01T16:38:45Z inactivehdmaster=1 # addr=13ZoMtJ2V9NK8iDqewaED3KwUR9JLmADN4 hdkeypath=m
L1vM1JaXQHjo1zYFGkpq7RJbJfhBQpnaLxHGW6jhAt5NxyGbWg8H 2016-11-01T16:38:45Z label= # addr=1DNRMgpMdQpbRKqnBaC7vRATcwtCtg4wVa hdkeypath=m/0'/0'/0'
L1ka2NPe8WqEjv7Nqjm1srCFRfmmmoAQs9XNdEudAPsNZpezfcxf 2016-11-01T16:38:45Z change=1 # addr=1EdwReu2eu6omWqeKdXUot7KcJdXLTon1c hdkeypath=m/0'/0'/1'
L1PTVkEuNQmPsZME2MQrn1ZFB5pB8RDbHDLG9rPWUqRCRN3cuMRx 2016-11-01T16:39:23Z hdmaster=1 # addr=1Cfs9gmcWEYRcQ1oTpjGvoJk6pVS3Eocd8 hdkeypath=m
L1rD6d9zXCoFiU3i3oCTMtXqorX1CgctE7c3rhXczaG4YhNzEb3g 2016-11-01T16:39:23Z label= # addr=1DT33PqoUDckjQwNjekevyH9U36yUFvFrB hdkeypath=m/0'/0'/0'

Would anyone know how to generate the extended public masterkey from the above private masterkey?

I'd like to create a HD watch-only wallet.
You realize that that this dump is in plaintext and people can see the keys right?

You can get the xpub from http://bip32.org/.
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
November 01, 2016, 11:58:08 AM
#13
So I create a new wallet, and then encrypt it, and then dump it. Part of it shown below.

Quote
# Wallet dump created by Bitcoin v0.13.1
# * Created on 2016-11-01T16:49:59Z
# * Best block at time of backup was 436933 (000000000000000002ccbdae69c8d90f305e12a892ab89646f4b80e713fc1135),
#   mined on 2016-11-01T16:44:03Z

# extended private masterkey: xprv9s21ZrQH143K3EjH8yZtH2ivhk2BjoYJmxkq944Pc3iVyokHDJ8Vx4WRhz92JSDpVAQhEKV3fhR UgdoEeCsPHbfsYfRbyE11UBbnAQ3zLm1

Ky6EKoKGkn5CibTqQNwr3AZG9ELVqzwCc8GdSiBQtTDh5yDWMaSJ 2016-11-01T16:38:45Z inactivehdmaster=1 # addr=13ZoMtJ2V9NK8iDqewaED3KwUR9JLmADN4 hdkeypath=m
L1vM1JaXQHjo1zYFGkpq7RJbJfhBQpnaLxHGW6jhAt5NxyGbWg8H 2016-11-01T16:38:45Z label= # addr=1DNRMgpMdQpbRKqnBaC7vRATcwtCtg4wVa hdkeypath=m/0'/0'/0'
L1ka2NPe8WqEjv7Nqjm1srCFRfmmmoAQs9XNdEudAPsNZpezfcxf 2016-11-01T16:38:45Z change=1 # addr=1EdwReu2eu6omWqeKdXUot7KcJdXLTon1c hdkeypath=m/0'/0'/1'
L1PTVkEuNQmPsZME2MQrn1ZFB5pB8RDbHDLG9rPWUqRCRN3cuMRx 2016-11-01T16:39:23Z hdmaster=1 # addr=1Cfs9gmcWEYRcQ1oTpjGvoJk6pVS3Eocd8 hdkeypath=m
L1rD6d9zXCoFiU3i3oCTMtXqorX1CgctE7c3rhXczaG4YhNzEb3g 2016-11-01T16:39:23Z label= # addr=1DT33PqoUDckjQwNjekevyH9U36yUFvFrB hdkeypath=m/0'/0'/0'

Would anyone know how to generate the extended public masterkey from the above private masterkey?

I'd like to create a HD watch-only wallet.
legendary
Activity: 2674
Merit: 2965
Terminated.
October 31, 2016, 05:12:42 AM
#12
Is master key = private key ? after generating some addresses , I went to the receiving in the menu (where all generated addresses are located) , I took some of them and used dumpprivkey , result shows private keys aren't the same ?
The addresses in a HD wallet are derived from a master key, however this does not mean that addresses have the same private key (this would not make sense). This is what makes it possible for a single backup to be used regardless of how many addresses you generate (which is not the case with a SD wallet). You should read up more about HD wallets.
legendary
Activity: 1568
Merit: 1031
October 31, 2016, 03:18:04 AM
#11
Understood (It's working fine) , and do I need to make backups as usual or all addresses are derived from one private key only ?
You only need to make a single backup (since they are derived from one master key) and you should be fine, unless you:
1) Encrypt the wallet.
2) Change the passphrase.

In these cases, you need to back up again.

Is master key = private key ? after generating some addresses , I went to the receiving in the menu (where all generated addresses are located) , I took some of them and used dumpprivkey , result shows private keys aren't the same ?
hero member
Activity: 1106
Merit: 521
October 30, 2016, 12:52:06 PM
#10
yeah i set mine up about 2 weeks ago and i had to create the .conf file myself, try that
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
October 30, 2016, 08:41:39 AM
#9
This does not seem correct to me. The original seed should not be altered when the password to protect it is changed. Thus any initial backup, be it with or without password should allow a user to restore the wallet, regardless of later password changes. Did I miss something here?
This is something that I've read in the 0.13.0 release notes, and have looked it up one more time after reading your post. This is what I've found:

Quote
If you create a new wallet with 0.13.0 (or above) and you change from the default unencrypted wallet to an encrypted wallet, a new HD wallet will be generated for you. You will still have access to any bitcoins sent to the unencrypted wallet, but you will need to backup the wallet again.
https://bitcoincore.org/en/2016/08/23/release-0.13.0/

This should be mentioned as well (I forgot to do so):
Quote
Importantly, if you manually import any private keys to your wallet, they cannot be recovered using any backups made prior to the import, so you will need to make a new wallet backup and use that.

I see, so its very similar to the non-HD wallets, where they dump the unused private keys. They cant do that with a HD one, so they dump the seed for a new one and import the used keys from the old seed. It should not happen when changing the password though.
legendary
Activity: 2674
Merit: 2965
Terminated.
October 30, 2016, 06:12:09 AM
#8
This does not seem correct to me. The original seed should not be altered when the password to protect it is changed. Thus any initial backup, be it with or without password should allow a user to restore the wallet, regardless of later password changes. Did I miss something here?
This is something that I've read in the 0.13.0 release notes, and have looked it up one more time after reading your post. This is what I've found:

Quote
If you create a new wallet with 0.13.0 (or above) and you change from the default unencrypted wallet to an encrypted wallet, a new HD wallet will be generated for you. You will still have access to any bitcoins sent to the unencrypted wallet, but you will need to backup the wallet again.
https://bitcoincore.org/en/2016/08/23/release-0.13.0/

This should be mentioned as well (I forgot to do so):
Quote
Importantly, if you manually import any private keys to your wallet, they cannot be recovered using any backups made prior to the import, so you will need to make a new wallet backup and use that.
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
October 30, 2016, 06:03:28 AM
#7
Understood (It's working fine) , and do I need to make backups as usual or all addresses are derived from one private key only ?
You only need to make a single backup (since they are derived from one master key) and you should be fine, unless you:
1) Encrypt the wallet.
2) Change the passphrase.

In these cases, you need to back up again.

Assuming we talk about the new HD feature and please keep in mind that I am not updated on the recent developments regarding that wallet version at all...

This does not seem correct to me. The original seed should not be altered when the password to protect it is changed. Thus any initial backup, be it with or without password should allow a user to restore the wallet, regardless of later password changes. Did I miss something here? Is a new seed generated when the wallet is encrypted for the first time? Similar to what used to happen with the non-hd wallets where old unused private keys would be discarded before an initial encryption.
legendary
Activity: 2674
Merit: 2965
Terminated.
October 30, 2016, 02:59:44 AM
#6
Understood (It's working fine) , and do I need to make backups as usual or all addresses are derived from one private key only ?
You only need to make a single backup (since they are derived from one master key) and you should be fine, unless you:
1) Encrypt the wallet.
2) Change the passphrase.

In these cases, you need to back up again.
legendary
Activity: 1568
Merit: 1031
October 30, 2016, 02:53:37 AM
#5
  • Go to the "Receive" tab in the application.
  • Click the "Request payment" button.
  • Receive new address.

The "Receiving addresses" window that is found under the "File" menu is just a list of the addresses that you have requested so far.  You won't get a new one until you request it.

Understood (It's working fine) , and do I need to make backups as usual or all addresses are derived from one private key only ?
legendary
Activity: 3472
Merit: 4801
October 29, 2016, 02:52:09 PM
#4
  • Go to the "Receive" tab in the application.
  • Click the "Request payment" button.
  • Receive new address.

The "Receiving addresses" window that is found under the "File" menu is just a list of the addresses that you have requested so far.  You won't get a new one until you request it.
legendary
Activity: 1568
Merit: 1031
October 29, 2016, 10:29:09 AM
#3
New wallets are HD by default. You cannot convert a non-HD wallet to an HD wallet.

You have to create the bitcoin.conf file by yourself. It isn't automatically generated.

are you sure man ? then how come each time I got to the receiving addresses in the menu , I find the same addresses and I can create new ones myself , aren't HD wallets supposed to create a new address for you each time you want to receive ?
staff
Activity: 3458
Merit: 6793
Just writing some code
October 29, 2016, 09:57:34 AM
#2
New wallets are HD by default. You cannot convert a non-HD wallet to an HD wallet.

You have to create the bitcoin.conf file by yourself. It isn't automatically generated.
legendary
Activity: 1568
Merit: 1031
October 29, 2016, 09:34:04 AM
#1
I tried two options and I can't seem to get them working , the first is giving me back Method not found (code -32601) when I use "usehd" in the debug window and as for the second I can't find the Bitcoin.conf , I searched and I found that It should be in the AppData but I can't find anything there and It doesn't get auto generated either.  (bitcoin-qt 0.13.1)

Jump to: