Skip to content

fix: chain follower gets stuck in some cases #5675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hanabi1224
Copy link
Contributor

@hanabi1224 hanabi1224 commented May 29, 2025

Summary of changes

I happened to run into #5679 on mainnet after rebooting the node during chain catchup validation. After setting chain head to a few epochs back, the node was still stuck (No tipset download jobs are scheduled),

With changes in this PR, my node was able to resume following the chain, however, I cannot reproduce the issue, but found another bug #5677

This PR should fix #5677 and might fix #5679

Changes introduced in this pull request:

Reference issue to close (if applicable)

Closes #5677
Closes #5679

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.

@hanabi1224 hanabi1224 marked this pull request as ready for review May 29, 2025 12:06
@hanabi1224 hanabi1224 requested a review from a team as a code owner May 29, 2025 12:06
@hanabi1224 hanabi1224 requested review from LesnyRumcajs and sudo-shashank and removed request for a team May 29, 2025 12:06
Comment on lines 571 to 582
} else if let Ok(parent_ts) = load_full_tipset(&self.cs, tipset.parents().clone()) {
let head_ts = self.cs.heaviest_tipset();
if parent_ts.key() == head_ts.key() {
true
} else if parent_ts.epoch() >= head_ts.epoch() {
false
} else {
self.cs
.blockstore()
.has(parent_ts.parent_state())
.unwrap_or(false)
}
Copy link
Member

Choose a reason for hiding this comment

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

Would you mind adding comments around those in plain English to explain what is happening and why? I think given the complexity of this, we should strive for as much documentation as possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

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.

Forest occasionally gets stuck after rebooting on 2k devnet Forest should follow the chain from the new epoch set by Filecoin.ChainSetHead
2 participants