Database corrupted during import rescan #158

Closed
opened 3 months ago by onryo · 5 comments
onryo commented 3 months ago
Collaborator

Happened to me during second and third private key import:

image

Looks like it's from hush3: https://git.hush.is/hush/hush3/src/branch/master/src/dbwrapper.cpp#L95

https://git.hush.is/hush/SilentDragon/src/branch/master/src/connection.cpp#L955

A bug or something is wrong with my wallet? Imported window shouldn't pop up.

Happened to me during second and third private key import: ![image](/attachments/f0c1d6f3-4e35-4864-bd0c-bb0f9483ae31) Looks like it's from hush3: https://git.hush.is/hush/hush3/src/branch/master/src/dbwrapper.cpp#L95 https://git.hush.is/hush/SilentDragon/src/branch/master/src/connection.cpp#L955 A bug or something is wrong with my wallet? Imported window shouldn't pop up.
onryo added the
bug
label 3 months ago
Owner

@onryo this is related to downloaded blockchain data being corrupt (the blocks and chainstate directories), not the wallet. A fresh sync with the same wallet.dat should hopefully fix it. This is a pretty rare error, it was probably caused by a previous crash

@onryo this is related to downloaded blockchain data being corrupt (the `blocks` and `chainstate` directories), not the wallet. A fresh sync with the same wallet.dat should hopefully fix it. This is a pretty rare error, it was probably caused by a previous crash
Owner

@onryo since you are going to do a fresh full sync anyway, if you wouldn't mind please try using the latest duke branch to do the fresh sync. I am trying to confirm there are no bugs in it so it can be merged to dev . The latest duke branch has lots of nice improvements that speed up compiling, syncing, making transactions and randomx mining. Thanks

@onryo since you are going to do a fresh full sync anyway, if you wouldn't mind please try using the latest `duke` branch to do the fresh sync. I am trying to confirm there are no bugs in it so it can be merged to `dev` . The latest `duke` branch has lots of nice improvements that speed up compiling, syncing, making transactions and randomx mining. Thanks
Collaborator

Sebuh said he can reproduce corrupt data on key imports, but I think it's user error/impatience as I've reproduced the same years back.

Part of the problem for some users is they don't realize a rescan is running. Maybe because the GUI doesn't update or show rescan status? They then kill GUI and hushd is still running in background rescanning, which can be verified by checking log or getrescaninfo. They restart their PC or kill hushd during the rescan and get corrupt data. Maybe something similar happens if importing an additional key before the previous rescan finishes?

Sebuh said he can reproduce corrupt data on key imports, but I think it's user error/impatience as I've reproduced the same years back. Part of the problem for some users is they don't realize a rescan is running. Maybe because the GUI doesn't update or show rescan status? They then kill GUI and hushd is still running in background rescanning, which can be verified by checking log or `getrescaninfo`. They restart their PC or kill hushd during the rescan and get corrupt data. Maybe something similar happens if importing an additional key before the previous rescan finishes?
Owner

@fekt I am pretty sure this was fixed in commit 3a6f632b9b on dev branch. We really need a new release because this bug is really shitty.

The bug was caused by the callback for when rescan finishes referencing a variable pui.rescanfrom that no longer exists

@fekt I am pretty sure this was fixed in commit 3a6f632b9bc94b626be88964d3934b898fa6bb25 on dev branch. We really need a new release because this bug is really shitty. The bug was caused by the callback for when rescan finishes referencing a variable `pui.rescanfrom` that no longer exists
Owner

Ok, I think the latest release has a fix for this. Closing

Ok, I think the latest release has a fix for this. Closing
duke closed this issue 2 months ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.