Handle skip slots for FFG check points #2044
Merged
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.
Do not merge, I'm still working on regression test.
Background:
Slots: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 (each epoch is 8 slots)
Let’s say at the end of 31 we start epoch processing, and we find there's a new justified epoch (epoch 2,
because there's a new justified epoch, we replace the new justified block (the one at the boundary slot 16) with the existing one in DB, but slot 16 happens to be a skip slot, in this case we should just take its ancestor slot 15.
This PR implements the behavior
More info: ethereum/consensus-specs#768