This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Conversation
Contributor
Author
|
Also probably it is better to replace |
Contributor
|
Filed #1603 for improving the tests. We will want to support atomic import-and-finalize ops, definitely |
rphmeier
approved these changes
Jan 28, 2019
sorpaas
approved these changes
Jan 28, 2019
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Seems like it has been broken recently when atomic operations were introduced. So when GRANDPA finalizes several blocks at once they're enumerated here and when 2nd block is finalized, this check fails, because meta still contain previous best-finalized block.
I've also noticed that now we can't import block + finalize it in single operation, because commit first tries to finalize not-yet-inserted block. Also seems like there could be an issue with internal
Backend' state becauseBackend' meta is updated first and then we could fail for example here => in-memory meta will be updated, while the database will not. So probably we need to do some refactoring (like introducing in-memory snapshots ofBackend' state or separating finalize and import operations) to avoid issues like these in future. But I'm not sure if we need to support atomic import-and-finalize operations. If there's anyone with this knowledge, please let me know - I'll file an issue(s) for that ^^^.