Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: ingvar_e on January 26, 2020, 08:17:23 PM



Title: Consolidate wallets
Post by: ingvar_e on January 26, 2020, 08:17:23 PM
I have 4 instances of bitcoin installed on my desktop and laptop. I want o consolidate them to one  version.

I have a  "virgin" running and will consolidate the other  3 into it

If I have understod it correctly I have 2 choices.

1. Transfer the funds the convential way
2. Create dumpfiles from the donators and import these files to the new fresh instance.

Option 2 seems to be the simple way and also provides me with backup files but I would like get some cons and pros from this forum.
A related question is if the donator wallets are cleared by the dumpwallet command.

Thanks
Ingvar.
From a cold Stockholm/Sweden


Title: Re: Consolidate wallets
Post by: HCP on January 26, 2020, 09:48:43 PM
dumpwallet simply outputs private data like private keys, master private key and the hdseed (if one exists) etc... As the name suggests, it is just a "data dump", so it doesn't "clear" a wallet, remove any datat or send any transactions etc.

Depending on how you are running Bitcoin Core, you could also benefit from the "multi wallet" functionality and simply load the extra wallet files into Bitcoin Core.

In the GUI, you simply use the "Open Wallet" command in the File menu... After the initial wallet load and rescan(s), you can effortlessly switch between the two (or more) wallet files from a simple dropdown list.

You can achieve the same on bitcoind using the -wallet command line argument and specifying all the wallet.dats you want to load etc.

Safer than exporting/importing private keys... And you can manage all wallets from one Bitcoin Core instance.

If you are finished with the "donator" wallets, you could simply shift all the funds to you new wallet... And keep copies of the old wallet.dats (just in case)...

If you'd like to keep using the "donator" wallets, then I'd recommend just loading them all into the one instance.


Title: Re: Consolidate wallets
Post by: nc50lc on January 27, 2020, 02:16:55 AM
Depending on the number of available UTXOs.

If you have a ton of available inputs from those three "donator" wallets, option 1 may be a good choice.
On the other hand, if you only have one to three UTXO or more but for the same address,
creating dump file is better since you can import their private keys to the new wallet without too much hassle.

The implications that you wanna hear for option 2 is: the keys will be leaked and if your system is monitored, you might lose your funds.
At least export / import them while offline or in an "air-gap" PC.

If you decided to import make sure to add 'false' to the RPC command: eg. importprivkey "label" false except for the last one.
So your wallet wouldn't proceed to 'rescan' on every import.
Personally, I'd choose option 1.


Title: Re: Consolidate wallets
Post by: philipma1957 on January 27, 2020, 02:44:48 AM
Depending on the number of available UTXOs.

If you have a ton of available inputs from those three "donator" wallets, option 1 may be a good choice.
On the other hand, if you only have one to three UTXO or more but for the same address,
creating dump file is better since you can import their private keys to the new wallet without too much hassle.

The implications that you wanna hear for option 2 is: the keys will be leaked and if your system is monitored, you might lose your funds.
At least export / import them while offline or in an "air-gap" PC.

If you decided to import make sure to add 'false' to the RPC command: eg. importprivkey "label" false except for the last one.
So your wallet wouldn't proceed to 'rescan' on every import.
Personally, I'd choose option 1.

yeah he can do 1 or

3

three is


move wallet 1 coins
to
wallet 2 coins
to
wallet 3 coins
to
virgin wallet


say 2 coins in wallet a
say 2 coins in wallet b
say 2 coins in wallet c
say 0 in virgin wallet.

this goes like this

2 from a into b.  brings b up to 4 coins
4 from b into c. bring c up to 6 coins
6 from c into virgin

virgin now has all 6 coins. no one has ever seen private keys.
virgin became consolidated

a has 0
b has 0
c has 0

i do this method a lot.


Title: Re: Consolidate wallets
Post by: nc50lc on January 27, 2020, 03:19:03 AM
If it's option 1, it will only generate three UTXO to virgin wallet that isn't much of an issue.

When wallet A sends all of its balance to "virgin wallet", the transaction already consolidates all of its inputs. So as wallet B and C.
Just watch out for the fee rate if there are too many inputs.


Title: Re: Consolidate wallets
Post by: HCP on January 27, 2020, 03:23:38 AM
...i do this method a lot.
And all you coins are now "linked" together... Depending on your privacy and/or accounting requirements, then consolidating all your coins into one UTXO like that may not be the best way forward.

Also, if someone (accidentally?) sends to one of your old addresses, you may not notice unless you're constantly monitoring your old wallets anyway.

@ingvar_e, what are you requirements regarding consolidation and/or ability to monitor old wallets/addresses? ???


Title: Re: Consolidate wallets
Post by: Abdussamad on January 28, 2020, 07:40:47 PM
Just do 1. Messing about with private keys is risky and backups will be harder in the future. Wallets are now deterministic which means a one time backup is good for life. But if you import arbitrary private keys those benefits go out the window.


Title: Re: Consolidate wallets
Post by: 2double0 on January 28, 2020, 09:38:31 PM
Just do 1. Messing about with private keys is risky and backups will be harder in the future. Wallets are now deterministic which means a one time backup is good for life. But if you import arbitrary private keys those benefits go out the window.

So if I need a single address to rely upon 'and it could be forever', I should still keep a complete backup of a whole set of addresses when I can simply export the private key of that required address? What benefits are you addressing here?


Title: Re: Consolidate wallets
Post by: Abdussamad on January 28, 2020, 11:06:16 PM
Just do 1. Messing about with private keys is risky and backups will be harder in the future. Wallets are now deterministic which means a one time backup is good for life. But if you import arbitrary private keys those benefits go out the window.

So if I need a single address to rely upon 'and it could be forever', I should still keep a complete backup of a whole set of addresses when I can simply export the private key of that required address? What benefits are you addressing here?

address reuse is a bad idea

with an hd wallet you can have an unlimited number of addresses that all spring from one seed.


Title: Re: Consolidate wallets
Post by: 2double0 on January 29, 2020, 10:38:58 AM
address reuse is a bad idea

A bad idea? I am used to a single address [let's say you have set up a vanity address with your own letters choice involved in it, would you leave it if it is your favorite one?]
Bad idea because transaction fee could be higher because more inputs take place on a single address?

Quote
with an hd wallet you can have an unlimited number of addresses that all spring from one seed.

I know but I rather stick to an older single one because everyone has different mentality and choices, and mine is this.


Title: Re: Consolidate wallets
Post by: AdolfinWolf on January 29, 2020, 10:49:11 AM

A bad idea? I am used to a single address [let's say you have set up a vanity address with your own letters choice involved in it, would you leave it if it is your favorite one?]
Bad idea because transaction fee could be higher because more inputs take place on a single address?

Quote
with an hd wallet you can have an unlimited number of addresses that all spring from one seed.

I know but I rather stick to an older single one because everyone has different mentality and choices, and mine is this.
Unless you don’t use native segwit on your vanity address (aka your vanity address is starting with bc1), the fees would be worse, but that’s unrelated to what Abdussamad is referring to.

The amount of inputs will stay the same, even if you use a different address for each input, it will not have impact on the fees, so that’s not the issue.

The issue is that address reusing destroys your privacy, but so does consolidating your funds if you previously sent them to different addresses, so really, it doesn’t matter that much. (For most users)


There are also some security concerns against reusing addresses, but these are negligible, especially if you specifically choose for a vanity address. (eg the public key being revealed.) see => https://bitcoin.stackexchange.com/questions/20621/is-it-safe-to-reuse-a-bitcoin-address


Title: Re: Consolidate wallets
Post by: Dabs on January 29, 2020, 12:22:18 PM
Address reuse is generally bad. It's okay for example, for a donation or contribution address that is posted and plenty of people send to that address, so everyone can see every coin that comes in on the blockchain in any block explorer.

If privacy is a concern, you could always use either a mixer, coin join, or both after you have consolidated the inputs.


Title: Re: Consolidate wallets
Post by: Dabs on January 30, 2020, 04:56:23 PM
I can see your point.

Multiple addresses or inputs belonging to the same person or entity is an inference based on expected behavior of wallet software. It is not proof or a guarantee, and that is how everyone should see it.

Which is why CoinJoin works, as it doesn't make sense that 100 inputs in the same transaction all belong to the same person. That should happen more often normally. My coin, should be the same as your coin, as their coin ... and I'm sure I'm not the only one that has that opinion.


Title: Re: Consolidate wallets Stuck!
Post by: ingvar_e on February 16, 2020, 02:12:29 PM
This is the situation:
The wallets I want to consolidate are in dumpwallets. When the dumpwallets where created the corresponding wallets where cleared.
If anyone has a suggestion for a solution that make use of the dumpfiles I would appreciate it very much  since that is the only resource I have.

I have also tried to load the dumpfile back to the bitcoin instance where it was originally "dumped" from. Same result.

importwallet "C:\Users\Ingvar\Desktop\WalletsDesktop\DumpedWallets\UsersAdministratorDesktopWalletsDesktopGwallet.dat"

The "Import" command gives the same error message:

"Importing wallets is disabled when blocks are pruned (code -4)"

Stuck!!

Anyone has an idea how to get around this. The dumpfile is what I have

(I know. I should have taken a backup of the wallet before creating the dumpfile)








Title: Re: Consolidate wallets Stuck!
Post by: ranochigo on February 16, 2020, 02:26:08 PM
The "Import" command gives the same error message:

"Importing wallets is disabled when blocks are pruned (code -4)"

Stuck!!

Anyone has an idea how to get around this. The dumpfile is what I have

(I know. I should have taken a backup of the wallet before creating the dumpfile)
The error is regarding the state that your client is in. With the pruning enabled, the client actively deletes information that are irrelevant to your old wallet and the older blockchain files. With that, if you import an entirely new wallet, there is no way for the wallet to get all the transactions that are in your wallet currently.

You'll have to synchronize your wallet again, without pruning if you want to swap out your wallet files regularly.


Title: Re: Consolidate wallets
Post by: ingvar_e on February 16, 2020, 04:09:49 PM
quote:
You'll have to synchronize your wallet again, without pruning

Question:
Is that a procedure I should do on the target instance. How do I specify that?



Title: Re: Consolidate wallets
Post by: HCP on February 16, 2020, 08:13:18 PM
You need to resync the Bitcoin Core instance where you are wanting to import the "dump file". That means you will have to redownload the entire blockchain WITHOUT pruning.

So, shutdown Bitcoin Core and make sure that:

1. There is no "prune=XXX" command in your bitcoin.conf or any script/shortcut that is used for starting Bitcoin Core.
2. If using GUI, in the "Settings -> Options -> Main" the "Prune Block Storage to..." option is UNCHECKED:
https://talkimg.com/images/2023/11/15/z10rD.png

Then restart Bitcoin Core. It should automatically resync by downloading the entire blockchain again from scratch. (If not, try using the "-reindex" command line option)

NOTE: Current storage requirements for the full blockchain are around 300+ Gigs


Title: Re: Consolidate wallets
Post by: Dabs on February 18, 2020, 05:32:45 PM
My dumped files aren't usually .dat or use that extension. They should be readable with notepad or any other text editor. See if you can open them with a simple text editor. It should list or show a bunch of private keys.