Skip to content

Conversation

@michaelsproul
Copy link
Member

@michaelsproul michaelsproul commented Sep 17, 2025

Issue Addressed

Fix a memory leak in the reprocess queue.

Proposed Changes

If the vec of attestation IDs for a block is never evicted from the reprocess queue by a BlockImported event, then it stays in the map forever consuming memory. The fix is to remove the entry when its last attestation times out. We do similarly for light client updates.

In practice this will only occur if there is a race between adding an attestation to the queue and processing the BlockImported event, or if there are attestations for block roots that we never import (e.g. random block roots, block roots of invalid blocks).

Additional Info

  • New metrics added to track the sizes of these maps.
  • Regression tests added.

@michaelsproul michaelsproul added bug Something isn't working hardening v8.0.0-rc.0 Q3 2025 release for Fusaka on Holesky labels Sep 17, 2025
@michaelsproul michaelsproul added the ready-for-review The code is ready for review label Sep 17, 2025
Copy link
Member

@jimmygchen jimmygchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix and tests!

@jimmygchen jimmygchen added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Sep 18, 2025
mergify bot added a commit that referenced this pull request Sep 18, 2025
mergify bot added a commit that referenced this pull request Sep 18, 2025
mergify bot added a commit that referenced this pull request Sep 18, 2025
mergify bot added a commit that referenced this pull request Sep 18, 2025
mergify bot added a commit that referenced this pull request Sep 18, 2025
mergify bot added a commit that referenced this pull request Sep 18, 2025
@mergify mergify bot merged commit 684632d into sigp:unstable Sep 18, 2025
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working hardening ready-for-merge This PR is ready to merge. v8.0.0-rc.0 Q3 2025 release for Fusaka on Holesky

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants