Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: CtrlAltBernanke420 on June 04, 2013, 04:17:49 PM



Title: wallet.dat questions
Post by: CtrlAltBernanke420 on June 04, 2013, 04:17:49 PM
Here is the scenairo(s) I want to play out here.

I buy 3.0 bitcoin on Mtgox, I open Bitcoinqt.

I transfer 3.0BTC to Qt wallet address.

I save my wallet.dat file onto a USBdrive. I disconnect zip drive from computer.

I send 2 btc to another address. Current address has 1 bitcoin. Do I need to backup the current wallet.dat file in the library to the USBdrive, if i intend to delete wallet.dat file once I done with my transactions for the day.


Next scenario, Current wallet.dat file on zip drive has 1 btc in it, If i send 5 more btc to that wallet, do I need to combine any wallets.



Title: Re: wallet.dat questions
Post by: akabmikua on June 04, 2013, 04:29:07 PM
Here is the scenairo(s) I want to play out here.

I buy 3.0 bitcoin on Mtgox, I open Bitcoinqt.

I transfer 3.0BTC to Qt wallet address.

I save my wallet.dat file onto a USBdrive. I disconnect zip drive from computer.

I send 2 btc to another address. Current address has 1 bitcoin. Do I need to backup the current wallet.dat file in the library to the USBdrive, if i intend to delete wallet.dat file once I done with my transactions for the day.

Next scenario, Current wallet.dat file on zip drive has 1 btc in it, If i send 5 more btc to that wallet, do I need to combine any wallets.

You need not merge any wallet.dat or anything. Just on the PC you will place this wallet.dat, you will have to download the next parts of the Blockchain.

Bitcoin is NOT based on wallet.dat files but addresses. That address has those BTC's and Transactions.


Title: Re: wallet.dat questions
Post by: DannyHamilton on June 04, 2013, 04:53:39 PM
You need not merge any wallet.dat or anything. Just on the PC you will place this wallet.dat, you will have to download the next parts of the Blockchain.

Bitcoin is NOT based on wallet.dat files but addresses. That address has those BTC's and Transactions.

While the advice is sound, the details are mis-leading.

With default settings, Bitcoin-Qt pre-generates the next 100 addresses (and their private keys) that it will use and stores them hidden from you in the wallet.dat file.

Each time you use a new address, Bitcoin-Qt grabs the next one from this queue, and generates a new one to add to the queue so there are still 100 unused addresses pre-generated.

This means that when you backed up your wallet.dat to the USB, you didn't just back up the addresses you are currently using, but the next 100 address you will use as well.

When you restore the wallet, it will compare it's list of addresses (including the 100 that were previously unused) to all the addresses that are in use in the blockchain.  If the wallet finds any transactions in the blockchain sending to or from any of the addresses in the backup, it will recognize those addresses as "in use" and will move them from being in the queue to the list of used addresses.

Note that your wallet will create a new "in use" address every time you create a transaction to send bitcoins and will send the change there.

This means that if, after backing up, the sum of the receiving addresses you create plus the number of transactions you create is greater than 100 then your bitcoins will have moved to an address that was not backed up.  In this case your bitcoins will be permanently lost if you delete the wallet.dat and don't have a more recent backup.

As such it is a good idea to perform backups on a regular basis and keep the most recent few backups.


Title: Re: wallet.dat questions(Solved)
Post by: Polyatomic on June 09, 2013, 11:11:14 AM
Is it possible to have Two wallets using the same wallet.dat file ?

For example , can I import my Bitcoin-qt 0.8.1 wallet.dat to Blockchain.info while waiting for Bitcoin-qt to download the blockchain after restoring it from a back up.

Or would this just be a pain in the backside.


Title: Re: wallet.dat questions
Post by: KSV on June 09, 2013, 11:15:12 AM
nope, u need a backup every 100 xfers.


Title: Re: wallet.dat questions
Post by: grue on June 09, 2013, 07:09:14 PM
nope, u need a backup every 100 xfers.
or use "keypool=9000" in bitcoin.conf. (your backup will be good for 9000 transactions)


Title: Re: wallet.dat questions
Post by: jackjack on June 10, 2013, 07:13:57 AM
nope, u need a backup every 100 xfers.
or use "keypool=9000" in bitcoin.conf. (your backup will be good for 9000 sent transactions)


Title: Re: wallet.dat questions
Post by: KSV on June 10, 2013, 10:13:37 AM
nope, u need a backup every 100 xfers.
or use "keypool=9000" in bitcoin.conf. (your backup will be good for 9000 transactions)

oh sweet, thanks.

is 9000 the max?


Title: Re: wallet.dat questions
Post by: grue on June 10, 2013, 01:16:46 PM
oh sweet, thanks.

is 9000 the max?
You can set it as high as you want (to a reasonable limit). But that is not recommended because if your wallet in compromised, you will have to get a new wallet, since your future 9000 addresses will be compromised as well. Like jackjack said, if you set keypool=x, it will be good for x sent transactions. I highly doubt you have such high transaction volume to justify a large keypool size, so 500 is more than enough. Just make sure to execute 'keypoolrefill' in the debug console before a backup to ensure maximum backup freshness. :P

nope, u need a backup every 100 xfers.
or use "keypool=9000" in bitcoin.conf. (your backup will be good for 9000 sent transactions)
*at least 9000 sent transactions. :P (there's a slight possibility that inputs == desired outputs)


Title: Re: wallet.dat questions
Post by: DannyHamilton on June 10, 2013, 02:56:28 PM
oh sweet, thanks.

is 9000 the max?
You can set it as high as you want (to a reasonable limit). But that is not recommended because if your wallet in compromised, you will have to get a new wallet, since your future 9000 addresses will be compromised as well. Like jackjack said, if you set keypool=x, it will be good for x sent transactions. I highly doubt you have such high transaction volume to justify a large keypool size, so 500 is more than enough. Just make sure to execute 'keypoolrefill' in the debug console before a backup to ensure maximum backup freshness. :P

nope, u need a backup every 100 xfers.
or use "keypool=9000" in bitcoin.conf. (your backup will be good for 9000 sent transactions)
*at least 9000 sent transactions. :P (there's a slight possibility that inputs == desired outputs)
* approximately 9000 sent transactions. :P (each new receiving address will use an address from the keypool as well).


Title: Re: wallet.dat questions
Post by: farproc on June 11, 2013, 09:18:38 AM
Paper wallet or brain wallet instead.


Title: Re: wallet.dat questions
Post by: kodo on June 12, 2013, 10:53:11 PM
Use a paper wallet its 100% more safe.


Title: Re: wallet.dat questions
Post by: jackjack on June 12, 2013, 10:56:39 PM
Use a paper wallet its 100% more safe.
Not 100%

Lose the paper, you're dead.
Keep it in the pocket before washing, you're dead.
Too much wind, you're dead.
A relative comes and see it, you're dead.
Mice, you're dead.
Stupid dog, you're dead.