Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: virualcashtrade on August 27, 2017, 10:26:03 AM



Title: Multiple wallet.dat
Post by: virualcashtrade on August 27, 2017, 10:26:03 AM
Hello all,
Have got bitcoincore full synced, as have decided to use 4 wallet.dat ( not simultaneously!), facing probably a problem. When the original wallet (w1) was made, it was synced fully. Yesterday added my other wallet.dat to this one(original was renamed) and synced fully overnight. As I do NOT want to run 4 bitcoincore on 4 computer, now am with 4 wallet.dat file. The question is simple: when I change the wallet.dat file to an other one, what was synced already with this client, it will save from the start or from the last point of sync? Any advise can help, thanks.
Have a great day for all.


Title: Re: Multiple wallet.dat
Post by: ranochigo on August 27, 2017, 10:52:23 AM
The question is simple: when I change the wallet.dat file to an other one, what was synced already with this client, it will save from the start or from the last point of sync? Any advise can help, thanks.
I don't really get what you mean by that question.

If you're talking about how the client will rescan, it will reindex the blockchain when you enabled prune if you replace the wallet.dat or import any keys. I don't think it requires a reindex if your wallet.dat is last synchronized to the point where the block is still within the pruning range*. The client will rescan from the point where it is last synchronized until.

Eg. If I replace my wallet.dat on 23/8/2017, and I put it back on 27/8/2017, the client will rescan the wallet from 23/8/2017.

The blockchain files itself is not affected.

*I need clarification on that, I haven't tried it myself.


Title: Re: Multiple wallet.dat
Post by: virualcashtrade on August 27, 2017, 10:59:53 AM


Eg. If I replace my wallet.dat on 23/8/2017, and I put it back on 27/8/2017, the client will rescan the wallet from 23/8/2017.

Exactly this what I need as all 4 wallet.dat will be checked once a day. And rescan from start takes 10-11 hours....

Thanks for your answer.


Title: Re: Multiple wallet.dat
Post by: jackg on August 27, 2017, 12:38:02 PM


Eg. If I replace my wallet.dat on 23/8/2017, and I put it back on 27/8/2017, the client will rescan the wallet from 23/8/2017.

Exactly this what I need as all 4 wallet.dat will be checked once a day. And rescan from start takes 10-11 hours....

Thanks for your answer.

Ah, I get this.

The best I can offer is an alternative to bitcoin core (unless you want to combine your wallets).

My suggestion would be electrum, downloadable here (http://electrum.org/#download)
For each wallet:
•Export private keys from bitcoin core
•On electrum, start it up and hit "standard wallet", then "use public or private keys" and ast the eys you've just exported from bitcoin core into it.
•You should be able to see your balances now after you just put in a pssword for the wallet to have.



An alternative to this:
1. Make 4 user accounts on your computer, each with administrative rights.
2. Start bitcoin core on all four putting a different wallet.dat file on each.
This does require you to have 4x the blockchain size (hence my alternative client suggestion).
UNLESS YOU USE -prune mode which will only keep the latest x number of blocks and will take up no more than 4 GB of space.



As an explanation to why this happens, bitcoin core must scan the entire blockchain in order to find your tansactions when you put a new wallet file in place.


Title: Re: Multiple wallet.dat
Post by: virualcashtrade on August 27, 2017, 01:06:56 PM
Electrum was already tested and breaks down when I try to import my private key db(each wallet hold approx 10000 addresses). The limit to import is something about 25-40 a time.
The core is running from an external hard drive. Useraccounts I can create, but there will be some problem to run on each a different wallet. But if it can working, any advise is welcome.
My laptop capacity doesn't allow to have even one blockchain entirely be kept.
Thank you


Title: Re: Multiple wallet.dat
Post by: jackg on August 27, 2017, 01:14:40 PM
Electrum was already tested and breaks down when I try to import my private key db(each wallet hold approx 10000 addresses). The limit to import is something about 25-40 a time.
The core is running from an external hard drive. Useraccounts I can create, but there will be some problem to run on each a different wallet. But if it can working, any advise is welcome.
My laptop capacity doesn't allow to have even one blockchain entirely be kept.
Thank you

You'd have to make 4 users as I understand the conig file is stored in the AppData section of your user account. Thus 4 user accounts would be needed.

If you make your 4 user accounts, then make a folder in your hard drive for each of the four usernames.
Say you have a current drive path of F:\Bitcoin, change it to F:\%user1%\bitcoin for all four.
Then, when boting bitcoin QT, if that's in the external hard drive, then you'll put the application either in the root or in the bitoin file and on initial use, with each user account, run it with the parameter -datadir=F:\%username%\bitcoin\data and it should work.

You could technically do it with one user acount and produce 5 different partitions (as I think that's the max for windows/NTFS and most drives are formatted to NTFS) - If you have windows I can explain how to produce multiple partitions fairly simply.
This would then require you to bring different partitions on and offline when you want to run the computer (which only takes one or two commands to do).


Title: Re: Multiple wallet.dat
Post by: virualcashtrade on August 27, 2017, 01:28:21 PM
Yes, you are completely right about this. And I can figure it out how to make them working without problem.
BUT: I keep on external drive for a simple raison: secure and encrypted. As have 1T space, can hold as today size if block chain, 5 different bitcoincore.
Or other way is to merge all wallets, what I was trying already, but without any success. Exported by dumpwallet, and got only error messages and the main wallet.dat intact and same size.


Title: Re: Multiple wallet.dat
Post by: jackg on August 27, 2017, 01:43:13 PM
Yes, you are completely right about this. And I can figure it out how to make them working without problem.
BUT: I keep on external drive for a simple raison: secure and encrypted. As have 1T space, can hold as today size if block chain, 5 different bitcoincore.
Or other way is to merge all wallets, what I was trying already, but without any success. Exported by dumpwallet, and got only error messages and the main wallet.dat intact and same size.

If you run it but use the -prune command when it starts, then you'll only have about 5GB of space being taken up by each blockchain as it keeps only the most recent blocks. Then you could run this with all four running.


Title: Re: Multiple wallet.dat
Post by: virualcashtrade on August 27, 2017, 01:46:34 PM
Yes, that will be easier to do. Even opening each from the same account separately.
The -prune option is from command line start?


Title: Re: Multiple wallet.dat
Post by: ranochigo on August 27, 2017, 02:07:56 PM
Yes, that will be easier to do. Even opening each from the same account separately.
The -prune option is from command line start?
You can put it in the bitcoin.conf that should be in the data directory. The code is:
Code:
-prune=n
where n is in megabytes. So if you want it to be a max of 5GB, it will be -prune=5000.

Take note that you cannot import any private key nor change the wallet.dat once you enable pruning. If you do that, you will have to download the blockchain all over again.


Title: Re: Multiple wallet.dat
Post by: virualcashtrade on August 27, 2017, 02:17:41 PM
Quote from: ranochigo link=topic
You can put it in the bitcoin.conf that should be in the data directory. The code is:
[code
-prune=n[/code] where n is in megabytes. So if you want it to be a max of 5GB, it will be -prune=5000.

Take note that you cannot import any private key nor change the wallet.dat once you enable pruning. If you do that, you will have to download the blockchain all over again.

-
Really like to say thank you for all the advises. In 2-3 days I'll post an update about the result.
Thank you again


Title: Re: Multiple wallet.dat
Post by: virualcashtrade on August 28, 2017, 05:19:22 PM
Update: tested the prune version , and works perfectly.
But tested the changing the wallet.dat files. It works also perfectly, only at startup will rescan from the last seen block(can be 100....also). So look like the wallet.dat save the last checked block, and rescan from that one.
In my case, to save space, prune=10000, and changing the wallets in regular base.
Thanks again for all advise!


Title: Re: Multiple wallet.dat
Post by: achow101 on August 28, 2017, 06:19:10 PM
Wait for Bitcoin Core 0.15.0 to be released (which should be in a few weeks). Bitcoin Core 0.15.0 contains support for multiwallet; this means that you can use multiple wallets loaded simultaneously. Currently there is no support for it in the GUI but you can interact with the multiple wallets through the RPC commands. The GUI defaults to the first wallet loaded, so if you wanted to use a different wallet, you can restart with a different wallet order in the bitcoin.conf file or in your starting command.

Bitcoin Core will still keep all wallets synced and still scan for transactions for all wallets loaded even if you can't use them in the GUI.


Title: Re: Multiple wallet.dat
Post by: virualcashtrade on August 28, 2017, 06:42:55 PM
Thank you,
I'll wait for the update, until I load different wallets at a time. Better be sure than making a mistake.... :o


Title: Re: Multiple wallet.dat
Post by: defined on August 28, 2017, 06:54:59 PM
Eg. If I replace my wallet.dat on 23/8/2017, and I put it back on 27/8/2017, the client will rescan the wallet from 23/8/2017.
This is not a problem.

Instead of renaming wallet.dat, use this option when you start Bitcoin Core:
Code:
  -wallet=<file>
       Specify wallet file (within data directory) (default: wallet.dat)

Update: tested the prune version , and works perfectly.
But tested the changing the wallet.dat files. It works also perfectly, only at startup will rescan from the last seen block(can be 100....also). So look like the wallet.dat save the last checked block, and rescan from that one.
In my case, to save space, prune=10000, and changing the wallets in regular base.
Thanks again for all advise!
This can be a problem if you keep a wallet offline for longer than your prune allows.


Title: Re: Multiple wallet.dat
Post by: Cygnify on August 28, 2017, 08:44:15 PM
Hello all,
Have got bitcoincore full synced, as have decided to use 4 wallet.dat ( not simultaneously!), facing probably a problem. When the original wallet (w1) was made, it was synced fully. Yesterday added my other wallet.dat to this one(original was renamed) and synced fully overnight. As I do NOT want to run 4 bitcoincore on 4 computer, now am with 4 wallet.dat file. The question is simple: when I change the wallet.dat file to an other one, what was synced already with this client, it will save from the start or from the last point of sync? Any advise can help, thanks.
Have a great day for all.

You will have to restart the sync. the blockchain will be downloaded but the sync will need to take place.
Why wouldnt you just consolidate all of your wallets into one wallet?


Title: Re: Multiple wallet.dat
Post by: virualcashtrade on August 28, 2017, 09:31:14 PM
Quote
You will have to restart the sync. the blockchain will be downloaded but the sync will need to take place.
Why wouldnt you just consolidate all of your wallets into one wallet?
Was already trying this solution, but without success.
Thanks


Title: Re: Multiple wallet.dat
Post by: virualcashtrade on August 28, 2017, 09:40:39 PM
Quote
This is not a problem.

Instead of renaming wallet.dat, use this option when you start Bitcoin Core:
Code:
  -wallet=<file>
       Specify wallet file (within data directory) (default: wallet.dat)

Update: tested the prune version , and works perfectly.
But tested the changing the wallet.dat files. It works also perfectly, only at startup will rescan from the last seen block(can be 100....also). So look like the wallet.dat save the last checked block, and rescan from that one.
In my case, to save space, prune=10000, and changing the wallets in regular base.
Thanks again for all advise!
This can be a problem if you keep a wallet offline for longer than your prune allows.
For safety reason I keep a full downloaded version for this case. Who knows, travel, illness can happen without any sign in advance...


Title: Re: Multiple wallet.dat
Post by: defined on August 29, 2017, 12:12:04 PM
Quote
This is not a problem.

Instead of renaming wallet.dat, use this option when you start Bitcoin Core:
Code:
  -wallet=<file>
       Specify wallet file (within data directory) (default: wallet.dat)

Update: tested the prune version , and works perfectly.
But tested the changing the wallet.dat files. It works also perfectly, only at startup will rescan from the last seen block(can be 100....also). So look like the wallet.dat save the last checked block, and rescan from that one.
In my case, to save space, prune=10000, and changing the wallets in regular base.
Thanks again for all advise!
This can be a problem if you keep a wallet offline for longer than your prune allows.
For safety reason I keep a full downloaded version for this case. Who knows, travel, illness can happen without any sign in advance...
It is not a safety concern, if your pruned data is too new to sync one of your wallets, you can always download the entire blockchain again.
But it is much faster to keep the complete chain if you have enough disk space for it.


Title: Re: Multiple wallet.dat
Post by: virualcashtrade on August 29, 2017, 12:23:27 PM
As have got 1TB external drive, there is no problem ...perhaps in a decade need to change for a bigger one.


Title: Re: Multiple wallet.dat
Post by: jackg on August 29, 2017, 03:20:49 PM
As have got 1TB external drive, there is no problem ...perhaps in a decade need to change for a bigger one.

I'd say wait until you get your first problem before you go straight in and download the entire blockchain on one of your wallets.
If you keep the four wallets going in different directories on the hard drive as it'll take only the 10 hours again to redownload everything if there is a problem and it doesn't take up any more than 10GB of space on your drive anyway for the ones that are pruned.


Title: Re: Multiple wallet.dat
Post by: virualcashtrade on August 30, 2017, 02:14:43 PM
As have got 1TB external drive, there is no problem ...perhaps in a decade need to change for a bigger one.

I'd say wait until you get your first problem before you go straight in and download the entire blockchain on one of your wallets.
If you keep the four wallets going in different directories on the hard drive as it'll take only the 10 hours again to redownload everything if there is a problem and it doesn't take up any more than 10GB of space on your drive anyway for the ones that are pruned.
I keep a full updated version of blockchain, it was 5 weeks to get fully download, so I prefer not to download again from "0".


Title: Re: Multiple wallet.dat
Post by: defined on August 30, 2017, 02:37:25 PM
it'll take only the 10 hours again to redownload everything if there is a problem and it doesn't take up any more than 10GB of space on your drive anyway for the ones that are pruned.
You need a very fast computer to download the whole blockchain in just 10 hours.

I keep a full updated version of blockchain, it was 5 weeks to get fully download, so I prefer not to download again from "0".
Your computer must be very old if it takes 5 weeks to download.


Title: Re: Multiple wallet.dat
Post by: jackg on August 30, 2017, 03:23:32 PM
it'll take only the 10 hours again to redownload everything if there is a problem and it doesn't take up any more than 10GB of space on your drive anyway for the ones that are pruned.
You need a very fast computer to download the whole blockchain in just 10 hours.

I keep a full updated version of blockchain, it was 5 weeks to get fully download, so I prefer not to download again from "0".
Your computer must be very old if it takes 5 weeks to download.

Either that or there's quite a large problem with it.
One of mine is 7 (years old) and that predicts about a week to download the blockchain.


Title: Re: Multiple wallet.dat
Post by: virualcashtrade on September 01, 2017, 07:54:19 PM
Samsung n210, from 2010, wifi connection. Not the top, but I like this model as have 4 of them.
At the start of download, it shows 4days, but after it getting slower.


Title: Re: Multiple wallet.dat
Post by: jnano on December 09, 2017, 05:42:11 AM
Bitcoin Core will still keep all wallets synced and still scan for transactions for all wallets loaded even if you can't use them in the GUI.
Will it show alerts on incoming transactions to secondary wallets?
Are there plans for a GUI, or at least a way to switch the primary wallet without a restart?