Fix rollback failure due to snapshot creation happened after app hash#2680
Merged
Fix rollback failure due to snapshot creation happened after app hash#2680
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2680 +/- ##
==========================================
+ Coverage 43.82% 43.83% +0.01%
==========================================
Files 1908 1908
Lines 159073 159073
==========================================
+ Hits 69708 69731 +23
+ Misses 82958 82939 -19
+ Partials 6407 6403 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
blindchaser
approved these changes
Jan 9, 2026
masih
approved these changes
Jan 9, 2026
yzang2019
added a commit
that referenced
this pull request
Feb 25, 2026
…#2680) ## Describe your changes and provide context Problem: Currently when a node app hashed, and the node was running in that state for a long enough time, snapshot creation will kick in on latest block height. And if the node was configured to only store 1 snapshot, then the old snapshot height will be truncated. That will lead to rollback failure because there's no way to rollback to a height that is older than the only snapshot exist. Mitigation: Previously we made a change to be able to create snapshot at any given height, as long as the height difference is > interval. This PR revert that changes so that snapshot creation will only happen if the block height % snapshot interval == 0. This should greatly reduce the chance of rollback failure leading to snapshot being created on latest height. ## Testing performed to validate your change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes and provide context
Problem:
Currently when a node app hashed, and the node was running in that state for a long enough time, snapshot creation will kick in on latest block height. And if the node was configured to only store 1 snapshot, then the old snapshot height will be truncated. That will lead to rollback failure because there's no way to rollback to a height that is older than the only snapshot exist.
Mitigation:
Previously we made a change to be able to create snapshot at any given height, as long as the height difference is > interval. This PR revert that changes so that snapshot creation will only happen if the block height % snapshot interval == 0. This should greatly reduce the chance of rollback failure leading to snapshot being created on latest height.
Testing performed to validate your change