Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: Desslok on March 24, 2011, 01:09:34 PM



Title: Use same wallet/address on multiple PCs?
Post by: Desslok on March 24, 2011, 01:09:34 PM
Hello. I'n new (as if you can't tell from my post count :))

Saw the Bitcoin discussion on /. yesterday and am quite intrigued. We're writing a game and for the first version many of the players have asked for other payment alternatives apart from our credit card processor and Paypal. Maybe Bitcoin will fit the bill, I'm not sure yet.

I still have a number of things I'm looking at, but for now my first question is how do I use my bitcoin wallet on multiple PCs? Is there some form of identification that it uses that will allow the bitcoin client to synchronize the wallet between, (for instance) a laptop and a desktop PC?

Thanks!



Title: Re: Use same wallet/address on multiple PCs?
Post by: kiba on March 24, 2011, 01:12:07 PM
I still have a number of things I'm looking at, but for now my first question is how do I use my bitcoin wallet on multiple PCs? Is there some form of identification that it uses that will allow the bitcoin client to synchronize the wallet between, (for instance) a laptop and a desktop PC?

Thanks!

No. There's no identification system built-in the bitcoin network other than your public and private keys.


Title: Re: Use same wallet/address on multiple PCs?
Post by: Desslok on March 24, 2011, 01:28:19 PM
So if I want to use Bitcoin from multiple device I'd have to actually send the bitcoins between the wallets on the two devices?  I'm wondering how that will pan out if I want to use Bitcoin on my smartphone. :(

Seems unwieldy to me, since one would expect to model a wallet after a real wallet where an owner has one wallet and carries it in the pocket of the pants he is wearing that day, rather than tying the wallet to a specific pair of pants and then when he drops the pants in the washer, the wallet gets washed as well! :)


Title: Re: Use same wallet/address on multiple PCs?
Post by: CCCMikey on March 24, 2011, 01:31:30 PM
Yes, but you can't really carry a copy of your wallet. With the plethora of PC remote access software I wouldn't think it'd be a big deal :)


Title: Re: Use same wallet/address on multiple PCs?
Post by: Desslok on March 24, 2011, 02:10:45 PM
Right. So if I then elect to put the walled on a USB Flash drive, can I somehow point the Bitcoin client on each PC to the USB Flas drive to read the wallet from there? Will that work?

Still leaves out the issue with Smartphones, tablets and all the newer computing devices, but one barrier at a time.


Title: Re: Use same wallet/address on multiple PCs?
Post by: TiagoTiago on March 24, 2011, 02:19:17 PM
I thought with the keypair you could both read the amount of money an address has and spend it...


Title: Re: Use same wallet/address on multiple PCs?
Post by: Desslok on March 24, 2011, 02:23:20 PM
I thought with the keypair you could both read the amount of money an address has and spend it...

Interesting, but how? I thought the keypair was integrated into the wallet and tied to the Bitcoin address?


Title: Re: Use same wallet/address on multiple PCs?
Post by: stakhanov on March 24, 2011, 02:53:56 PM
The wallet is just a file. Why not send the wallet over the network?


Title: Re: Use same wallet/address on multiple PCs?
Post by: FooDSt4mP on March 24, 2011, 02:59:42 PM
I thought with the keypair you could both read the amount of money an address has and spend it...

Interesting, but how? I thought the keypair was integrated into the wallet and tied to the Bitcoin address?

wallet.dat contains your keypairs.  I haven't tried it, but it should work fine with multiple clients on multiple machines, as long as you keep the wallet.dat synchronized between the devices.


Title: Re: Use same wallet/address on multiple PCs?
Post by: FooDSt4mP on March 24, 2011, 03:01:52 PM
BTW, transactions are not stored in wallet.dat, so synchronization is fairly easy to maintain.  wallet.dat only changes whena a new group of addresses is generated.  The client pregenerates them 100 at a time, so wallet.dat will only change after you use 100 new addresses.


Title: Re: Use same wallet/address on multiple PCs?
Post by: Garrett Burgwardt on March 24, 2011, 03:13:29 PM
And for reference, I put a copy of my wallet on my laptop and am careful not to double spend, but I have access to my coins in both places.


Title: Re: Use same wallet/address on multiple PCs?
Post by: FooDSt4mP on March 24, 2011, 03:17:21 PM
And for reference, I put a copy of my wallet on my laptop and am careful not to double spend, but I have access to my coins in both places.

Out of curiosity, how long does it take for the unused client to adjust it's balance?  Is it as soon as it receives the transaction broadcast, or does it wait until the transaction is in a block?  It seems like it would be the former, but I haven't tried it or looked at that part of the source.


Title: Re: Use same wallet/address on multiple PCs?
Post by: Garrett Burgwardt on March 24, 2011, 03:17:48 PM
It waits until the transaction is in a block, I think.


Title: Re: Use same wallet/address on multiple PCs?
Post by: Desslok on March 24, 2011, 03:24:39 PM
Right, so if a wallet exists in multiple places it *will* synchronize?


Title: Re: Use same wallet/address on multiple PCs?
Post by: gohan on March 24, 2011, 03:38:43 PM
Right, so if a wallet exists in multiple places it *will* synchronize?
If a new address were generated on your laptop, it would be hidden from your view and kept in reserve, but it would eventually appear in your receiving addresses list (on your laptop) after you create 100 new addresses. And you won't have a copy of it (private key corresponding to the new address) on your desktop. So what I would do is to assume that one of the wallets are the master, and copy it to other devices at an interval, like every month or so. This isn't the same as synchronization though.

I put a copy of my wallet on my laptop and am careful not to double spend

How do you prevent avoid double spending? I have to try it on my N900. :-)


Title: Re: Use same wallet/address on multiple PCs?
Post by: Garrett Burgwardt on March 24, 2011, 03:43:38 PM
I don't send coins if I think there's any possibility of an unverified transaction :)


Title: Re: Use same wallet/address on multiple PCs?
Post by: theymos on March 24, 2011, 06:18:30 PM
Right. So if I then elect to put the walled on a USB Flash drive, can I somehow point the Bitcoin client on each PC to the USB Flas drive to read the wallet from there? Will that work?

That should work. Run each Bitcoin instance with the -datadir=/path/to/drive switch.

I wouldn't try using two different copies of the wallet. Bitcoin was not designed to do this. I don't think it takes into account sent transactions until you restart it, which might cause you to accidentally double-spend.


Title: Re: Use same wallet/address on multiple PCs?
Post by: TiagoTiago on March 24, 2011, 06:24:38 PM
Would it be possible to modify the client to properlly handle multiple concurrent copies of a wallet? Or the protocol itself needs to be changed for that to work?


Title: Re: Use same wallet/address on multiple PCs?
Post by: MOON on March 24, 2011, 06:46:41 PM
Would it be possible to modify the client to properlly handle multiple concurrent copies of a wallet? Or the protocol itself needs to be changed for that to work?

It should work as you could just add an option to choose the wallet from different locations on your computer. Here you can donate for speeding up the development of this feature:
http://bitcoin.cz.cc/?page=propose&id=30


Title: Re: Use same wallet/address on multiple PCs?
Post by: TiagoTiago on March 24, 2011, 06:59:33 PM
No, i mean the same wallet being used in more than one machine at once


Title: Re: Use same wallet/address on multiple PCs?
Post by: Hal on March 24, 2011, 07:37:16 PM
Warning, lots of bad information and wrong answers in this thread!

Addresses are not created in batches of 100 (after initialization), they are created one at a time as they are used, so you always have a pool of 100 unused addresses.

Wallets do hold transactions, all the ones you see in the client window.

You would probably not want to share the same wallet between your home system and your phone, because of the risk of theft, any more than you would empty your bank account and carry all your money around with you as cash. Most people plan to hold a fraction of their assets in their phones.



Title: Re: Use same wallet/address on multiple PCs?
Post by: theymos on March 24, 2011, 07:40:33 PM
Would it be possible to modify the client to properlly handle multiple concurrent copies of a wallet? Or the protocol itself needs to be changed for that to work?

Each client would need to know which coins the other clients are going to use. You could do this by having the clients communicate with each other. You could also say that each client will only use some subset of coins. If Bitcoin allowed you to manually select which coins to send in a transaction, you could handle this yourself.

Other changes are needed, as well. For example, I'm pretty sure Bitcoin doesn't automatically detect when another running client sends coins in its wallet until after it is restarted.


Title: Re: Use same wallet/address on multiple PCs?
Post by: rebuilder on March 24, 2011, 08:10:48 PM
Personally, I have a "vault" wallet with most of my BTC on it, stored in an encrypted container, backed up locally and in the cloud. I've used that wallet on multiple computers without a hitch. I do make it a point to  only access that wallet briefly, so it's never in use on multiple computers at the same time.


Title: Re: Use same wallet/address on multiple PCs?
Post by: gohan on March 24, 2011, 08:13:16 PM
We could, in theory, divide the keys in the wallet, couldn't we? That would make it easier to "take some money with you when you go out". I think there are some proposals in the forum that would allow something like this.