Author

Topic: Import Dumpfiles (Read 251 times)

HCP
legendary
Activity: 2086
Merit: 4361
February 17, 2020, 04:25:42 PM
#9
In this order:

Create a new "Virgin" bitcoin instance.
Disable Pruning
Run a full update.
Try a dumpwallet import.

Is this recommended procedure.?
I would not say it was "recommended"... obviously using a 'proper' wallet.dat backup file is the recommended way to restore a wallet. But yes, to "import" a dumpfile, then that would be the procedure to use, assuming you had a pruned instance, as pruning is disabled by default.


Quote
I wonder  what the real purpose for creating a dumpfile is. It clears the wallet so what can you use a dumpfile  for (except import).
A "dumpfile" does NOT clear the wallet. All it does is export your private keys in clear text. It does NOT remove private keys from your wallet dat, so your original wallet.dat file will remain unchanged.
Code:
dumpwallet "filename"

Dumps all wallet keys in a human-readable format to a server-side file. This does not allow overwriting existing files.

The main purpose of these dumpfiles is generally if you need to bulk export private keys for some reason (moving to different wallet for instance)... for exporting specific single keys you can just use dumpprivkey:
Code:
dumpprivkey "address"

Reveals the private key corresponding to 'address'.
Then the importprivkey can be used with this output


Quote
it would be nice to have a possibility to recreate a wallet.
The 'normal' workflow for recreating wallets is to restore from a backup of the wallet.dat file itself... not using "dumpfiles".
jr. member
Activity: 32
Merit: 2
February 17, 2020, 03:55:04 PM
#8
It seems that I have 2 user ID: My error. Will keep this one.

Trying to use the information I got so far.

In this order:

Create a new "Virgin" bitcoin instance.

Disable Pruning

Run a full update.

Try a dumpwallet import.

Is this recommended procedure.?


I wonder  what the real purpose for creating a dumpfile is. It clears the wallet so what can you use a dumpfile  for (except import).
it would be nice to have a possibility to recreate a wallet.

Maybe someone has already created a useful tool that uses a dumpfile as input?  Except "importwallet"

legendary
Activity: 1946
Merit: 1427
February 03, 2020, 03:17:09 PM
#7
Two different users... same wallet... same problem. Huh Huh Huh
I actually think it's the same person.

Their linguistics/formatting seem pretty similar. (And of course the path is a pretty decent hint too..?)
Tried:
14:39:37

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

Res(p)onse:

Importing wallets is disabled when blocks are pruned (code -4)
I tried to import a dumpfile from a local bitcoin instance to another new local  "virgin" instance. Got an error message:

Command:  


importwallet "C:\DumpedWallets\UsersAdministratorDesktopWalletsDesktopDBitcoinBUwallet.dat"


Response:


Importing wallets is disabled when blocks are pruned (code -4)
Ever seen not one, but two people format like that?
HCP
legendary
Activity: 2086
Merit: 4361
February 03, 2020, 02:31:56 PM
#6
Is there a new "scam" and/or stolen wallet .zip file doing the rounds or something? Huh

I tried to import a dumpfile from a local bitcoin instance to another new local  "virgin" instance. Got an error message:

Command: 
importwallet "C:\DumpedWallets\UsersAdministratorDesktopWalletsDesktopDBitcoinBUwallet.dat"

Response:
Importing wallets is disabled when blocks are pruned (code -4)
Tried:

14:39:37
importwallet "C:\Users\Ingvar\Desktop\WalletsDesktop\DumpedWallets\UsersAdministratorDesktopWalletsDesktopDBitcoinBUwallet.dat"

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

Two different users... same wallet... same problem. Huh Huh Huh
legendary
Activity: 1584
Merit: 1280
Heisenberg Design Services
January 31, 2020, 02:47:15 PM
#5
You should understand the difference between a pruned wallet, pruned blockchain and a normal wallet. In a version of Bitcoin Core which runs pruned blockchain (which you use now), i.e a part of older blocks are deleted and the total size of the chain is reduced to match the stability of your computer. When the blocks become old, they are eventually deleted while you are running a pruned mode. So, whenever you import a wallet or addresses to Bitcoin Core, the -rescan rpc option is triggered by default. This will rescan the whole blockchain and will update your currently imported wallet balances.

Since the pruned mode doesn't have the whole blockchain, the rescan option has been disabled in pruned mode and since the Bitcoin Core cannot run -rescan option, the importing of wallet option is disabled in pruned mode. I guess, the default option for triggering the rescan should be false while importing wallets and addresses but this doesn't help you really.

Apart from being a full node, Bitcoin Core is a wallet as well. Rescan option is important for you to know about the current balances of the wallet and to prevent further double spending or transaction problems. So a newly imported addresses and wallet requires to run rescan option which can never be done with a pruned node.

See this code from bitcoin/src/wallet/rpcdump.cpp to know about this issue

Code:
if (pwallet->chain().havePruned()) {
        // Exit early and print an error.
        // If a block is pruned after this check, we will import the key(s),
        // but fail the rescan with a generic error.
        throw JSONRPCError(RPC_WALLET_ERROR, "Importing wallets is disabled when blocks are pruned");
    }

Don't forget to use the -rescan you can do this by going to Program Files>Bitcoin and open command prompt under that folder by holding shift key then right-click as shown as in this image below.
OP is running the wallet in pruned mode,I guess -rescan would never work as per the code.

P.S @Engelen what I have said is the basis for your error, if you would like to import the wallet follow @jackg's first post in this topic.
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
January 31, 2020, 02:32:17 PM
#4
Are you trying to import the wallet file through RPC?

Can you try to deleteRENAME the old wallet file(Note delete this if no bitcoins under this wallet) from your new wallet(Virgin instance) and then manually put the wallet file from old instance directly to %APPDATA%\Bitcoin of your new instance.

Then update here if it works or not.

RENAME the old wallet file to wallet-bak.dat just so you don't make a mistake.
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
January 31, 2020, 02:16:53 PM
#3
Are you trying to import the wallet file through RPC?

Can you try to delete the old wallet file(Note delete this if no bitcoins under this wallet) from your new wallet(Virgin instance) and then manually put the wallet file from old instance directly to %APPDATA%\Bitcoin of your new instance.

Don't forget to use the -rescan you can do this by going to Program Files>Bitcoin and open command prompt under that folder by holding shift key then right-click as shown as in this image below.



Then update here if it works or not.
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
January 31, 2020, 02:00:05 PM
#2
Afaik, when you prune the chainstate isn't stored so it will make it a lot harder to import a wallet, and I don't think you'll be able to do it without reindexing (and you might have to:
• disable pruning
• run reindex (probably done automatically with disabling pruning)
• import the wallets (preferably online)
• wait for the sync to happen (the days or weeks it takes) in order to store your new transactions for the wallet)
newbie
Activity: 2
Merit: 0
January 31, 2020, 12:27:39 PM
#1
I tried to import a dumpfile from a local bitcoin instance to another new local  "virgin" instance. Got an error message:

Command: 

importwallet "C:\DumpedWallets\UsersAdministratorDesktopWalletsDesktopDBitcoinBUwallet.dat"


Response:

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

I have tried several times  Do not understand

Running windows 10 and bitcoin core latest version




Jump to: