Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to shrink wallet.dat? It's over 200MB #4196

Closed
miningpoolhub opened this issue May 19, 2014 · 3 comments
Closed

How to shrink wallet.dat? It's over 200MB #4196

miningpoolhub opened this issue May 19, 2014 · 3 comments

Comments

@miningpoolhub
Copy link

Hi I'm running a pool.

Is there any method to shrink wallet.dat? There's so many not using keys in wallet.dat.
It's growing and growing, over 200MB.

Well, it's not about bitcoin, actually it's altcoin. But this problem lies same in bitcoin too.
What is the right method, easily clean not using keys.

"change=" option may work, but not all altcoin's have this option. Also it must be ran before wallet.dat gets bigger.

Any dirty method is appreciated too. I want to reduce the wallet.dat safely.

@Diapolo
Copy link

Diapolo commented May 19, 2014

Isn't there an issue tracker for your altcoin :-P?

@leofidus
Copy link

If you don't receive any transactions with the wallet, you could just send the entire balance to a new wallet and use that new wallet file from now on. That's not really ideal from a privacy standpoint, but it's a solution. Alternatively export all relevant private keys and import them into a new wallet, leaving those you don't need behind.

@laanwj
Copy link
Member

laanwj commented May 19, 2014

You could try -zapwallettx. It will remove all transactions from the wallet and rescan them from the block chain. This may make the wallet smaller. After that you could compact the bdb file like this to get rid of empty space:

cp wallet.dat wallet.dat.backup
db4.8_dump wallet.dat | db4.8_load wallet.dat.new
mv wallet.dat.new wallet.dat

@laanwj laanwj closed this as completed May 19, 2014
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants