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

cleanup old blocks from cache in pruning routine #145

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

pk910
Copy link
Member

@pk910 pk910 commented Oct 10, 2024

Added a missing cleanup routine that removes block from the finalized block range from cache.
This 'should' never happen under normal conditions as the finalization routine is responsible for removing these block after processing.
However, there might be race conditions where a client receives a new block at the same time the finalization routine processes an epoch. That's clearly an edge case as new blocks even when orphaned usually do not arrive that late. But without the additional cleanup, these blocks would stay in memory forever.

@pk910 pk910 requested a review from skylenet October 14, 2024 21:45
@pk910 pk910 merged commit 0157e7a into master Oct 15, 2024
1 check passed
@pk910 pk910 deleted the pk910/clear-stale-blocks branch October 15, 2024 20:48
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.

2 participants