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

Improve checkpoints for resolving forks #141

Closed
jasny opened this issue Apr 8, 2022 · 0 comments
Closed

Improve checkpoints for resolving forks #141

jasny opened this issue Apr 8, 2022 · 0 comments

Comments

@jasny
Copy link
Member

jasny commented Apr 8, 2022

A checkpoint is a set of block height and signature combinations. While processing blocks, a block at the height of a checkpoint that doesn't match the checkpoint's signature, will be considered invalid and discarded.

Checkpoints do not work for blocks that are already processed and therefore can't properly resolve a fork.

Checkpoints are be broadcasted to all nodes. The checkpoint needs to be signed by the public key that's configured as checkpoints.public-key. While powerful, it gives centralized control over nodes.


Checkpoints should be in the configuration instead. In case of a fork, changing the config / updating the docker container will be required.

Nodes should check the checkpoints at startup for blocks it has already processed. In case there's a mismatch between the block signature and checkpoint signature, the node should attempt to rollback. If a rollback isn't possible, because it's passed the threshold, the node should log a message and halt.

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

No branches or pull requests

1 participant