Skip to content
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

fix for missing block under certain startup conditions #3555

Merged
merged 1 commit into from
Feb 9, 2021

Conversation

antiochp
Copy link
Member

@antiochp antiochp commented Feb 3, 2021

This PR fixes a "cannot find block" error that can occur during node startup.
We have some code that runs during node initialization that exercises the PIBD segmenter as we wanted to keep this code "in use".
There is an edge case during startup that we did not account for - if the node is shutdown while it is in the process of syncing then on next startup the chain can find itself in a state where traversing back to the "archive header" (our 720 block archival period) can fail as we do not have the full set of blocks for this time period yet.
This PR simply ensures the code that touches the segmenter does not fail in this situation (during startup).

This is related to a jump from one 720 block archive period to the next due to chain height, during sync. It is possible for the jump to result in "missing" blocks as we are still syncing. This is not a problem with data integrity or missing data - its just that we were making a bad assumption during node initialization without accounting for this scenario.

Resolves #3516

@antiochp
Copy link
Member Author

antiochp commented Feb 9, 2021

Going to merge this. Its a small change to node init code, making it more failure tolerant.

@antiochp antiochp merged commit a3aed4a into mimblewimble:master Feb 9, 2021
@antiochp antiochp deleted the fix_missing_block branch February 9, 2021 09:13
@antiochp antiochp mentioned this pull request May 6, 2021
bayk added a commit to mwcproject/mwc-node that referenced this pull request Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Server Cannot Run Because of NotFoundErr
1 participant