Skip to content

chore: update the chain follower logs to report validation#7382

Open
akaladarshi wants to merge 1 commit into
mainfrom
akaladarshi/sync-log-validation-start
Open

chore: update the chain follower logs to report validation#7382
akaladarshi wants to merge 1 commit into
mainfrom
akaladarshi/sync-log-validation-start

Conversation

@akaladarshi

@akaladarshi akaladarshi commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary of changes

Changes introduced in this pull request:

  • Instead of the max forks epoch remaining to start validation, now log shows min epochs remaining to start validation
  • Update the chain follower logs to report the remaining tipset to start validation instead of remaining downloads

Reference issue to close (if applicable)

Closes #5499

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

  • This pull request is based on an issue that a maintainer has accepted (see Before Opening a Pull Request).
  • 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

  • Bug Fixes
    • Improved chain synchronization progress reporting while catching up to the latest chain head.
    • Status messages now provide clearer stage-based information, including validation progress.
    • Progress updates are shown only when synchronization is significantly behind, reducing unnecessary log noise.

@coderabbitai

coderabbitai Bot commented Jul 17, 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: c1a644d5-e76c-417b-bda4-dda82e3f0f0f

📥 Commits

Reviewing files that changed from the base of the PR and between d44ecc7 and 9cb988c.

📒 Files selected for processing (1)
  • src/chain_sync/chain_follower.rs
🔗 Linked repositories identified

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

  • filecoin-project/lotus (manual)

Walkthrough

ChainFollower catch-up progress logging now uses the epoch gap to HEAD and reports fork validation stages instead of the number of queued tipsets.

Changes

Catch-up progress reporting

Layer / File(s) Summary
Epoch-based fork status logging
src/chain_sync/chain_follower.rs
Progress logs are emitted only when the expected-head and heaviest-chain epochs differ by more than 10, with status text describing pending or active fork tipset validation.

Estimated code review effort: 3 (Moderate) | ~15 minutes

Possibly related PRs

Suggested reviewers: hanabi1224

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: updating ChainFollower logs to report validation progress.
Linked Issues check ✅ Passed The updated catch-up logging reports epochs remaining before validation and is independent of fork count, matching #5499.
Out of Scope Changes check ✅ Passed The diff stays focused on ChainFollower catch-up logging and adds no unrelated behavior.
✨ 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 akaladarshi/sync-log-validation-start
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch akaladarshi/sync-log-validation-start

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

@akaladarshi
akaladarshi force-pushed the akaladarshi/sync-log-validation-start branch from 9c61bfd to 9cb988c Compare July 20, 2026 12:14
@akaladarshi
akaladarshi marked this pull request as ready for review July 20, 2026 12:15
@akaladarshi
akaladarshi requested a review from a team as a code owner July 20, 2026 12:15
@akaladarshi
akaladarshi requested review from LesnyRumcajs, hanabi1224 and sudo-shashank and removed request for a team July 20, 2026 12:15
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.06%. Comparing base (a6f303b) to head (9cb988c).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/chain_sync/chain_follower.rs 0.00% 22 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
src/chain_sync/chain_follower.rs 30.76% <0.00%> (-0.19%) ⬇️

... and 4 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 d44ecc7...9cb988c. 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.

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.

The ChainFollower should report when tipset validation will start

1 participant