Title: Import Dumpfiles Post by: Engelen on January 31, 2020, 05:27:39 PM 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 Title: Re: Import Dumpfiles Post by: jackg on January 31, 2020, 07:00:05 PM 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) Title: Re: Import Dumpfiles Post by: BitMaxz on January 31, 2020, 07:16:53 PM 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. https://i.imgur.com/nXe5tSn.jpg Then update here if it works or not. Title: Re: Import Dumpfiles Post by: jackg on January 31, 2020, 07:32:17 PM Are you trying to import the wallet file through RPC? Can you try to 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. Title: Re: Import Dumpfiles Post by: Heisenberg_Hunter on January 31, 2020, 07:47:15 PM 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 (https://github.com/bitcoin/bitcoin/blob/master/src/wallet/rpcdump.cpp) to know about this issue Code: if (pwallet->chain().havePruned()) { 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. Title: Re: Import Dumpfiles Post by: HCP on February 03, 2020, 07:31:56 PM Is there a new "scam" and/or stolen wallet .zip file doing the rounds or something? ???
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. ??? ??? ??? Title: Re: Import Dumpfiles Post by: AdolfinWolf on February 03, 2020, 08:17:09 PM Two different users... same wallet... same problem. ??? ??? ??? 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: Ever seen not one, but two people format like that?Command: importwallet "C:\DumpedWallets\UsersAdministratorDesktopWalletsDesktopDBitcoinBUwallet.dat" Response: Importing wallets is disabled when blocks are pruned (code -4) Title: Re: Import Dumpfiles Post by: ingvar_e on February 17, 2020, 08:55:04 PM 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" Title: Re: Import Dumpfiles Post by: HCP on February 17, 2020, 09:25:42 PM In this order: 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. Create a new "Virgin" bitcoin instance. Disable Pruning Run a full update. Try a dumpwallet import. Is this recommended procedure.? 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" 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" 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". |