Bitcoin Forum
April 21, 2014, 02:42:20 PM *
News: Due to the OpenSSL heartbleed bug, changing your forum password is recommended.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: question: change addresses, multiple transactions, wallet backups in bitcoin-QT  (Read 352 times)
asdf123
Newbie
*
Offline Offline

Activity: 10


View Profile

Ignore
January 14, 2014, 01:51:14 PM
 #1

Hi there. Total newbie questions, I've done lots of googling & youtube-ing about bitcoin, but am not clear about the following issues.  Would like to be clear before I start trying to actually move any funds.  Could someone advise please?  Sorry about length of my questions.


I've installed the bitcoin-qt client.  
Say I have 1.5 BTC in my confirmed balance, that all came from one single receipt of 1.5 BTC.  So this is all on one address in my wallet.
Say I want to send 1 BTC to some address.
I enter the details to make the payment, incl. say a 0.0005 transaction fee for the miners, and send.  My remaining balance would be  0.4995 BTC.

I understand that when I send bitcoins to some other address, in the above case the client will send out the 1.5 BTC from my previous transaction balance, sending 1 BTC to the address I am paying, plus the 0.0005 BTC transaction fee, and send the change of 0.4995 BTC back to me, to a 'change address' that is hidden in the client.  

For security, say I am normally storing my wallet.dat in an encrypted folder on external USB sticks, and don't keep it on the hard drive, having created addresses in this wallet previously.  So I let bitcoin-qt client start up, and sync with network to catch up with the blockchain.  The wallet.dat that bitcoin-qt sees at this point is an empty one, the one it creates by default.

Now to make a payment I disconnect from the net, quit bitcoin client, and copy my backed up wallet.dat onto hard drive, overwriting the empty wallet.dat.  Start bitcoin client, bitcoin-qt sees my real wallet and knows my balance, I enter all the payment details, re-connect to the net and hit send.  Disconnect from net.  This means my actual wallet is exposed to an online machine for the minimum time, for security.    

Q1 - is best practice that I should now make a backup of the wallet.dat I just used, rather than just delete it and rely upon my earlier backups?   I'm thinking that the (hidden) change address that bitcoin created to arrange for my 0.4995 to be sent back to me will be one that my earlier backed up wallets will not know about, so would I lose the change if I don't make fresh backups every time I send BTC in this way?

Q2 - if I want to simultaneously send the 1.0005 BTC out, and at the same time clear out all remaining funds in that address by doing another transaction that sends 0.4995 BTC to another address of mine, is that possible right away, or do I have to wait?

I'm thinking here that my first transaction has effectively used up all my 1.5 BTC, and until the change comes back (i.e. until the blocks are created that confirm the transaction), I don't have any more funds to send?  Is that correct?  So I have to wait 10 mins for the first block, and longer for confirmations to be safe, before I can then send the 0.4995 anywhere?

Q3 - I am wondering why the default behaviour of bitcoin-qt client is that change is sent back to a hidden address?  I'm sure there must be some reason which I haven't understood.  Isn't hiding the change address going to result in a lot of ppl not realising it's in a hidden address, and what if they lose access to it through not realising they need to know the private keys of not only the addresses they have openly created, but the private keys of these hidden change addresses that the client has secretly created as well?

Thanks for your help in understanding the above.
1398091340
Hero Member
*
Offline Offline

Posts: 1398091340

View Profile Personal Message (Offline)

Ignore
1398091340
Reply with quote  #2

1398091340
Report to moderator
1398091340
Hero Member
*
Offline Offline

Posts: 1398091340

View Profile Personal Message (Offline)

Ignore
1398091340
Reply with quote  #2

1398091340
Report to moderator
1398091340
Hero Member
*
Offline Offline

Posts: 1398091340

View Profile Personal Message (Offline)

Ignore
1398091340
Reply with quote  #2

1398091340
Report to moderator
    mBitCASINOWIN BITCOINS IN OUR
24/7 LIVE DEALER CASINO

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1398091340
Hero Member
*
Offline Offline

Posts: 1398091340

View Profile Personal Message (Offline)

Ignore
1398091340
Reply with quote  #2

1398091340
Report to moderator
1398091340
Hero Member
*
Offline Offline

Posts: 1398091340

View Profile Personal Message (Offline)

Ignore
1398091340
Reply with quote  #2

1398091340
Report to moderator
1398091340
Hero Member
*
Offline Offline

Posts: 1398091340

View Profile Personal Message (Offline)

Ignore
1398091340
Reply with quote  #2

1398091340
Report to moderator
BlockChainLottery
Member
**
Offline Offline

Activity: 112

Play on blockchainlottery.com


View Profile WWW

Ignore
January 14, 2014, 02:13:34 PM
 #2

A1 - I know the wallet.dat file contains a pool of addresses, so if you don't use a lot of addresses it wouldn't be necessary to backup. But I would do it anyway if I were you, because it could happen. Also your new wallet.dat file contains previous transactions, that way you know what your balance is.
A2 - You can do that right away, because you own the change address.
A3 - For the ones not tech savvy, they shouldn't be bothered dealing with different addresses I think. Maybe it isn't perfect yet, still waiting for some killer app.

blockchainlottery.com
Play with only BTC 0.001, buy a ticket using 1BCL1B5TbGRdoccRJWmYBQqMVYvP9Qsdsp.
Play with only BTC 0.001XXXXX with XXXXX between 00001 - 65536, buy a ticket using 1BCL2ccUwEF92JpyPp7WG4rC4VuGRBGCKr.
torusJKL
Sr. Member
****
Offline Offline

Activity: 359


View Profile

Ignore
January 14, 2014, 02:52:15 PM
 #3

Q3 makes a very good point.
I did loose some bitcoins in the very beginning because of this.

If you find my post useful send some BTC: 167XM1Za8aG9CdbYuHFMpL2kvPsw6uC8da
bitcoin-otc
DannyHamilton
Hero Member
*****
Online Online

Activity: 686



View Profile

Ignore
January 14, 2014, 08:14:33 PM
 #4

For security, say I am normally storing my wallet.dat in an encrypted folder on external USB sticks, and don't keep it on the hard drive, having created addresses in this wallet previously.  So I let bitcoin-qt client start up, and sync with network to catch up with the blockchain.  The wallet.dat that bitcoin-qt sees at this point is an empty one, the one it creates by default.

Now to make a payment I disconnect from the net, quit bitcoin client, and copy my backed up wallet.dat onto hard drive, overwriting the empty wallet.dat.  Start bitcoin client, bitcoin-qt sees my real wallet and knows my balance, I enter all the payment details, re-connect to the net and hit send.  Disconnect from net.  This means my actual wallet is exposed to an online machine for the minimum time, for security.

If you're really going to go through all that effort, you should seriously consider getting a cheap second computer to keep offline at all times and just running Armory.

Q1 - is best practice that I should now make a backup of the wallet.dat I just used, rather than just delete it and rely upon my earlier backups?   I'm thinking that the (hidden) change address that bitcoin created to arrange for my 0.4995 to be sent back to me will be one that my earlier backed up wallets will not know about, so would I lose the change if I don't make fresh backups every time I send BTC in this way?

By default, Bitcoin-Qt pre-generates 100 private keys / addresses when it creates a new wallet.dat.  Anytime it needs a new address (for change, or because you clicked the "New Address" button), it takes it from this queue of addresses that are already stored in the wallet.dat and then adds a new address on to the end of the file.

As such, the backup that you have already has the "change" address in it as long as you created the backup less than 100 addresses/transactions ago.

Q2 - if I want to simultaneously send the 1.0005 BTC out, and at the same time clear out all remaining funds in that address by doing another transaction that sends 0.4995 BTC to another address of mine, is that possible right away, or do I have to wait?

It is possible to do right away.  In the "send" tab, you can choose to "Add Recipient" to send to more than one person/address with a single transaction.

I'm thinking here that my first transaction has effectively used up all my 1.5 BTC, and until the change comes back (i.e. until the blocks are created that confirm the transaction), I don't have any more funds to send?  Is that correct?

No.  Bitcoin-Qt is aware of the transactions that it creates.  It trusts itself not to double spend a transaction that it is sending to itself, so it allows you to use the outputs of that transaction that are sent back to yourself immediately in another transaction (although that next transaction will likely require a transaction fee since the inputs won't have built up enough priority yet).

So I have to wait 10 mins for the first block, and longer for confirmations to be safe, before I can then send the 0.4995 anywhere?

Generally, most users won't run into such a problem.  However, if you are swapping wallet.dat files in and out, and you are sending a transaction with one wallet.dat to an address that is only in some other wallet.dat, then yes you'll have to wait for confirmations before Bitcoin-Qt will let you use the bitcoins.

Q3 - I am wondering why the default behaviour of bitcoin-qt client is that change is sent back to a hidden address?  I'm sure there must be some reason which I haven't understood.  Isn't hiding the change address going to result in a lot of ppl not realising it's in a hidden address, and what if they lose access to it through not realising they need to know the private keys of not only the addresses they have openly created, but the private keys of these hidden change addresses that the client has secretly created as well?

It seems that Bitcoin-Qt was created with the assumption that people would install it and use it.  (Not play around with deleting some of its data files, moving pieces to other drives, and importing and exporting keys)

For the average user that expects to be able to send and receive money like they do with a bank account, it would only add confusion to show these "change" addresses.  This is a protocol layer technical detail, and the wallet is designed to add a layer of abstraction so the user only needs to think about where they want to send the money, and how much they want to send (without needing to know all the intricate technical details about how such a transaction is handled at the protocol level).

Those who intend to use the software in advanced technical ways, are expected to know what they are doing.

As an alanogy: If I want to drive my car, I put the key in, turn it, move the lever to the "D" position and push the pedal near the floor.  I don't need to understand gear ratios, compression ratios, fueal air mixtures, torque, valve timing, etc.  If I decide that I want to play around with modfying valve timing, or replacing the fuel with an alternative fuel, then I'm expected to either understand fully what I am doing, or suffer the consequences.

GPG ID: 20CA5E05, OTC ID: DannyHamilton
Escrow service available (send PM) - tips appreciated
My escrow addresses will always be GPG signed. Verify signature!
asdf123
Newbie
*
Offline Offline

Activity: 10


View Profile

Ignore
January 15, 2014, 10:19:40 AM
 #5


It seems that Bitcoin-Qt was created with the assumption that people would install it and use it.  (Not play around with deleting some of its data files, moving pieces to other drives, and importing and exporting keys)

For the average user that expects to be able to send and receive money like they do with a bank account, it would only add confusion to show these "change" addresses.  This is a protocol layer technical detail, and the wallet is designed to add a layer of abstraction so the user only needs to think about where they want to send the money, and how much they want to send (without needing to know all the intricate technical details about how such a transaction is handled at the protocol level).

Those who intend to use the software in advanced technical ways, are expected to know what they are doing.

As an alanogy: If I want to drive my car, I put the key in, turn it, move the lever to the "D" position and push the pedal near the floor.  I don't need to understand gear ratios, compression ratios, fueal air mixtures, torque, valve timing, etc.  If I decide that I want to play around with modfying valve timing, or replacing the fuel with an alternative fuel, then I'm expected to either understand fully what I am doing, or suffer the consequences.


Thanks for the helpful answers, but I don't agree your above analogy.
The bitcoin-qt client expects users to make backups of the wallet.dat file, it offers a 'backup wallet' option in the menu.  So I would say it expects that this particular data file will be stored on other drives for future restoration.

There's nothing 'advanced' about restoring a backed up wallet file.

But there is no warning in the software that, as you've explained, any backup will only be good as long as it doesn't get older than 100 addresses/transactions behind the live wallet, after which any change the user receives will be going into addresses that the backup knows nothing about and can never access.

That means lost coins, possibly amounting to a huge sum of money, and there's no warning of that in the software. If bitcoin wants mass adoption and wants to be taken seriously for handling large sums, the official wallet client has to either show all the addresses coins are being stored in, so the user knows exactly where their money is, or it should warn (and warn in very big letters) that backups older than 100 transactions will lose some of your coins.
BlockChainLottery
Member
**
Offline Offline

Activity: 112

Play on blockchainlottery.com


View Profile WWW

Ignore
January 15, 2014, 10:41:50 AM
 #6

That's inherent of using any backup. Between a current copy and a backup, things have changed. So between those, information always is lost. But maybe it can't hurt to tell people that that should be done before someone used up 100 addresses. But Bitcoin-QT isn't perfect, and because you run it yourself it's your responsibility. With online wallets you don't have this problem, except you have to trust the company behind it.

blockchainlottery.com
Play with only BTC 0.001, buy a ticket using 1BCL1B5TbGRdoccRJWmYBQqMVYvP9Qsdsp.
Play with only BTC 0.001XXXXX with XXXXX between 00001 - 65536, buy a ticket using 1BCL2ccUwEF92JpyPp7WG4rC4VuGRBGCKr.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!