Clean up block-slot-indices on block deletion #15011
Open
+209
−12
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.
What type of PR is this?
Bug fix
What does this PR do? Why is it needed?
This fixes a bug where the slot->block index entries for a beacon block are left dangling when the block is deleted. This causes a couple different errors:
unable to start beacon node: could not start modules: could not start state generation: could not load blocks for hot state using root: could not unmarshal block with key 0xad066b644bc3fb9c89c58ea38674d34ddf5c6b27571f4345792ba2bec1119243: could not snappy decode block: snappy: corrupt input
Which issues(s) does this PR fix?
Fixes #14891
Other notes for review
Acknowledgements