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

Clean up block-slot-indices on block deletion #15011

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

kasey
Copy link
Contributor

@kasey kasey commented Mar 4, 2025

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:

  • beacon api errors requesting blocks for impacted slots: Prysm v5.2.0 could not retrieve blocks for slot 11006593: could not snappy decode block: snappy: corrupt input #14891
  • stategen errors at startup, where we attempt to replay blocks by slot, but the index points to a root that is missing. example:
    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

@kasey kasey requested a review from a team as a code owner March 4, 2025 22:28
@kasey kasey force-pushed the delete-block-idx branch 3 times, most recently from f69b71a to 691432a Compare March 4, 2025 23:38
@kasey kasey changed the title WIP: Clean up block-slot-indices on block deletion Clean up block-slot-indices on block deletion Mar 4, 2025
@kasey kasey force-pushed the delete-block-idx branch 2 times, most recently from eb6c40a to b9703bc Compare March 4, 2025 23:56
nisdas
nisdas previously approved these changes Mar 5, 2025
prestonvanloon
prestonvanloon previously approved these changes Mar 5, 2025
@prestonvanloon prestonvanloon added this pull request to the merge queue Mar 5, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 5, 2025
@kasey kasey dismissed stale reviews from prestonvanloon and nisdas via 9f1ae87 March 5, 2025 21:18
@kasey kasey force-pushed the delete-block-idx branch from 9f1ae87 to 2eebfa2 Compare March 5, 2025 21:41
@kasey kasey force-pushed the delete-block-idx branch from 2eebfa2 to 615a45f Compare March 5, 2025 21:43
@kasey kasey enabled auto-merge March 5, 2025 21:45
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.

Prysm v5.2.0 could not retrieve blocks for slot 11006593: could not snappy decode block: snappy: corrupt input
3 participants