Can I use the same wallet.dat for several computers?


#1

I have several computers for mining zcash. Can I use the same one wallet.dat file for them?


#2

No, you existing running zcashd will throw exception, as far as my experience.:slight_smile:


#3

Thank you. I just made a test. I could runing zcashd without any exception prompt.
But I did not know weather they are running at the right way.

@ubuntu:~$ ~/zcash/./src/zcash-cli getwalletinfo
{
"walletversion" : 60000,
"balance" : 101.34050000,
"unconfirmed_balance" : 0.00000000,
"immature_balance" : 1.74600000,
"txcount" : 121,
"keypoololdest" : 1470730952,
"keypoolsize" : 15,
"unlocked_until" : 0
}

@zec01:/home/zheng# ./zcash/src/zcash-cli getwalletinfo
{
"walletversion" : 60000,
"balance" : 101.34050000,
"unconfirmed_balance" : 0.00000000,
"immature_balance" : 1.74600000,
"txcount" : 120,
"keypoololdest" : 1470730952,
"keypoolsize" : 29,
"unlocked_until" : 0
}


#4

As far as I can tell, it runs correctly. But for me they seemed to share block data in weird ways. The slowest machine that was the original wallet seemed to collect the other machines' coins, but it was not vice versa. Your data looks good. zcash-cli listtransactions & listunspent will show more detail to confirm everything is being shared


#5

We do not recommend this configuration, and it may cause loss of data / funds. (I believe that's also the case for Bitcoin.)


Mining to the same wallet
#6

Thank you very much.


#7

Is there a problem with everyone using the same testnet3 copied over from waterhole so that they can connect? (assuming he is not including his wallet.dat in that folder)


#8

What could be the cause leading to problem? Assuming there is no "diverging keypool" if we preset a keypool size high enough, I can't think of any reason for not running same wallet in multiple machine.

I know this is a long standing problem for Bitcoin, but i could not find any detailed explanation.


#9

I did not upload my wallet.dat for the testnet3


#10

It was the case for bitcoin until very recently. Bitcoin Core has deterministic wallets now, so it's not a problem there.

@zqj0754 The reason it's not recommended is because zcashd doesn't have deterministic wallets yet. If you use the same wallet on multiple machines, everything will work fine until the keypool in the shared wallet runs out. After that, each instance will generate new keys using randomness that is unique to each instance -- and thus the keypools (and wallet.dat files) will diverge. At that point, you'd have to back up every wallet from every instance to ensure you don't lose coins -- and that defeats the purpose of a shared wallet to begin with.

That said, it can be done. See https://github.com/Austin-Williams/zcash-guides/wiki/Guide-to-Mining-Zcash-on-Amazon-EC2 and look at the "Choose a Key Management Option" section. But understand what's happening when you do it so you can avoid the dangers.


#11

Thanks. I understand now.