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

Add checkpointing and enforce testnet3 hard fork #2178

Merged
merged 1 commit into from Aug 4, 2022

Conversation

jrick
Copy link
Member

@jrick jrick commented Aug 3, 2022

In order to follow the intended chain after the unvoted testnet3 hard
fork, we implement checkpointing and require a block from the fork to
be present in the main chain. This is performed by rollbacking the
main chain at startup if an invalid checkpoint is detected, and
refusing to extend the main chain unless a checkpoint rule is
satisfied. We use checkpoints to push wallet onto the intended
unvoted chain due to it having significantly less total work than the
chain being reorged.

Copy link
Member

@davecgh davecgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. I haven't tested it yet, but going to do that shortly.

wallet/checkpoints.go Show resolved Hide resolved
In order to follow the intended chain after the unvoted testnet3 hard
fork, we implement checkpointing and require a block from the fork to
be present in the main chain.  This is performed by rollbacking the
main chain at startup if an invalid checkpoint is detected, and
refusing to extend the main chain unless a checkpoint rule is
satisfied.  We use checkpoints to push wallet onto the intended
unvoted chain due to it having significantly less total work than the
chain being reorged.
@jrick jrick merged commit c8bae96 into decred:master Aug 4, 2022
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

3 participants