Bitcoin Forum
December 08, 2016, 10:19:39 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Sharing Wallets  (Read 593 times)
anu
Legendary
*
Offline Offline

Activity: 938


P2P Everything


View Profile WWW
July 09, 2011, 12:10:10 PM
 #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

Zero Reserve - A distributed Bitcoin Exchange

Install - Getting Started - BitcoinTalk Thread - Github Source
1481235579
Hero Member
*
Offline Offline

Posts: 1481235579

View Profile Personal Message (Offline)

Ignore
1481235579
Reply with quote  #2

1481235579
Report to moderator
1481235579
Hero Member
*
Offline Offline

Posts: 1481235579

View Profile Personal Message (Offline)

Ignore
1481235579
Reply with quote  #2

1481235579
Report to moderator
1481235579
Hero Member
*
Offline Offline

Posts: 1481235579

View Profile Personal Message (Offline)

Ignore
1481235579
Reply with quote  #2

1481235579
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
hashmaker
Jr. Member
*
Offline Offline

Activity: 52



View Profile
July 09, 2011, 02:22:15 PM
 #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.

blackgold
Newbie
*
Offline Offline

Activity: 11


View Profile
July 09, 2011, 03:31:24 PM
 #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.
naturallaw
Jr. Member
*
Offline Offline

Activity: 56


View Profile
July 09, 2011, 03:42:42 PM
 #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!
anu
Legendary
*
Offline Offline

Activity: 938


P2P Everything


View Profile WWW
July 09, 2011, 04:38:48 PM
 #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

Zero Reserve - A distributed Bitcoin Exchange

Install - Getting Started - BitcoinTalk Thread - Github Source
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!