Bitcoin Forum
April 26, 2024, 08:05:42 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: How do wallets work? -- help the newbie with a multiple backups of diff. wallets  (Read 2873 times)
ChupacabraHunter (OP)
Member
**
Offline Offline

Activity: 73
Merit: 10


Chupacabra = Corrupt Gov't,Lies and Fraud


View Profile
June 19, 2011, 10:45:03 AM
Last edit: June 19, 2011, 10:58:45 AM by ChupacabraHunter
 #1

Dear Techies,

Please explain, how these wallet.dat files work.

for example:

I bought some bitcoins now 4 different times.  I also have been 'playing' and demonstrating the bitcoin client to family and friends.

So, because I read that it is important to backup your most recent wallet file, and really hide your 'big stash' which for me is about 100 BTC... I now have about 7 different backups, with different times and dates and amounts.

Some contain 0.24 BTC, some contain 100 BTC, and some have 22.34 BTC.

The confusion is that as I was backing them up into an encrypted ZIP file, I named each wallet##.##.zip file where the ##.## shows the total at the time of backup.  I saved these files in 3 different places, and so now I have about 10 files with different amounts and I am not sure which goes with which because some were brand new wallets, some were backups of those I kept adding to, and playing with, and saving at different times.  Is there a way to make sure I don't spend from the wrong one and invalidate another 'backup' of the same wallet, and somehow loose bitcoins.

or

Am I safe to try and spend all the backups into one MAIN (new) wallet.dat file and collect everything into one?  (and those that I double spend will simply not work or something)

Please help!

Thanks
The forum was founded in 2009 by Satoshi and Sirius. It replaced a SourceForge forum.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714118742
Hero Member
*
Offline Offline

Posts: 1714118742

View Profile Personal Message (Offline)

Ignore
1714118742
Reply with quote  #2

1714118742
Report to moderator
Bth8
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
June 19, 2011, 10:48:25 AM
 #2

Wait, are they all backups of the same wallet? If they all contain the same keys, then there's no reason to keep any but the latest, as it should contain all of your bitcoins. If they're separate wallets, i see no reason to have more than one if you're just going to keep them all in the same zip folder.
DamienBlack
Jr. Member
*
Offline Offline

Activity: 56
Merit: 1


View Profile
June 19, 2011, 10:54:41 AM
 #3

Wallets just keep track of the addresses you own. The wallet figures out how much it contains by scanning the block chain that the client gets from the p2p system to see which bitcoins are allocated to those addresses. Since scanning the block chain takes a while, each wallet "remembers" the amount of bitcoins that should be in them. But that "memory" has no effect on how much you really have. What you really have is stored on everyone's computer in the form of the block chain. The wallet just contains the keys to unlock them.

To organize yourself, feel free to consolidate all of your funds to one wallet. DO NOT DELETE THE OLD WALLETS, there is no reason to, and if you ever do something wrong it might come in handy. If you load up a backup of an old wallet, it might think you have more then you really do for a little while, but once it finishes updating itself to the current status of the block chain it will realize that those coins have been removed. Any attempt to spend coins that have already been moved will simply be rejected by the system.

A good analogy is to imagine a giant underground vault with trillions of metal safes. You claim one of these safes as your own. In the safe there is a little coin slot, like a piggy back. You give the address of the safe to people who want to pay you. They pay by slipping coins into the coin slot. Your wallet doesn't actually hold any of the coins, it just holds a key to open the safe. Each wallet contains many keys, for many addresses.

Just load up each wallet and send the money to one address that you are sure you have the wallet for. There is no way to "lose" the bitcoins, even if you accidentally double spend. The only way to lose them is if you don't have the right wallet for the address you are sending them to. The only way to lose access is to lose they key, then those fund will be locked there forever.
ChupacabraHunter (OP)
Member
**
Offline Offline

Activity: 73
Merit: 10


Chupacabra = Corrupt Gov't,Lies and Fraud


View Profile
June 19, 2011, 11:12:24 AM
 #4

Wait, are they all backups of the same wallet? If they all contain the same keys, then there's no reason to keep any but the latest, as it should contain all of your bitcoins. If they're separate wallets, i see no reason to have more than one if you're just going to keep them all in the same zip folder.

Thanks for answering, they are backups of different wallet files. There were about 3-4 different wallets which were used to send/receive a few times each.  And I made backups of each sporadically so now I have about 10-12 different backups total.  I just want to make sure I don't screw up.

I am reading DamienBlack's post.  If I understand correctly I have nothing to worry about.

If I do try and spend more than the actual amount in a wallet (backup) will it spend what it can, or will it only spend if I waited for the wallet amount to update, and spend the exact amount that it says?

And what if it actually has more than my backup shows (while it is updating), and I spend less... and then later more will show up or something?

[I know this is a bit convoluted, but it is really what I did, and I am getting a bit nervous that I will screw up somehow, I remember reading that someone lost 9000 BTC because he didn't have the most recent backup after he spent 1 BTC and his total became ZERO because he was missing the key to the address that was supposed to show that 1 BTC.   Apparently it was the problem that the system sent his total wallet amount, and the receiver got the 1 BTC and the remainder had nowhere to come back to]

DamienBlack
Jr. Member
*
Offline Offline

Activity: 56
Merit: 1


View Profile
June 19, 2011, 11:16:30 AM
Last edit: June 19, 2011, 11:27:06 AM by DamienBlack
 #5

When you load up the backups of different wallets, I recommend running bitcoin with the -rescan option. This will tell bitcoin to ignore how much the wallet "remembers" having and recheck how much it actually has. This way, you don't even have to worry about any of the issues you bring up.

To use the rescan option in windows, alter the shortcut to have -rescan at the end, or open up the command prompt and run the .exe with -rescan at the end.

The problem with the person you mention has nothing to do with the fact that the the coin "had no where to come back to". What happened is that he added a new address to his wallet, and sent the money to that new address. But he didn't back up a file that contained that new key and deleted the new wallet. So he lost the key forever. As long as you send the money to an address you know you have control of, and DO NOT DELETE ANY WALLETS, you should not have a problem consolidating your funds.


Here is what he did:

Made a wallet with one address
Backed up that wallet
Added a new address to the wallet on his hard drive
Sent all the money to that new address
Deleted that wallet on his hard drive
Loaded up his backup that only had the key for the first address not the new address

The main mistake was deleting the wallet. Don't delete any of them, that is the only way to mess up.

EDIT: This wasn't completely his fault, since wallets are suppose to create 100 addresses for you to use, so the second address should have been in the backup, but there was a bug. Still, it would have never have happened if he didn't delete the wallet.
aeroSpike
Newbie
*
Offline Offline

Activity: 41
Merit: 0


View Profile
June 19, 2011, 12:52:56 PM
 #6

I suggest you create a new wallet, copy its default address, and close it and back it up in a safe place. Now run your Bitcoin client with your backup wallets one by one with the -rescan option as DamianBlack suggested. Wait until the block chain scan has finished and transfer the full balance to your new wallet. Now close the bitcoin client, open your next backed up wallet and do the same. Repeat for all your backups. Start the bitcoin client with your newly created wallet and wait for all your transfers to arrive and confirm. Now you have a single wallet with all your bitcoins and all your backups can be safely deleted.
ChupacabraHunter (OP)
Member
**
Offline Offline

Activity: 73
Merit: 10


Chupacabra = Corrupt Gov't,Lies and Fraud


View Profile
June 19, 2011, 01:34:01 PM
 #7

I suggest you create a new wallet, copy its default address, and close it and back it up in a safe place. Now run your Bitcoin client with your backup wallets one by one with the -rescan option as DamianBlack suggested. Wait until the block chain scan has finished and transfer the full balance to your new wallet. Now close the bitcoin client, open your next backed up wallet and do the same. Repeat for all your backups. Start the bitcoin client with your newly created wallet and wait for all your transfers to arrive and confirm. Now you have a single wallet with all your bitcoins and all your backups can be safely deleted.

Thanks DamienBlack and aeroSpike!

I kinda thought that is how it all works, but I was a bit confused, and nervous.  I will do as you instructed above, but I will wait one more day, just to see if anyone else chimes in with any other good ideas with regards to this.
TiagoTiago
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500


Firstbits.com/1fg4i :)


View Profile
June 19, 2011, 02:25:09 PM
 #8

Wallets are more like keychains than real wallets, the money isn't stored in them they just give you the means to use it.



It's practicly free to create new safes and keys, the client actually creates new ones automaticly somtimes; the safes are kept in the blockchain and the keys on the wallet.dat.  The issue with having multiple copies of a single wallet each copied in different points in time is that you risk the older copies not having some of the newer keys, and without those keys you can't get to the money in the safes those keys open; if you loose a key and don't got any copies of that key the money stays locked forever (it's actually quite hard to guess the right key for a given safe, the number of possible shapes is absurdly high)

(I dont always get new reply notifications, pls send a pm when you think it has happened)

Wanna gimme some BTC/BCH for any or no reason? 1FmvtS66LFh6ycrXDwKRQTexGJw4UWiqDX Smiley

The more you believe in Bitcoin, and the more you show you do to other people, the faster the real value will soar!

Do you like mmmBananas?!
aeroSpike
Newbie
*
Offline Offline

Activity: 41
Merit: 0


View Profile
June 19, 2011, 02:48:22 PM
 #9

Wallets are more like keychains than real wallets, the money isn't stored in them they just give you the means to use it.

In fact, the word bitcoin is misleading itself. It suggests there is a virtual coin, like a file or record with a sequence of bytes, that can be stored somewhere. The wallet concept also suggest that there is such a byte sequence.
In reality however a bitcoin is even more virtual than this. It is simply the outcome of a sequence of calculations stored in a distributed database (the block chain).
TiagoTiago
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500


Firstbits.com/1fg4i :)


View Profile
June 19, 2011, 03:04:46 PM
 #10

They're not even a whole thing, more like a quantity, like water being poured to and from buckets.

(I dont always get new reply notifications, pls send a pm when you think it has happened)

Wanna gimme some BTC/BCH for any or no reason? 1FmvtS66LFh6ycrXDwKRQTexGJw4UWiqDX Smiley

The more you believe in Bitcoin, and the more you show you do to other people, the faster the real value will soar!

Do you like mmmBananas?!
thefussydutchman
Full Member
***
Offline Offline

Activity: 142
Merit: 100

BTC- Its not a bubble.


View Profile
June 19, 2011, 03:05:08 PM
 #11

Thank you this info has been very helpful!
nosfera2
Newbie
*
Offline Offline

Activity: 42
Merit: 0



View Profile
June 19, 2011, 05:49:05 PM
 #12

I've been through as many of the backup and security threads as I could find and I still have a couple of questions:

1) Is it possible to create a valid wallet while offline, on an air-gapped computer that has never been and will never be connected to the internet?

2) If so, can bitcoin be run in offline mode to monitor your savings by downloading the blocks on another system and tranferring to the air-gapped one? I understand you need to be online to spend, but I'm thinking of a savings account here.
ChupacabraHunter (OP)
Member
**
Offline Offline

Activity: 73
Merit: 10


Chupacabra = Corrupt Gov't,Lies and Fraud


View Profile
June 21, 2011, 06:41:42 AM
 #13

Thank you for all your answers too.  I am honestly still shaking from what is going on with Mt Gox.  I had 10 btc there, most of the rest was transfered out and backed-up (multiple times  Wink

I haven't consolidated things, yet.  But once I do, I will tell you how it went.

All the clear, and simple explanations helped me a lot here.  Thanks.
ChupacabraHunter (OP)
Member
**
Offline Offline

Activity: 73
Merit: 10


Chupacabra = Corrupt Gov't,Lies and Fraud


View Profile
June 22, 2011, 09:21:20 AM
 #14

I suggest you create a new wallet, copy its default address, and close it and back it up in a safe place. Now run your Bitcoin client with your backup wallets one by one with the -rescan option as DamianBlack suggested. Wait until the block chain scan has finished and transfer the full balance to your new wallet. Now close the bitcoin client, open your next backed up wallet and do the same. Repeat for all your backups. Start the bitcoin client with your newly created wallet and wait for all your transfers to arrive and confirm. Now you have a single wallet with all your bitcoins and all your backups can be safely deleted.

If I delete the backups, and in the future someone sends money to one of those accounts because I emailed them that particular address "for fun, testing purposes" or whatever, I guess those funds will be lost for ever.

Also, I noticed that when I go to view the list of addresses I see a different number in each of the backups. And some of the addresses are not in my address book even though they are ones I received BTC with (I can see them on the main screen of bitcoin.exe)

Why is that? 
JoelKatz
Legendary
*
Offline Offline

Activity: 1596
Merit: 1012


Democracy is vulnerable to a 51% attack.


View Profile WWW
June 22, 2011, 11:44:04 AM
 #15

1) Is it possible to create a valid wallet while offline, on an air-gapped computer that has never been and will never be connected to the internet?
Yes.

Quote
2) If so, can bitcoin be run in offline mode to monitor your savings by downloading the blocks on another system and tranferring to the air-gapped one? I understand you need to be online to spend, but I'm thinking of a savings account here.
There's really no need to run anything. Once you know the address(es) for the wallet, you can transfer to them. You can get the balance using block explorer.

I am an employee of Ripple. Follow me on Twitter @JoelKatz
1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
ChupacabraHunter (OP)
Member
**
Offline Offline

Activity: 73
Merit: 10


Chupacabra = Corrupt Gov't,Lies and Fraud


View Profile
June 22, 2011, 03:51:18 PM
 #16

Quote
There's really no need to run anything. Once you know the address(es) for the wallet, you can transfer to them. You can get the balance using block explorer.

Wow, this worked!  Thank you.  I made a new wallet offline.  That gave me an address. I put it on a txt file on my pendrive, and transferred on another computer everything there!

And I checked block explorer, and the 3 sends to that one address show up, showing the total amount. 

Thanks!

Now that is my VAULT... i used ZIP to encrypt the offline wallet using AES 256 with a 20 character sentence password, and uploaded it to my gmail, and dropbox. 
TiagoTiago
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500


Firstbits.com/1fg4i :)


View Profile
June 22, 2011, 07:22:19 PM
 #17

Now tell me where you live and the address of the closest hardware store for me to buy some rubberhose

(I dont always get new reply notifications, pls send a pm when you think it has happened)

Wanna gimme some BTC/BCH for any or no reason? 1FmvtS66LFh6ycrXDwKRQTexGJw4UWiqDX Smiley

The more you believe in Bitcoin, and the more you show you do to other people, the faster the real value will soar!

Do you like mmmBananas?!
ChupacabraHunter (OP)
Member
**
Offline Offline

Activity: 73
Merit: 10


Chupacabra = Corrupt Gov't,Lies and Fraud


View Profile
June 24, 2011, 11:12:37 AM
 #18

Now tell me where you live and the address of the closest hardware store for me to buy some rubberhose

hmm... rubberhose?  don't get it... sorry.
Ian Maxwell
Full Member
***
Offline Offline

Activity: 140
Merit: 100



View Profile WWW
June 24, 2011, 11:46:32 AM
 #19

Now tell me where you live and the address of the closest hardware store for me to buy some rubberhose

hmm... rubberhose?  don't get it... sorry.

http://en.wikipedia.org/wiki/Rubber-hose_cryptanalysis

Ian Maxwell
PGP key | WoT rating
ChupacabraHunter (OP)
Member
**
Offline Offline

Activity: 73
Merit: 10


Chupacabra = Corrupt Gov't,Lies and Fraud


View Profile
June 24, 2011, 02:30:56 PM
 #20

Now tell me where you live and the address of the closest hardware store for me to buy some rubberhose

hmm... rubberhose?  don't get it... sorry.

http://en.wikipedia.org/wiki/Rubber-hose_cryptanalysis

Quote
Although the term is used tongue-in-cheek, its implications are serious: in modern cryptosystems, the weakest link is often the human user.

heheee... thanks! Smiley 

Thank goodness I AM NOT HUMAN!

Grrrrrr.....
Pages: [1] 2 »  All
  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!