Skip to content

fix check for attaching to pre-finalized parent #4161

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

Merged
merged 1 commit into from
Sep 22, 2022

Conversation

etan-status
Copy link
Contributor

When the BN's head is reorged while shut down, reloading the BN will not assign BlockRef to alternate branches. However, blocks from other branches are still present in the database, leading to their descendants incorrectly marked as UnviableFork. By restricting the check to blocks that have been finalized, they should be reported as MissingParent instead, eventually re-assigning a BlockRef to them.

When the BN's head is reorged while shut down, reloading the BN will not
assign `BlockRef` to alternate branches. However, blocks from other
branches are still present in the database, leading to their descendants
incorrectly marked as `UnviableFork`. By restricting the check to blocks
that have been finalized, they should be reported as `MissingParent`
instead, eventually re-assigning a `BlockRef` to them.
@etan-status etan-status enabled auto-merge (squash) September 22, 2022 15:54
@etan-status etan-status merged commit 6069003 into unstable Sep 22, 2022
@etan-status etan-status deleted the dev/etan/fc-existingparent branch September 22, 2022 18:33
@arnetheduck
Copy link
Member

this looks like it could use a test case

@greenertux
Copy link

Problem is not fixed with v22.10. If I read correctly, this fix has not been included in that release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants