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
Disallow snapshot state-sync if local snapshots exist #8679
Comments
Thinking more, I don't think we want to be that strict by looking directly at the config options because I think it will be a step back in usability. Currently you can start a node with StartHeight as The way Tendermint handles the statesync option is:
So from cores point of view if we have a start-height set and statesync is on three things can happen:
In the last situation currently we will throw away all existing snapshots and let tendermint statesync. I believe this is the wrong thing to do and we should instead fail when Tendermint tries to statesync. It means the core node has got into an inconsistent state where they have And thats the root cause in all of this: we don't remove all snapshots when you do So I think we need two things here:
With the above I think we'll then be able to do the moving of the local snapshot load to a more logical place. |
It makes a lot of sense. Let's do this instead. |
I will repurpose this issue. |
This check must account for the configured if localSnapshots { // so ignoring state-sync
if startHeight == 0 {
// Loading from latest local snapshot,
} else {
// Try reloading snapshot from specified height.
// Error -> No snapshot for version XXX
}
} else {
if startHeight == 0 {
// Replay the chain or state-sync if enabled. Up to tendermint to decide.
} else {
// Wait for state-sync to offer expected snapshot for height
}
} This will be implemented in #8680 |
To improve the snapshot initialization workflow, we first need to make the loading mode (state-sync or local store) in configuration much more strict. It should be either the state-sync, either from local storage. If both are configured then we should throw an error.
This work prepares the next step that will make the snaphsot engine load the snapshots right upon initialization.
The text was updated successfully, but these errors were encountered: