Skip to content

app/eth2wrap: trim requestedIdxs from cache#4413

Merged
obol-bulldozer[bot] merged 1 commit intomainfrom
kalo/fix-duties-cache-leak
Mar 25, 2026
Merged

app/eth2wrap: trim requestedIdxs from cache#4413
obol-bulldozer[bot] merged 1 commit intomainfrom
kalo/fix-duties-cache-leak

Conversation

@KaloyanTanev
Copy link
Copy Markdown
Collaborator

requestedIdxs was not trimmed previously, resulting in a memory leak.

category: bug
ticket: none

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes an unbounded growth issue in DutiesCache by ensuring requestedIdxs entries are trimmed alongside duties/metadata when cache epochs are pruned.

Changes:

  • Delete requestedIdxs entries in all duties trim paths (before/after; proposer/attester/sync).
  • Add internal tests that exercise Trim behavior across small, sequential, and large (1000 epochs) scenarios.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
app/eth2wrap/cache.go Ensures requestedIdxs is deleted whenever duties/metadata entries are trimmed to prevent memory growth.
app/eth2wrap/cache_internal_test.go Adds tests validating that Trim removes old epochs across all duties maps and does not trim below threshold.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 25, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.53%. Comparing base (be67ac5) to head (20b3cd9).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
app/eth2wrap/cache.go 50.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4413      +/-   ##
==========================================
+ Coverage   56.42%   56.53%   +0.10%     
==========================================
  Files         244      244              
  Lines       32421    32427       +6     
==========================================
+ Hits        18294    18333      +39     
+ Misses      11779    11752      -27     
+ Partials     2348     2342       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KaloyanTanev KaloyanTanev force-pushed the kalo/fix-duties-cache-leak branch from 62fd7a8 to 20b3cd9 Compare March 25, 2026 16:26
@KaloyanTanev KaloyanTanev changed the title app/eth2wrap: Trim requestedIdxs from cache app/eth2wrap: trim requestedIdxs from cache Mar 25, 2026
@KaloyanTanev KaloyanTanev requested a review from Copilot March 25, 2026 16:26
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@KaloyanTanev KaloyanTanev added the merge when ready Indicates bulldozer bot may merge when all checks pass label Mar 25, 2026
@obol-bulldozer obol-bulldozer bot merged commit 32999da into main Mar 25, 2026
16 of 18 checks passed
@obol-bulldozer obol-bulldozer bot deleted the kalo/fix-duties-cache-leak branch March 25, 2026 16:37
KaloyanTanev added a commit that referenced this pull request Mar 25, 2026
`requestedIdxs` was not trimmed previously, resulting in a memory leak.

category: bug
ticket: none
@KaloyanTanev KaloyanTanev mentioned this pull request Mar 25, 2026
obol-bulldozer bot pushed a commit that referenced this pull request Mar 25, 2026
#4413 

category: bug
ticket: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge when ready Indicates bulldozer bot may merge when all checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants