Bitcoin Forum
December 25, 2024, 03:14:17 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Question about wallet.dat  (Read 903 times)
RB25 (OP)
Hero Member
*****
Offline Offline

Activity: 831
Merit: 500


BitSong is a decentralized music streaming platfor


View Profile
May 28, 2014, 09:58:35 PM
 #1

Hello-

  If I have a copy of my wallet.dat file, no matter how old, if I reformat my computer and replace the wallet file, will the wallet re-sync with the most recent balance of coins? Example: I saved a copy of my wallet.dat file 3 months ago on a flash drive. Yesterday, I reformatted and made the mistake of not updating the wallet.dat file with the latest coin balance. If I put the old wallet.dat file in the folder and re-sync the wallet, will the newer coins populate to the wallet address, despite the file being 3 months old?

Thank you

.BITSONG.
████
████
████
████
████    ████
████    ████
████    ████
████    ████
████    ████
████    ████

            ████
            ████
            ████
            ████
████    ████
████    ████
████    ████
████    ████
████    ████
████    ████
██
██
██
██
██        ██
██  ██  ██  ██
██  ██  ██  ██
██  ██  ██  ██
██  ██  ██  ██
      ██  ██  ██
            ██
.▬▬▬▬TELEGRAM▬▬▬▬.
⇪  CHANNEL   ⇪    GROUP   ⇪
Twitter  Facebook  Medium
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1540


No I dont escrow anymore.


View Profile
May 28, 2014, 10:04:51 PM
 #2

Hello-

  If I have a copy of my wallet.dat file, no matter how old, if I reformat my computer and replace the wallet file, will the wallet re-sync with the most recent balance of coins? Example: I saved a copy of my wallet.dat file 3 months ago on a flash drive. Yesterday, I reformatted and made the mistake of not updating the wallet.dat file with the latest coin balance. If I put the old wallet.dat file in the folder and re-sync the wallet, will the newer coins populate to the wallet address, despite the file being 3 months old?

Thank you

The short answer is: maybe. I assume you use bitcoin core (because wallet.dat), which pregenerates private keys for you. If you have only used "new keys" that where allready pre generated for you 3 month ago, you have no problem. If you however used a lot of new addresses within these 3 month you might have bad luck.

Im not really here, its just your imagination.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3514
Merit: 4895



View Profile
May 28, 2014, 10:13:32 PM
 #3

But if some coins were ++ into your account and you didn't backup those private keys - then those will be gone.

Correct me if I am wrong.

You are wrong.

shorena was correct.

The wallet pre-generates the next 100 addresses (and private keys) that it will use.  Each time you request a new address the wallet gets the address from this pre-generated pool.  Each time you send a transaction, the wallet sends the change from the transaction to a new address from this pre-generated pool.

As long as your wallet hasn't used more than 100 addresses since your last backup, you will still be able to recover the bitcoins that were received AFTER the wallet was backed up.

roslinpl
Legendary
*
Offline Offline

Activity: 2212
Merit: 1199


View Profile WWW
May 28, 2014, 10:23:40 PM
 #4

But if some coins were ++ into your account and you didn't backup those private keys - then those will be gone.

Correct me if I am wrong.

You are wrong.

shorena was correct.

The wallet pre-generates the next 100 addresses (and private keys) that it will use.  Each time you request a new address the wallet gets the address from this pre-generated pool.  Each time you send a transaction, the wallet sends the change from the transaction to a new address from this pre-generated pool.

As long as your wallet hasn't used more than 100 addresses since your last backup, you will still be able to recover the bitcoins that were received AFTER the wallet was backed up.



well Smiley we are learning all the time Smiley Thanks for your answer and for correcting my words. I must say I totally forgot about this feature as I indeed heard about it before.
Now I will remember this till the end of my life Smiley

100 transactions is a lot so perhaps OP will be able to recover all of his coins in this case.

RB25 (OP)
Hero Member
*****
Offline Offline

Activity: 831
Merit: 500


BitSong is a decentralized music streaming platfor


View Profile
May 28, 2014, 10:35:03 PM
 #5

So, if I understand this right, the wallet.dat file connects the wallet address to the blockchain so it can update the coins associated with that address? As long as I have a wallet.dat backup file with a single wallet address, I should be able to "download" all the coins associated with that address to the wallet regardless of the age of the back-up file?

.BITSONG.
████
████
████
████
████    ████
████    ████
████    ████
████    ████
████    ████
████    ████

            ████
            ████
            ████
            ████
████    ████
████    ████
████    ████
████    ████
████    ████
████    ████
██
██
██
██
██        ██
██  ██  ██  ██
██  ██  ██  ██
██  ██  ██  ██
██  ██  ██  ██
      ██  ██  ██
            ██
.▬▬▬▬TELEGRAM▬▬▬▬.
⇪  CHANNEL   ⇪    GROUP   ⇪
Twitter  Facebook  Medium
roslinpl
Legendary
*
Offline Offline

Activity: 2212
Merit: 1199


View Profile WWW
May 28, 2014, 10:39:25 PM
 #6

So, if I understand this right, the wallet.dat file connects the wallet address to the blockchain so it can update the coins associated with that address? As long as I have a wallet.dat backup file with a single wallet address, I should be able to "download" all the coins associated with that address to the wallet regardless of the age of the back-up file?

Yes. And according to infos posted above - if you didn't made more than 100s transaction from a day of backup you will have all of your coins back to your wallet after importing your wallet.dat and synchronizing wallet with a blockchain.
It doesn't matter how old it is. Time doesn't matter as blockchain will recognize all of the private keys from the past.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3514
Merit: 4895



View Profile
May 28, 2014, 10:49:08 PM
 #7

As long as I have a wallet.dat backup file with a single wallet address,

Bitcoin-Qt (or as the newer version is called, Bitcoin Core) uses a new address for change that it keeps hidden from you and doesn't tell you about every time you send bitcoins in a transaction.  Therefore, if you have ever sent any bitcoins anywhere, then your wallet is already using more than one address (you just don't know it).

As long as the total sum of both the bitcoin addresses that you generated for receiving bitcoins AND the number of transactions that you've sent since your last backup is less than 100, then your wallet should have all the information it needs to recover access to all your bitcoins in the blockchain.
RB25 (OP)
Hero Member
*****
Offline Offline

Activity: 831
Merit: 500


BitSong is a decentralized music streaming platfor


View Profile
May 28, 2014, 10:52:15 PM
 #8

As long as I have a wallet.dat backup file with a single wallet address,

Bitcoin-Qt (or as the newer version is called, Bitcoin Core) uses a new address for change that it keeps hidden from you and doesn't tell you about every time you send bitcoins in a transaction.  Therefore, if you have ever sent any bitcoins anywhere, then your wallet is already using more than one address (you just don't know it).

As long as the total sum of both the bitcoin addresses that you generated for receiving bitcoins AND the number of transactions that you've sent since your last backup is less than 100, then your wallet should have all the information it needs to recover access to all your bitcoins in the blockchain.

Does this also hold true for altcoins? I am not trying to make this an off-topic reply, but just asking since it seems all of the altcoin wallets are based off of the bitcoin wallet.

.BITSONG.
████
████
████
████
████    ████
████    ████
████    ████
████    ████
████    ████
████    ████

            ████
            ████
            ████
            ████
████    ████
████    ████
████    ████
████    ████
████    ████
████    ████
██
██
██
██
██        ██
██  ██  ██  ██
██  ██  ██  ██
██  ██  ██  ██
██  ██  ██  ██
      ██  ██  ██
            ██
.▬▬▬▬TELEGRAM▬▬▬▬.
⇪  CHANNEL   ⇪    GROUP   ⇪
Twitter  Facebook  Medium
DannyHamilton
Legendary
*
Offline Offline

Activity: 3514
Merit: 4895



View Profile
May 28, 2014, 10:56:30 PM
 #9

Does this also hold true for altcoins? I am not trying to make this an off-topic reply, but just asking since it seems all of the altcoin wallets are based off of the bitcoin wallet.

That really depends on how the developer of the alt-coin chooses to write the program.  If it is exactly the same as Bitcoin-Qt (now called Bitcoin Core) with a new genesis block, or a few extremely minor tweaks, then yes it would be true for the alt-coin.

However, an altcoin developer can create an entirely new system that, while based on the same concept of distributed consensus, may not use much of the same wallet code as Bitcoin at all.
bigdave
Full Member
***
Offline Offline

Activity: 224
Merit: 100


View Profile
May 28, 2014, 11:45:42 PM
 #10

As long as I have a wallet.dat backup file with a single wallet address,

Bitcoin-Qt (or as the newer version is called, Bitcoin Core) uses a new address for change that it keeps hidden from you and doesn't tell you about every time you send bitcoins in a transaction.  Therefore, if you have ever sent any bitcoins anywhere, then your wallet is already using more than one address (you just don't know it).

As long as the total sum of both the bitcoin addresses that you generated for receiving bitcoins AND the number of transactions that you've sent since your last backup is less than 100, then your wallet should have all the information it needs to recover access to all your bitcoins in the blockchain.

I use the latest Bitcoin Core and this statement does not make me feel all warm in fuzzy inside if my hard drive ever takes a shit and I have to restore from my backup wallet.dat.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3514
Merit: 4895



View Profile
May 29, 2014, 12:03:41 AM
 #11

As long as I have a wallet.dat backup file with a single wallet address,

Bitcoin-Qt (or as the newer version is called, Bitcoin Core) uses a new address for change that it keeps hidden from you and doesn't tell you about every time you send bitcoins in a transaction.  Therefore, if you have ever sent any bitcoins anywhere, then your wallet is already using more than one address (you just don't know it).

As long as the total sum of both the bitcoin addresses that you generated for receiving bitcoins AND the number of transactions that you've sent since your last backup is less than 100, then your wallet should have all the information it needs to recover access to all your bitcoins in the blockchain.

I use the latest Bitcoin Core and this statement does not make me feel all warm in fuzzy inside if my hard drive ever takes a shit and I have to restore from my backup wallet.dat.

Keep a regular schedule of backups, and you shouldn't have a problem.

If you think you'll go through 100 addresses to quickly for a reasonable duration between backups, then you can increase the size of the pool with a setting in bitcoin.conf
RB25 (OP)
Hero Member
*****
Offline Offline

Activity: 831
Merit: 500


BitSong is a decentralized music streaming platfor


View Profile
June 01, 2014, 12:01:46 AM
 #12

Follow-up:

  It worked for Bitcoin Core 0.9.1 with an old wallet file and most of the altcoin wallet files I saved. The only one that didn't totally update was and altcoin wallet that is a dead coin anyway.

Thanks and I hope this helps others.

.BITSONG.
████
████
████
████
████    ████
████    ████
████    ████
████    ████
████    ████
████    ████

            ████
            ████
            ████
            ████
████    ████
████    ████
████    ████
████    ████
████    ████
████    ████
██
██
██
██
██        ██
██  ██  ██  ██
██  ██  ██  ██
██  ██  ██  ██
██  ██  ██  ██
      ██  ██  ██
            ██
.▬▬▬▬TELEGRAM▬▬▬▬.
⇪  CHANNEL   ⇪    GROUP   ⇪
Twitter  Facebook  Medium
darlidada
Hero Member
*****
Offline Offline

Activity: 723
Merit: 503


View Profile
June 01, 2014, 09:11:07 PM
 #13

guys, just stop with this wallet.dat non sense and go use a deterministic wallet such as electrum

there no need to backup any file, you just have to remember 12 words and you are done!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!