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

Compile BDB utility programs as part of compiling zcashd #4537

Closed
daira opened this issue May 20, 2020 · 0 comments · Fixed by #4567
Closed

Compile BDB utility programs as part of compiling zcashd #4537

daira opened this issue May 20, 2020 · 0 comments · Fixed by #4567
Labels
A-wallet-database Area: Wallet database and serialization database corruption use case

Comments

@daira
Copy link
Contributor

daira commented May 20, 2020

Is your feature request related to a problem? Please describe.

Wallet database corruption happens occasionally. The version of BDB we're using does a bad job of recovering databases automatically when they're opened. (The BDB change logs mention several bugs in db recovery on initialization, fixed in later versions.)

Describe the solution you'd like

When building the bdb dependency, also build the utilities described here. Put them somewhere where users won't trip over them (i.e. not in src/), but that allows us to support a user to attempt to recover their wallet without having to perform an extra step to download the utilities and build them. This should not increase overall build times by much, I think.

Note that the utilities have to be from exactly BDB version 6.2.23, otherwise they're only likely to fail and/or corrupt the wallet.dat further.

Alternatives you've considered

Ideally we'd switch to a more reliable database, but that is a longer-term task. I have seen cases where using the utilities (specifically, using db_recover on a corrupted copy of the wallet db, moving it back to wallet.dat and restarting the node with -reindex) has been successful.

@daira daira added use case database corruption A-wallet-database Area: Wallet database and serialization labels May 20, 2020
@zkbot zkbot closed this as completed in 022c3a4 Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-wallet-database Area: Wallet database and serialization database corruption use case
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant