-
Notifications
You must be signed in to change notification settings - Fork 23
[ filesystem backend] Add dcrtime database fsck #46
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the dcrtime_fsck
tool and it was working as expected. I'm not that familiar with this codebase, but the code review LGTM.
a29a808
to
602b11e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested and didn't seem to break anything
This fsck travels into all directories in a filesystem dcrtime database and ensures that all hashes and timestamps are consistent. It also verifies that flushed records are in fact stored on the blockchain and verifies the merkle roots in the flush record and reality. It currently fixes data errors caused by three bugs. These bugs have since been fixed but the data incoherence was never corrected. The fsck has a journaling function which records all actions taken. This is useful in case at a later time there needs to be a correction.
This code goes through all timestamp directories and verifies that the contents match the global database and the flush record. It identified some results of bugs that were fixed during the duration of the live version.