app/eth2wrap: trim requestedIdxs from cache#4413
Conversation
There was a problem hiding this comment.
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
requestedIdxsentries in all duties trim paths (before/after; proposer/attester/sync). - Add internal tests that exercise
Trimbehavior 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 Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
62fd7a8 to
20b3cd9
Compare
|
There was a problem hiding this comment.
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.
`requestedIdxs` was not trimmed previously, resulting in a memory leak. category: bug ticket: none
#4413 category: bug ticket: none



requestedIdxswas not trimmed previously, resulting in a memory leak.category: bug
ticket: none