Skip to content

syncer: Add syncing fallback #249

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

Merged
merged 1 commit into from
Jun 3, 2025
Merged

syncer: Add syncing fallback #249

merged 1 commit into from
Jun 3, 2025

Conversation

lukechampine
Copy link
Member

It seems that syncing sometimes stalls even when we have peers with a longer chain. We should investigate exactly why this happens, but in the meantime, add a fallback that resets the peer's sync status after 1-2 minutes, causing us to try to sync with them again later on.

@Copilot Copilot AI review requested due to automatic review settings June 2, 2025 15:47
@github-project-automation github-project-automation bot moved this to In Progress in Sia Jun 2, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a fallback mechanism to reset a peer’s sync status if syncing stalls by scheduling a delayed reset.

  • Introduces a randomized delay (60-120 seconds) to trigger a reset of the peer's sync status.

@lukechampine lukechampine force-pushed the synced-flag branch 2 times, most recently from 999ce90 to 26fac5d Compare June 2, 2025 15:50
Copy link
Member

@ChrisSchinnerl ChrisSchinnerl left a comment

Choose a reason for hiding this comment

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

Lgtm. Synced up a new minerd with this change and it didn't OOM which is nice.

Copy link
Member

@peterjan peterjan left a comment

Choose a reason for hiding this comment

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

still syncing on my machine, but looking good so far

@n8maninger n8maninger merged commit b029958 into master Jun 3, 2025
9 checks passed
@n8maninger n8maninger deleted the synced-flag branch June 3, 2025 18:05
@github-project-automation github-project-automation bot moved this from In Progress to Done in Sia Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants