Skip to content

Clean up beacon state cache after each beacon action#2936

Merged
naddison36 merged 2 commits into
masterfrom
fix/prune-beacon-state-cache
Jul 13, 2026
Merged

Clean up beacon state cache after each beacon action#2936
naddison36 merged 2 commits into
masterfrom
fix/prune-beacon-state-cache

Conversation

@apexearth

@apexearth apexearth commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description

Cleans up cached beacon state files downloaded by the Talos beacon verification actions.

Beacon state SSZ files are large, and each verification run can fetch a unique slot into contracts/cache/state_*.ssz. On long-lived Talos runners, these files can accumulate until the runner runs out of disk space.

This PR updates the beacon verification actions to prune old cached beacon state files after a successful action run.

Changes

  • Runs beacon state cache cleanup after successful verifyBalances and verifyDeposits actions.
  • Deletes only ./cache/state_*.ssz files older than 1 day.
  • Leaves newer beacon state files in place for retries/debugging.
  • Avoids touching unrelated Hardhat cache files.

Verification

  • Ran pnpm prettier:js
  • Ran pnpm prettier:ts
  • Ran pnpm lint:ts
  • Ran pnpm exec eslint utils/beacon.js
  • Added a focused local cleanup check confirming:
    • old beacon state files are deleted
    • fresh beacon state files are kept
    • unrelated cache files are kept

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.63%. Comparing base (d784378) to head (6466b1e).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2936   +/-   ##
=======================================
  Coverage   44.63%   44.63%           
=======================================
  Files         110      110           
  Lines        4920     4920           
  Branches     1362     1362           
=======================================
  Hits         2196     2196           
  Misses       2721     2721           
  Partials        3        3           

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@naddison36 naddison36 merged commit 3e1c272 into master Jul 13, 2026
16 of 18 checks passed
@naddison36 naddison36 deleted the fix/prune-beacon-state-cache branch July 13, 2026 09:13
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.

3 participants