Bitcoin Forum
April 25, 2024, 08:07:47 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Multiple instance of bitcoin with the same wallet  (Read 15483 times)
kindle (OP)
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
April 02, 2011, 05:49:20 PM
 #1

Hi is it possible for multiple instance of bitcoin with the same wallet connected to the nextwork? The purpose is for the mining rig to run and once in a while spend the bitcoin on another workstation.

The forum was founded in 2009 by Satoshi and Sirius. It replaced a SourceForge forum.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
LMGTFY
Hero Member
*****
Offline Offline

Activity: 644
Merit: 502



View Profile
April 02, 2011, 05:52:54 PM
 #2

Hi is it possible for multiple instance of bitcoin with the same wallet connected to the nextwork? The purpose is for the mining rig to run and once in a while spend the bitcoin on another workstation.
Why not have the wallet on one machine, using either "bitcoin -server" or "bitcoind", and use separate miners on the other machines (i.e. don't run bitcoin[d] at all on the other machines). Or have I misunderstood, and you need access to the wallet from multiple machines?

This space intentionally left blank.
LMGTFY
Hero Member
*****
Offline Offline

Activity: 644
Merit: 502



View Profile
April 02, 2011, 06:06:15 PM
 #3

He wants multiply clones of wallet.dat and does not want any communications between the machines. So he could earn money on one machine and spend them on another, while these two machines have common wallet.dat and no direct line of communication. This is actually a quite nice model from security point of view.

In a way he wants faster than light speed data transfer. I want that too. I do not think this would work out of the box. Maybe if there is a large number of public/private pairs are created before cloning the wallet...

Ah, got it (I think. I pluralised "mining rig"...)

OK, I'm not sure I do get it. It still sounds to me like the solution would be to have a miner run on one machine, and bitcoind run on the workstation-from-which-payments-will-be-made. From a security perspective, the miner would be in the DMZ, and the wallet/workstation would be behind the firewall. What's the security benefit from having a common wallet?

This space intentionally left blank.
kindle (OP)
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
April 02, 2011, 06:08:03 PM
 #4

Oh let me illustrate, for example I kinda want to use bitcoin in a way where anything and everything is sync btw the same wallet.

So if I am mining on one pc with wallet A, I can log in to another pc and with another instance of wallet A. This will allow me to monitor transactions and at the same time transfer the coins on a normal pc without accessing the mining rig.

LMGTFY
Hero Member
*****
Offline Offline

Activity: 644
Merit: 502



View Profile
April 02, 2011, 06:14:40 PM
 #5

Oh let me illustrate, for example I kinda want to use bitcoin in a way where anything and everything is sync btw the same wallet.

So if I am mining on one pc with wallet A, I can log in to another pc and with another instance of wallet A. This will allow me to monitor transactions and at the same time transfer the coins on a normal pc without accessing the mining rig.
I think we get the first part, it's the use case in the second part I'm not sure about.

In my proposal (which may not satisfy your use case) you have a workstation running "bitcoin -server". You use it to send and receive bitcoins, monitor transactions, etc. You also have a separate mining rig which connects to the workstation. Your wallet only needs to be on one machine (the workstation).

I suspect there's some subtlety I'm not getting, which necessitates cloning the wallet...

This space intentionally left blank.
kindle (OP)
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
April 02, 2011, 06:24:01 PM
 #6

Oh let me illustrate, for example I kinda want to use bitcoin in a way where anything and everything is sync btw the same wallet.

So if I am mining on one pc with wallet A, I can log in to another pc and with another instance of wallet A. This will allow me to monitor transactions and at the same time transfer the coins on a normal pc without accessing the mining rig.
I think we get the first part, it's the use case in the second part I'm not sure about.

In my proposal (which may not satisfy your use case) you have a workstation running "bitcoin -server". You use it to send and receive bitcoins, monitor transactions, etc. You also have a separate mining rig which connects to the workstation. Your wallet only needs to be on one machine (the workstation).

I suspect there's some subtlety I'm not getting, which necessitates cloning the wallet...

Hi LMGTFY thanks for the suggestion, in this situation the workstation has to be on for the entire duration for the mining rig to work. If I were to run the server on the rig itself, it would be self sustainable. In this case if I were to transfer btc using the mining rig wallet, I would have to remote access into the rig and transfer within the bitcoin interface of the mining rig. If it is possible, running another instant of the wallet in a separate work station would allow me to transfer btc without logging into the rig.

LMGTFY
Hero Member
*****
Offline Offline

Activity: 644
Merit: 502



View Profile
April 02, 2011, 06:32:56 PM
 #7

You think about security from a point of view "the more wallets the more attack vectors" and than hang up on all those firewall schemes, DMZ's etc... which is a typical layman's mistake.
True. My thinking was to protect the wallet, rather than have it on a machine exposed to the 'net, but...

I think about security from point of view of risk assessment and more specifically in this case "opening sockets to potentially hostile environments or not opening them".

Multiply wallets do not increase risk significantly (as compared to one wallet/box), when you have simple nearly identical physically secure boxes which do not listen to the net except when using only services which are proved/assumed to be secure, for example properly configured sshd.
...if the machine is only opening a limited number of trusted ports (8332 and SSH) then I guess the risk is minimal.

Hi LMGTFY thanks for the suggestion, in this situation the workstation has to be on for the entire duration for the mining rig to work. If I were to run the server on the rig itself, it would be self sustainable. In this case if I were to transfer btc using the mining rig wallet, I would have to remote access into the rig and transfer within the bitcoin interface of the mining rig. If it is possible, running another instant of the wallet in a separate work station would allow me to transfer btc without logging into the rig.
OK, the part I was missing was people switch off their machines :-)

Could you have the mining rig automatically send bitcoins to another wallet? Then when your workstation was brought online you'd have access to the sent coins.

This space intentionally left blank.
trentzb
Sr. Member
****
Offline Offline

Activity: 406
Merit: 251


View Profile
April 02, 2011, 06:44:47 PM
 #8

I have thought about the same concept and how to implement but I don't understand the bitcoin wallet storage/protocol enough yet to offer a solution.

My thoughts about how to implement at the moment involve utilizing an alternate DB for the wallet, one of which can be R/W from multiple clients and/or locations and supporting reasonable row/field/etc locking as needed. As I understand from a few forum posts the Berkeley DB used currently opens an exclusive file lock (?) to the wallet DB preventing another process from access. I have not looked into the source as of yet, just been thinking about how to implement such for an alternate project unrelated to the OP question.

If I am heading down the wrong path could someone correct me?

LMGTFY
Hero Member
*****
Offline Offline

Activity: 644
Merit: 502



View Profile
April 02, 2011, 06:45:40 PM
 #9

LMGTFY, when you transfer bitcoins via p2p network you leak information. With cloned wallets it would be magical, invisible and faster than speed of light.

Sure, I get that, and the coins also lose their freshly minted, unspent shininess and it's a pain waiting for the sent coins to be confirmed. It seems like it's the best (only?) option for kindle, though.

This space intentionally left blank.
Gavin Andresen
Legendary
*
Offline Offline

Activity: 1652
Merit: 2216


Chief Scientist


View Profile WWW
April 02, 2011, 07:24:19 PM
 #10

Cloning your wallet to do anything besides backing it up is a bad idea.

It might work perfectly for a while... but you are very likely to get weird behavior from bitcoin sooner or later, because doing that is not tested or supported.

Where 'weird behavior' is one clone of the wallet shows one balance, the other clone shows another, and you might end up with bitcoins that you can spend from one wallet but not the other (or, worst case, end up with bitcoins that neither wallet is able to spend).

If you REALLY REALLY REALLY want to do this... then get the latest code from git, pull sipa's 'Spent per txout' patch, and then spend a bunch of time testing to find out what happens when your cloned wallets eventually start using different keys from the keypool.


How often do you get the chance to work on a potentially world-changing project?
urizane
Newbie
*
Offline Offline

Activity: 56
Merit: 0



View Profile
April 04, 2011, 08:47:32 PM
 #11

Maybe I'm missing something here.  Why would the mining rig (which isn't logged into very often) need to know how many bitcoins are in the wallet?  It just makes more.  It doesn't spend any.  Only the workstation where the spending occurs really needs to know how many bitcoins there are.  OH WAIT!  *facepalm*  I GET IT!  You're mining solo.  Otherwise, in a pool, this would make no sense.  In that case, automated transfers from the mining wallet to the spending wallet would publicly show a relationship between the two wallets, but it would be simple to set up.  As an aside, sshd is only a small inconvenience.
TiagoTiago
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500


Firstbits.com/1fg4i :)


View Profile
April 04, 2011, 11:50:34 PM
 #12

Would it work if you used only two copies, one that always only mined, not spending the money, and keeping the same address, and another that has that address, that you use to spend and receive money as usual? Besides the lag 'til mining earnings show up on your spending wallet, is there gonna be any issue?

(I dont always get new reply notifications, pls send a pm when you think it has happened)

Wanna gimme some BTC/BCH for any or no reason? 1FmvtS66LFh6ycrXDwKRQTexGJw4UWiqDX Smiley

The more you believe in Bitcoin, and the more you show you do to other people, the faster the real value will soar!

Do you like mmmBananas?!
kindle (OP)
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
April 05, 2011, 02:10:40 AM
 #13

Hi all thanks for the replies, from what was mentioned I gathered that the bitcoin infrastructure doesn't allow multiple bitcoin clients to connect using the same wallet as there is no central server to synchronize the multiple instances of the same bitcoin wallet.

Initially I was hoping to get similar functionality as let say gmail where emails received while logged into a computer browser would also be updated in the gmail instance running on the phone. This would allow multiple inputs and at the same time remained synchronize among all instances.

cdhowie
Full Member
***
Offline Offline

Activity: 182
Merit: 107



View Profile WWW
April 05, 2011, 06:52:56 AM
 #14

Hi all thanks for the replies, from what was mentioned I gathered that the bitcoin infrastructure doesn't allow multiple bitcoin clients to connect using the same wallet as there is no central server to synchronize the multiple instances of the same bitcoin wallet.
The bitcoin infrastructure doesn't care if you run with multiple instances of the same wallet.  The wallet only contains the private keys you use to spend your coins; the coins themselves exist in the block chain.  In other words, your wallet contains permission to spend your money, and not the money itself.  (Like your physical wallet might contain a debit card, which isn't money itself, but authorizes you to spend money stored somewhere else.)

The problem is that as you spend money out of each wallet, new keys are generated to receive some of the left-over coins.  The other wallets won't have these new keys.  This will cause the balances of each wallet to eventually diverge (after roughly 100 transactions that you send), resulting in coins that you can only spend from a particular wallet.

This will be confusing, since the number of coins you have won't simply be the sum of the balances in all of your wallets.  For example, if wallet A has a balance of 500, and B has a balance of 500, you might only have 700 and not 1000.  (Wallet A and B both have access to the same 300 coins, but they also each have access to 200 coins that the other doesn't have the keys for.  So 300 + 200 + 200 = 700.)

Initially I was hoping to get similar functionality as let say gmail where emails received while logged into a computer browser would also be updated in the gmail instance running on the phone. This would allow multiple inputs and at the same time remained synchronize among all instances.
You could always use mybitcoin.com to do this.  The only other option would be to periodically merge all your wallets together so that they all have the same key set and then rescan the block chain.  But no software currently exists to merge wallets.

Tips are always welcome and can be sent to 1CZ8QgBWZSV3nLLqRk2BD3B4qDbpWAEDCZ

Thanks to ye, we have the final piece.

PGP key fingerprint: 2B7A B280 8B12 21CC 260A  DF65 6FCE 505A CF83 38F5

SerajewelKS @ #bitcoin-otc
Gavin Andresen
Legendary
*
Offline Offline

Activity: 1652
Merit: 2216


Chief Scientist


View Profile WWW
April 05, 2011, 12:04:50 PM
 #15

Would it work if you used only two copies, one that always only mined, not spending the money, and keeping the same address, and another that has that address, that you use to spend and receive money as usual? Besides the lag 'til mining earnings show up on your spending wallet, is there gonna be any issue?

Better would be a new feature that tells the mining bitcoin "please credit generated bitcoins to THIS address (instead of a new one)."

If you are just mining, you don't need the private key at all, the bitcoin address (or public key) is enough to create the coin generation transaction.

How often do you get the chance to work on a potentially world-changing project?
urizane
Newbie
*
Offline Offline

Activity: 56
Merit: 0



View Profile
April 05, 2011, 05:16:16 PM
 #16

...
Better would be a new feature that tells the mining bitcoin "please credit generated bitcoins to THIS address (instead of a new one)."
...

+1
giszmo
Legendary
*
Offline Offline

Activity: 1862
Merit: 1105


WalletScrutiny.com


View Profile WWW
June 22, 2011, 02:05:50 PM
 #17

Better would be a new feature that tells the mining bitcoin "please credit generated bitcoins to THIS address (instead of a new one)."
Yes, please please please do this. It would be much saver having a miner mine to an air gapped wallet than being forced to mine to an online wallet.
My rigs are in a server room and I would feel saver if I could run them without a wallet worth 1000$ at a time on it each time it hits a block.

ɃɃWalletScrutiny.comIs your wallet secure?(Methodology)
WalletScrutiny checks if wallet builds are reproducible, a precondition for code audits to be of value.
ɃɃ
ripper234
Legendary
*
Offline Offline

Activity: 1358
Merit: 1003


Ron Gross


View Profile WWW
October 13, 2011, 01:22:01 PM
 #18

Better would be a new feature that tells the mining bitcoin "please credit generated bitcoins to THIS address (instead of a new one)."
Yes, please please please do this. It would be much saver having a miner mine to an air gapped wallet than being forced to mine to an online wallet.
My rigs are in a server room and I would feel saver if I could run them without a wallet worth 1000$ at a time on it each time it hits a block.

Is this still considered to be a bad practice / untested?

If it is not, please update the information on this answer.

Please do not pm me, use ron@bitcoin.org.il instead
Mastercoin Executive Director
Co-founder of the Israeli Bitcoin Association
giszmo
Legendary
*
Offline Offline

Activity: 1862
Merit: 1105


WalletScrutiny.com


View Profile WWW
October 13, 2011, 02:25:24 PM
 #19

Better would be a new feature that tells the mining bitcoin "please credit generated bitcoins to THIS address (instead of a new one)."
Yes, please please please do this. It would be much saver having a miner mine to an air gapped wallet than being forced to mine to an online wallet.
My rigs are in a server room and I would feel saver if I could run them without a wallet worth 1000$ at a time on it each time it hits a block.
Is this still considered to be a bad practice / untested?

You are quoting me but my subject was unrelated to the FAQ as the FAQ talks about the same wallet on different machines while I am talking about mining to a different wallet than the one on the machine.

Having forks of a wallet is still a problem and most likely will stay a problem with many ways to loose your money. Don't do it. In doubt, generate a new wallet and transfer all coins to it. If an old backup was compromised it is not enough to generate a new address and send all coins there. Just generate a new wallet and stop using the old empty one.

Concerning my question above, sure if my mining machine was compromised, it might already be mining to a different wallet, so now I think having a feature to mine to a different wallet does not add security but even be bad for security as finding blocks for others might go unnoticed.

ɃɃWalletScrutiny.comIs your wallet secure?(Methodology)
WalletScrutiny checks if wallet builds are reproducible, a precondition for code audits to be of value.
ɃɃ
d.james
Sr. Member
****
Offline Offline

Activity: 280
Merit: 250

Firstbits: 12pqwk


View Profile
October 17, 2011, 04:24:22 PM
 #20

this is going to be perfectly fine, it's like using 2 credit cards with one shared credit account.

You can not roll a BitCoin, but you can rollback some. Cheesy
Roll me back: 1NxMkvbYn8o7kKCWPsnWR4FDvH7L9TJqGG
Pages: [1] 2 »  All
  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!