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

Resolve invalid snapshot pruning #791

Merged
merged 1 commit into from
Oct 13, 2022
Merged

Conversation

zivkovicmilos
Copy link
Contributor

@zivkovicmilos zivkovicmilos commented Oct 11, 2022

Description

This PR resolves a pending problem with snapshot pruning, where all snapshots would get pruned out if they incorrectly met the criteria (the snapshot prune selection mechanism didn't take into account that at least one snapshot needs to be left in the snapshot list in-memory).

This problem is only present in PoA networks.

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

Manual tests

Tested manually with a running cluster and small epoch sizes. Additionally, test cases that cover these scenarios have been added.

Additional comments

Fixes EVM-32

@codecov
Copy link

codecov bot commented Oct 11, 2022

Codecov Report

Merging #791 (dee248b) into develop (9f1ce9b) will increase coverage by 0.03%.
The diff coverage is 80.00%.

@@             Coverage Diff             @@
##           develop     #791      +/-   ##
===========================================
+ Coverage    52.41%   52.45%   +0.03%     
===========================================
  Files          132      132              
  Lines        17494    17520      +26     
===========================================
+ Hits          9170     9190      +20     
- Misses        7657     7661       +4     
- Partials       667      669       +2     
Impacted Files Coverage Δ
validators/store/snapshot/types.go 94.67% <80.00%> (-2.12%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@zivkovicmilos zivkovicmilos merged commit b6d968a into develop Oct 13, 2022
@zivkovicmilos zivkovicmilos deleted the hotfix/snapshot-not-found branch October 13, 2022 13:49
@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
hotfix Major bug fix that should be merged ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

failed to get validators when calculation quorum: height=151 err="not found snapshot"
3 participants