Bitcoin Forum
September 19, 2017, 10:53:24 PM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Sharing Wallets  (Read 659 times)
anu
Legendary
*
Offline Offline

Activity: 1036



View Profile
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

CHANGE FINANCE First Decentralised Global Crypto Bank
LINK TO ICO LINK TO DISCUSSION
1505861604
Hero Member
*
Offline Offline

Posts: 1505861604

View Profile Personal Message (Offline)

Ignore
1505861604
Reply with quote  #2

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

Posts: 1505861604

View Profile Personal Message (Offline)

Ignore
1505861604
Reply with quote  #2

1505861604
Report to moderator
1505861604
Hero Member
*
Offline Offline

Posts: 1505861604

View Profile Personal Message (Offline)

Ignore
1505861604
Reply with quote  #2

1505861604
Report to moderator
1505861604
Hero Member
*
Offline Offline

Posts: 1505861604

View Profile Personal Message (Offline)

Ignore
1505861604
Reply with quote  #2

1505861604
Report to moderator
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: 1036



View Profile
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

CHANGE FINANCE First Decentralised Global Crypto Bank
LINK TO ICO LINK TO DISCUSSION
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!