|
Title: Bitcoin Core HD Wallet questions about hdseedid and size Post by: xgiovio on November 23, 2025, 04:41:23 PM Hello,
i tested this on 2 hd wallets. Bitcoincore latest version and rpc command inside the bitcoin-qt app running and in sync. Wallets are encrypted. Format is sqlite for both. Upgraded with the latest bitcoincore software. 1.First question The getwalletinfo command doesn't return any hdseedid value, the key itself is missing. The getaddressinfo on an address returns the hdseedid value with all zeros. The hdkeypath and hdmasterfingerprint are present. Can someone explain why? 2.Second question The two wallets have different ages. One wallet has more transactions and older. Why is the older wallet smaller in bytes? The older wallet is almost the half size the newer. Thank you Title: Re: Bitcoin Core HD Wallet questions about hdseedid and size Post by: achow101 on November 23, 2025, 09:38:52 PM 1.First question Your wallets are Descriptor Wallets. These fields have no meaning for Descriptor Wallets and so are either omitted or have a meaningless value.The getwalletinfo command doesn't return any hdseedid value, the key itself is missing. The getaddressinfo on an address returns the hdseedid value with all zeros. The hdkeypath and hdmasterfingerprint are present. Can someone explain why? 2.Second question The size of the wallet depends on its usage. One wallet could have larger transactions, or more addresses used, or more descriptors, etc.The two wallets have different ages. One wallet has more transactions and older. Why is the older wallet smaller in bytes? The older wallet is almost the half size the newer. Title: Re: Bitcoin Core HD Wallet questions about hdseedid and size Post by: xgiovio on November 23, 2025, 11:48:06 PM Hello achow101,
thank you for answering. Regarding the second question something seems off. One wallet has a lot of transactions and different addresses. The newer wallet has few transactions and no additionals created addresses. So my natural question is. How is it possible for the newer wallet with some few transactions to weight so much in bytes? Is there any method to output in a plain text the content of the db?, even with encrypted private keys, to just see what's different inside them? Is there any moethod to verify wallet integrity? Thanks Title: Re: Bitcoin Core HD Wallet questions about hdseedid and size Post by: achow101 on November 24, 2025, 01:58:42 AM Is there any method to output in a plain text the content of the db?, even with encrypted private keys, to just see what's different inside them? The wallet tool has a dump command to export all of the records as hex to a text file. Use bitcoin-wallet -dumpfile=<path to output file location> -wallet=<wallet name> dumpIs there any moethod to verify wallet integrity? Loading a wallet verifies integrity every time.Title: Re: Bitcoin Core HD Wallet questions about hdseedid and size Post by: Forsyth Jones on November 24, 2025, 06:54:18 PM .... Whenever you create a wallet (which is now generated by default in descriptor format), each descriptor generates up to 1000 keys by default. You can set the number using the command line option keypoolrefill. This acts as a gap limit, that is, when this "limit" is reached, the wallet generates another 1000 keys, and so on.Regarding the second question something seems off. One wallet has a lot of transactions and different addresses. The newer wallet has few transactions and no additionals created addresses. So my natural question is. How is it possible for the newer wallet with some few transactions to weight so much in bytes? Is there any method to output in a plain text the content of the db?, even with encrypted private keys, to just see what's different inside them? Is there any moethod to verify wallet integrity? Thanks So even if you have a more recent wallet.dat file and haven't clicked to generate new addresses, these addresses, not yet displayed in the GUI, are actually stored in your wallet.dat keystore. All new keys generated will be derived from your extended private key from your descriptor, so there's no need to worry about making a new backup. This is why both keystores are the "same size", the addresses are already "pre-generated" in your keystore and they will be displayed in the GUI as you click to "generate a new receiving address". See more details at: https://bitcoincore.org/en/doc/30.0.0/rpc/wallet/keypoolrefill/ Title: Re: Bitcoin Core HD Wallet questions about hdseedid and size Post by: xgiovio on November 24, 2025, 07:52:24 PM Is there any moethod to verify wallet integrity? Loading a wallet verifies integrity every time..... Whenever you create a wallet (which is now generated by default in descriptor format), each descriptor generates up to 1000 keys by default. You can set the number using the command line option keypoolrefill. This acts as a gap limit, that is, when this "limit" is reached, the wallet generates another 1000 keys, and so on.Regarding the second question something seems off. One wallet has a lot of transactions and different addresses. The newer wallet has few transactions and no additionals created addresses. So my natural question is. How is it possible for the newer wallet with some few transactions to weight so much in bytes? Is there any method to output in a plain text the content of the db?, even with encrypted private keys, to just see what's different inside them? Is there any moethod to verify wallet integrity? Thanks So even if you have a more recent wallet.dat file and haven't clicked to generate new addresses, these addresses, not yet displayed in the GUI, are actually stored in your wallet.dat keystore. All new keys generated will be derived from your extended private key from your descriptor, so there's no need to worry about making a new backup. This is why both keystores are the "same size", the addresses are already "pre-generated" in your keystore and they will be displayed in the GUI as you click to "generate a new receiving address". See more details at: https://bitcoincore.org/en/doc/30.0.0/rpc/wallet/keypoolrefill/ Thank you Forsyth Jones for answering. The question was a bit different. Having 2 wallets, one older with more transactions and another newer with few transactions, how is it possible that the newer size in bytes is double? Title: Re: Bitcoin Core HD Wallet questions about hdseedid and size Post by: achow101 on November 24, 2025, 08:57:28 PM Hello achow101, thank you for your answer. I didn't have time to check the source code on github, but when you says that the wallet is verified at each load, does bitcoin core verify the priv keys corrisponding to the pub keys? even if encrypted? For example checking a saved priv key checksum in the wallet? YesTitle: Re: Bitcoin Core HD Wallet questions about hdseedid and size Post by: xgiovio on November 24, 2025, 09:24:35 PM Hello achow101, thank you for your answer. I didn't have time to check the source code on github, but when you says that the wallet is verified at each load, does bitcoin core verify the priv keys corrisponding to the pub keys? even if encrypted? For example checking a saved priv key checksum in the wallet? YesTitle: Re: Bitcoin Core HD Wallet questions about hdseedid and size Post by: Thor001 on November 30, 2025, 06:40:19 PM The getwalletinfo command doesn't return any hdseedid value, the key itself is missing. The getaddressinfo on an address returns the hdseedid value with all zeros. The hdkeypath and hdmasterfingerprint are present. The presence of hdkeypath and hdmasterfingerprint simply reflects the descriptor structure.The two wallets have different ages. One wallet has more transactions and older. Why is the older wallet smaller in bytes? The older wallet is almost the half size the newer. As for file size, wallet.dat grows based on metadata, transactions, and internal structure changes, so an older wallet can still end up smaller depending on how it was created or upgraded. |