Skip to content

fix: increase tipset cache size#7167

Merged
hanabi1224 merged 1 commit into
mainfrom
hm/increase-tipset-cache-size
Jun 11, 2026
Merged

fix: increase tipset cache size#7167
hanabi1224 merged 1 commit into
mainfrom
hm/increase-tipset-cache-size

Conversation

@hanabi1224

@hanabi1224 hanabi1224 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

Changes introduced in this pull request:

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

Outside contributions

  • I have read and agree to the CONTRIBUTING document.
  • I have read and agree to the AI Policy document. I understand that failure to comply with the guidelines will lead to rejection of the pull request.

Summary by CodeRabbit

  • Chores
    • Increased the default chain tipset cache capacity, resulting in improved runtime performance and memory efficiency for chain storage operations.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 890dacc3-6354-4d50-9cbc-29128d499431

📥 Commits

Reviewing files that changed from the base of the PR and between af2988e and fcd20d7.

📒 Files selected for processing (1)
  • src/chain/store/index.rs
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • filecoin-project/lotus (manual)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/chain/store/index.rs

Walkthrough

The PR triples the default tipset cache capacity used by ChainIndex by changing DEFAULT_TIPSET_CACHE_SIZE from 2880 to 8640 entries in src/chain/store/index.rs.

Changes

Tipset Cache Capacity

Layer / File(s) Summary
Tipset cache size constant
src/chain/store/index.rs
DEFAULT_TIPSET_CACHE_SIZE constant multiplied by 3 (from nonzero!(2880_usize) to nonzero!(2880_usize * 3)), increasing the default tipset cache capacity used by ChainIndex::new.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • ChainSafe/forest#6880: Also modifies cache-related configuration in src/chain/store/index.rs, adjusting tipset and height caching capacity and usage.
  • ChainSafe/forest#7112: Related work on tipset_by_height caching behavior in the same ChainIndex cache area.
  • ChainSafe/forest#7126: Adjusts default tipset cache sizing constants affecting related caching behavior.

Suggested reviewers

  • LesnyRumcajs
  • akaladarshi
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: increase tipset cache size' is directly related to the main change—increasing DEFAULT_TIPSET_CACHE_SIZE from 2880 to 8640.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hm/increase-tipset-cache-size
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch hm/increase-tipset-cache-size

Comment @coderabbitai help to get the list of available commands and usage tips.

@hanabi1224 hanabi1224 marked this pull request as ready for review June 11, 2026 11:58
@hanabi1224 hanabi1224 requested a review from a team as a code owner June 11, 2026 11:58
@hanabi1224 hanabi1224 requested review from LesnyRumcajs and akaladarshi and removed request for a team June 11, 2026 11:58
@hanabi1224 hanabi1224 force-pushed the hm/increase-tipset-cache-size branch from af2988e to fcd20d7 Compare June 11, 2026 12:01
@hanabi1224 hanabi1224 enabled auto-merge June 11, 2026 12:03
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.34%. Comparing base (be7fba3) to head (fcd20d7).
✅ All tests successful. No failed tests found.

Additional details and impacted files
Files with missing lines Coverage Δ
src/chain/store/index.rs 85.38% <ø> (ø)

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be7fba3...fcd20d7. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hanabi1224 hanabi1224 added this pull request to the merge queue Jun 11, 2026
Merged via the queue into main with commit aff42c3 Jun 11, 2026
33 checks passed
@hanabi1224 hanabi1224 deleted the hm/increase-tipset-cache-size branch June 11, 2026 12:45
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