Skip to content

[ 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

Merged
merged 1 commit into from
Feb 22, 2019

Conversation

marcopeereboom
Copy link
Member

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.

Copy link
Member

@lukebp lukebp left a 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.

@marcopeereboom marcopeereboom force-pushed the fsck branch 2 times, most recently from a29a808 to 602b11e Compare February 18, 2019 21:39
@marcopeereboom marcopeereboom changed the title [ WIP] Add dcrtime database fsck [ filesystem backend] Add dcrtime database fsck Feb 19, 2019
Copy link
Member

@dajohi dajohi left a 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants