Author

Topic: Sharing Wallets (Read 802 times)

anu
legendary
Activity: 1218
Merit: 1001
RepuX - Enterprise Blockchain Protocol
July 09, 2011, 11:38:48 AM
#5
I would echo what blackgold said. As long as you keep the wallet.dat synchronized between two computers, you shouldn't have to worry about having keys on one computer, but not another. However, you should not be allowing more than one instance of bitcoin accessing the same wallet at the same time. That is just asking for trouble. And always, always backup!

The source says:
    if (!lock.try_lock())
    {
        wxMessageBox(strprintf(_("Cannot obtain a lock on data directory %s.  Bitcoin is probably already running."),
              GetDataDir().c_str()), "Bitcoin");
        return false;
    }


so it obtains a lock on ".lock". This part was really stupid of me to ask. It would require adding more fine grained locking, but the Berkeley format supports this.

-Anu
newbie
Activity: 56
Merit: 0
July 09, 2011, 10:42:42 AM
#4
I would echo what blackgold said. As long as you keep the wallet.dat synchronized between two computers, you shouldn't have to worry about having keys on one computer, but not another. However, you should not be allowing more than one instance of bitcoin accessing the same wallet at the same time. That is just asking for trouble. And always, always backup!
newbie
Activity: 21
Merit: 0
July 09, 2011, 10:31:24 AM
#3
I would deter you from trying to have many computers writing to one file. I would assume you would easily corrupt your wallet doing this. Have multiple wallets for many machines and have one master wallet that you keep very safe. A wallet is full of from what i understand private keys for the public bitcoin key. If you loose these private keys... you have lost the coin for good. Keep your wallet safe.
newbie
Activity: 52
Merit: 0
July 09, 2011, 09:22:15 AM
#2
as I understand, a wallet is not really a wallet, but a key. This suggests it can be shared between computers. Meaning if I have my wallet.dat copied from box A to box B and both boxes run the bitcoin app, box A should pick up the transactions from B and vice versa so both always show the same balance (not counting network latency). Is this correct?

If I understand BTC correctly that would be correct. It is essentially running your backup on another computer. This would go fine and dandy until you started generating new BTC addresses to receive with. Both wallets would start generating different addresses so coins received in wallet A would not show up in wallet B unless you made all the addresses in wallet A then mirrored it to wallet B.

Long story short, it's the same until you start generating addresses. This is why it is also important to back up your file periodically. If you generate a bunch of addresses, start receiving BTC from them, lose the wallet.dat, restore an old backup missing the new addresses, those coins sent to the new generated addresses that are not on the backup are lost to the void, never to be seen again.
anu
legendary
Activity: 1218
Merit: 1001
RepuX - Enterprise Blockchain Protocol
July 09, 2011, 07:10:10 AM
#1
Hi,

as I understand, a wallet is not really a wallet, but a key. This suggests it can be shared between computers. Meaning if I have my wallet.dat copied from box A to box B and both boxes run the bitcoin app, box A should pick up the transactions from B and vice versa so both always show the same balance (not counting network latency). Is this correct?

A somewhat related question: Is it possible to share the wallet.dat using a typical NFS $HOME setup? Like there are N instances of bitcoin, accessing a single ~/.bitcoin directory?

This is of course easy to try out and I expect it to work - but maybe I am in for some nasty side effects / races that only show after some time?

TIA
Anu
Jump to: