2

When I dump my wallet in bitcoin core:

bitcoin-cli dumpwallet mywallet.txt

The output looks like this, obfuscating keys with XXX

# Wallet dump created by Bitcoin v0.21.0
# * Created on 2021-08-12T17:19:57Z
# * Best block at time of backup was 695445 (00000000000000000004f27a30ca376652c836a0c498d1c93ced4727e94074d0),
#   mined on 2021-08-12T17:15:35Z

# extended private masterkey: xprv9XXXXX

XXX 2021-08-12T12:29:33Z reserve=1 # addr=bc1qq9XXX hdkeypath=m/0'/0'/50'
XXX 2021-08-12T12:29:33Z reserve=1 # addr=bc1qq9XXX hdkeypath=m/0'/0'/200'
XXX 2021-08-12T12:29:33Z reserve=1 # addr=bc1qqfXXX hdkeypath=m/0'/0'/238'
XXX 2021-08-12T12:29:33Z reserve=1 # addr=bc1qq0XXX hdkeypath=m/0'/0'/134'
XXX 2021-08-12T12:29:33Z reserve=1 # addr=bc1qq0XXX hdkeypath=m/0'/0'/174'
XXX 2021-08-12T12:29:33Z reserve=1 # addr=bc1qqjXXX hdkeypath=m/0'/0'/58'
XXX 2021-08-12T12:29:33Z reserve=1 # addr=bc1qq5XXX hdkeypath=m/0'/0'/159'
XXX 2021-08-12T12:29:33Z reserve=1 # addr=bc1qqkXXX hdkeypath=m/0'/0'/153'
XXX 2021-08-12T12:29:33Z reserve=1 # addr=bc1qqhXXX hdkeypath=m/0'/0'/62'
XXX 2021-08-12T12:29:33Z hdseed=1 # addr=bc1qqaXXX
XXX 2021-08-12T12:29:33Z reserve=1 # addr=bc1qq7XXX hdkeypath=m/0'/0'/127'
XXX 2021-08-12T12:29:33Z reserve=1 # addr=bc1qqlXXX hdkeypath=m/0'/0'/205'

As a new user, I would think that based on the structure of this file the important part to backup is # extended private masterkey: xprv9XXXXX

However, this is not the case according to this answer for storing the seed, the important part is the hdseed:

XXX 2021-08-12T12:29:33Z hdseed=1 # addr=bc1qqaXXX

The XXX portion from above.

Why is that not made clearer in the output of dumpwallet?

1
  • Even I had this question few days back but then assumed maybe it's good for security. Curious to know the reason.
    – user103136
    Commented Aug 12, 2021 at 23:23

3 Answers 3

4

The dumpwallet RPC was introduced in this commit, in the v0.9 release of Bitcoin Core.

This was back in time when the wallet was just a random bag of independent keys. That is, before HD wallets came along. So there was no such thing as a seed, hence the dumpfile being simply a long list of keys.

Since HD wallets were introduced, no-one has modified this RPC to put the seed at the top. That's all there is to it :)

1
  • Not to mention that the seed by itself was not useful for a long time as there was no way to import a seed and set the wallet to use a particular seed.
    – Ava Chow
    Commented Jan 16, 2022 at 18:23
1

Nobody knows.

The motivation for features in Bitcoin core is rarely documented in easily accessible places - though you might examine the source code for hints. It might be, for example, that the original author of dumpwallet felt that backupwallet was adequate for people seeking to preserve the seed and that they intended dumpwallet as a debugging aid for developers and not as a way for end-users to make a note of their seed for recovery purposes. If so, for this debugging purpose, the lack of prominence of the seed is unimportant.


Footnotes:

Approximately. Presumably the original author knew at the time they implemented the dumpwallet feature but they may have forgotten or died.

4
  • verify = dumpwallet, trust = backupwallet
    – tread
    Commented Jan 10, 2022 at 11:18
  • 2
    Actually, sipa introduced the dumpwallet RPC: github.com/bitcoin/bitcoin/commit/… (he definitely hasn't died I hope!) Commented Jan 16, 2022 at 10:00
  • 3
    Not the best of my knowledge. Commented Jan 16, 2022 at 15:11
  • Glad to hear it :-) Commented Jan 16, 2022 at 17:15
-2

The most important bit is the master seed, which is at the top of the file. A user deciding what parts of a backup file are "important" to them isn't really a consideration regardless.

1
  • As OP points out, the seed is not at the top of the file. Commented Aug 12, 2021 at 21:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.