Bitcoin Forum
November 15, 2024, 05:19:28 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Sharing Wallets  (Read 800 times)
anu (OP)
Legendary
*
Offline Offline

Activity: 1218
Merit: 1001


RepuX - Enterprise Blockchain Protocol


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

▄▄▄▄▄▄▄▄▄▄        ▄▄▄▄▄▄▄▄▄
███████████▄    ▄███████████
█████████████▄▄█████████████
████████████████████████████
████████████████████████████
▀█████████████████████████▀
  ▀█████████████████████▀
   ▄████████████████████▄
 ████████████████████████▄
████████████████████████████
████████████████████████████
█████████████▀▀█████████████
███████████▀    ▀███████████
▀▀▀▀▀▀▀▀▀▀        ▀▀▀▀▀▀▀▀▀
RepuX▄██▄
████
████
████
████
████
████
████
▀██▀
.Decentralized Data & Applications Protocol For SMEs.
.
▔▔▔▔  ●  Twitter  ●  Facebook  ●  Bitcointalk  ●  Reddit  ●  ▔▔▔▔
▄██▄
████
████
████
████
████
████
████
▀██▀
Enterprise Blockchain Protocol
.GET WHITELISTED.
Token Sale starts 6th of February 2018
hashmaker
Newbie
*
Offline Offline

Activity: 52
Merit: 0



View Profile
July 09, 2011, 02:22:15 PM
Last edit: July 09, 2011, 03:37:54 PM by hashmaker
 #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: 21
Merit: 0


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
Newbie
*
Offline Offline

Activity: 56
Merit: 0


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 (OP)
Legendary
*
Offline Offline

Activity: 1218
Merit: 1001


RepuX - Enterprise Blockchain Protocol


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

▄▄▄▄▄▄▄▄▄▄        ▄▄▄▄▄▄▄▄▄
███████████▄    ▄███████████
█████████████▄▄█████████████
████████████████████████████
████████████████████████████
▀█████████████████████████▀
  ▀█████████████████████▀
   ▄████████████████████▄
 ████████████████████████▄
████████████████████████████
████████████████████████████
█████████████▀▀█████████████
███████████▀    ▀███████████
▀▀▀▀▀▀▀▀▀▀        ▀▀▀▀▀▀▀▀▀
RepuX▄██▄
████
████
████
████
████
████
████
▀██▀
.Decentralized Data & Applications Protocol For SMEs.
.
▔▔▔▔  ●  Twitter  ●  Facebook  ●  Bitcointalk  ●  Reddit  ●  ▔▔▔▔
▄██▄
████
████
████
████
████
████
████
▀██▀
Enterprise Blockchain Protocol
.GET WHITELISTED.
Token Sale starts 6th of February 2018
Pages: [1]
  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!