-
Notifications
You must be signed in to change notification settings - Fork 74
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
Only use database if it's more recent than checkpoint #2401
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automatically approving tomaka's pull requests. This auto-approval will be removed once more maintainers are active.
This is tracked by #515 |
twiggy diff reportDifference in .wasm size before and after this pull request.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
At a chain initialization, we provide a chain spec and, generally, an existing database. The chain spec can contain a checkpoint where we start syncing from.
Before this PR, the database always took precedence. This means that if database contains block 10 but the chain spec contains block 50000, we'll start syncing at block 10.
After this PR, the database is ignored if its block is below the checkpoint's.
This is especially important in situations where some sudo operation happened on a chain which breaks the warp syncing, like it happened on Rococo a week ago. Basically, smoldot is incapable of syncing over the blocks that force-change the list of validators. Before this PR, even if we ship a more recent checkpoint to bypass this issue, users would still use their database and be stuck at the block in question.