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

Do not send checkpoint if node is syncing #1982

Merged
merged 2 commits into from
Oct 12, 2023
Merged

Conversation

goran-ethernal
Copy link
Collaborator

@goran-ethernal goran-ethernal commented Oct 12, 2023

Description

A user of Edge had an issue where he was testing Disaster Recovery simulation, where he stopped a validator node, and deleted all its data, to see if the node will sync up, recover, and rejoin consensus.

He noticed that while syncing, node was trying to send checkpoints on epoch ending blocks where he was a minter before it was shutdown and its data got deleted.

Since those checkpoints were already sent to rootchain, this PR introduces a fix, where on submitCheckpoint, it checks if given checkpoint was already sent, and simply returns if it is.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

@goran-ethernal goran-ethernal added the bug fix Functionality that fixes a bug label Oct 12, 2023
@goran-ethernal goran-ethernal requested a review from a team October 12, 2023 07:04
@goran-ethernal goran-ethernal marked this pull request as ready for review October 12, 2023 07:05
consensus/polybft/checkpoint_manager.go Outdated Show resolved Hide resolved
consensus/polybft/checkpoint_manager_test.go Outdated Show resolved Hide resolved
@goran-ethernal goran-ethernal merged commit c27d222 into develop Oct 12, 2023
10 checks passed
@goran-ethernal goran-ethernal deleted the checkpoint-fix branch October 12, 2023 09:38
@github-actions github-actions bot locked and limited conversation to collaborators Oct 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fix Functionality that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants