fix(beacon_node): add pruning of observed_column_sidecars#8531
Merged
mergify[bot] merged 1 commit intosigp:release-v8.0from Dec 4, 2025
Merged
Conversation
pawanjay176
approved these changes
Dec 4, 2025
Member
|
Changed the base to the release branch FYI |
Merge Queue Status✅ The pull request has been merged This pull request spent 1 hour 1 minute 9 seconds in the queue, including 58 minutes 50 seconds running CI. Required conditions to merge
|
6 tasks
michaelsproul
pushed a commit
that referenced
this pull request
Feb 18, 2026
None I noticed that `observed_column_sidecars` is missing its prune call in the finalization handler, which results in a memory leak on long-running nodes (very slow (**7MB/day**)) : https://github.com/sigp/lighthouse/blob/13dfa9200f822c41ccd81b95a3f052df54c888e9/beacon_node/beacon_chain/src/canonical_head.rs#L940-L959 Both caches use the same generic type `ObservedDataSidecars<T>:` https://github.com/sigp/lighthouse/blob/22ec4b327186c4a4a87d2c8c745caf3b36cb6dd6/beacon_node/beacon_chain/src/beacon_chain.rs#L413-L416 The type's documentation explicitly requires manual pruning: > "*The cache supports pruning based upon the finalized epoch. It does not automatically prune, you must call Self::prune manually.*" https://github.com/sigp/lighthouse/blob/b4704eab4ac8edf0ea0282ed9a5758b784038dd2/beacon_node/beacon_chain/src/observed_data_sidecars.rs#L66-L74 Currently: - `observed_blob_sidecars` => pruned - `observed_column_sidecars` => **NOT** pruned Without pruning, the underlying HashMap accumulates entries indefinitely, causing continuous memory growth until the node restarts. Co-Authored-By: Antoine James <antoine@ethereum.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue Addressed
None
Proposed Changes
I noticed that
observed_column_sidecarsis missing its prune call in the finalization handler, which results in a memory leak on long-running nodes (very slow (7MB/day)) :lighthouse/beacon_node/beacon_chain/src/canonical_head.rs
Lines 940 to 959 in 13dfa92
Both caches use the same generic type
ObservedDataSidecars<T>:lighthouse/beacon_node/beacon_chain/src/beacon_chain.rs
Lines 413 to 416 in 22ec4b3
The type's documentation explicitly requires manual pruning:
lighthouse/beacon_node/beacon_chain/src/observed_data_sidecars.rs
Lines 66 to 74 in b4704ea
Currently:
observed_blob_sidecars=> prunedobserved_column_sidecars=> NOT prunedWithout pruning, the underlying HashMap accumulates entries indefinitely, causing continuous memory growth until the node restarts.
Additional Info
None