TransWikia.com

Explain how unused addresses in wallet.dat have no balance when mining occurred for many months

Bitcoin Asked by Wallguy on October 24, 2021

I have a wallet.dat file with many zero transaction/(unused) addresses in it with keys assigned to each address. I’ve done research and there’s quite a bit of info about mining back in the day (2013-2015) say but what people don’t explain is when someone solved a block and thus got rewarded 12.5 bitcoins, and when the bitcoins are saved in a wallet, how can the unused addresses in a wallet.dat file have no balance when checked with blockchain.info? Where are the bitcoins that were mined and why do the addresses have no balances? Why were all these addresses created in the wallet.dat file?

There is a disconnect between a miner’s reward of bitcoin he earned while mining and what is in his wallet and unused addresses showing zero balances. I am having trouble understanding the relationship with mined bitcoin, unused addresses with assigned keys in a wallet.dat file, and having zero balances when checked with blockchain.info

2 Answers

Bitcoins are not saved in wallets.

The only important data in a wallet are the secret numbers called the private-keys.

The nearest approximation to the truth is that bitcoin are stored in the public blockchain - of which every bitcoin wallet either maintains its own copy or has access to a copy.

In the case of the wallet named "Bitcoin Core", the private keys are stored in the wallet.dat file along with a lot of other unimportant stuff. On MS-Windows Bitcoin core stores a local copy of the public blockchain in a set of files named blk00001.dat to something above blk01234.dat in %APPDATA%Bitcoinblocks.

What is actually stored in the blockchain data is just transactions. Just a complete historical record of amounts of money for which control has been transferred from one person's private-key to another person's private-key. Some clever mathematics allows this to be done without disclosing private-keys. To work out a balance you have to read the whole blockchain and subtract the sum of spent amounts from the sum of received amounts. The blockchain is what accountants would call a journal. It doesn't keep track of balances directly.

The profits of mining are handled in almost exactly the same way as ordinary transactions. The first transaction in a block is the so-called coinbase transaction which pays the miner the amount of mining reward specified in the rules plus the transaction fees from the other transactions (if any) in the mined block.


So how does this relate to unused addresses in wallets?

It doesn't. These are unrelated concepts. Wallets generate addresses in advance of them being needed. This is just a convenience so far as I know. It is helpful when using the seed-phrase or private-key to re-create a destroyed or lost wallet as it allows the new wallet to find amounts of money received and spent by the previous wallet(s) at a range of addresses.

Addresses are just numbers used in popular types of bitcoin transaction. These numbers don't have any intrinsic meaning - they don't identify people or places or anything else. They are just a number mathematically derived in a deterministic way from a public-key associated with a private key.

So most wallets will have many many unused addresses with no balance associated with them because they have not been used yet in any transactions.

Answered by RedGrittyBrick on October 24, 2021

Unused addresses are unrelated to mining activity. Even if you were mining, you will still see many unused addresses. The Bitcoin earned from mining would be associated with a used address.

Bitcoin Core by default will generate 1000 (previously 100) unused keys to be used in the "keypool". The keypool is the pool of unused keys and is used as a lookahead. This is useful when you restore a backup. The unused keys you are seeing are this keypool.

Answered by Andrew Chow on October 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP