Skip to content

Comments

fix: Distinguish long chains from failed chains in block lookup sync#7584

Closed
gitToki wants to merge 5 commits intosigp:unstablefrom
gitToki:fix-long-chain-penalization
Closed

fix: Distinguish long chains from failed chains in block lookup sync#7584
gitToki wants to merge 5 commits intosigp:unstablefrom
gitToki:fix-long-chain-penalization

Conversation

@gitToki
Copy link
Contributor

@gitToki gitToki commented Jun 10, 2025

Issue Addressed

ticket

Proposed Changes

When a chain reaches PARENT_DEPTH_TOLERANCE, the code was putting it in failed_chains and penalizing peers who reference blocks from that chain, even if the chain itself was valid

Changes:

  • Add a separate long_chains for chains that are too long but not necessarily invalid
  • Only penalize peers for blocks from failed_chains (actual processing failures)
  • Don't penalize peers for blocks from long_chains (just drop)
  • Reorganized struct field

@gitToki gitToki requested a review from jxs as a code owner June 10, 2025 19:17
@jimmygchen jimmygchen added ready-for-review The code is ready for review syncing labels Jun 13, 2025
@mergify
Copy link

mergify bot commented Jun 13, 2025

Some required checks have failed. Could you please take a look @gitToki? 🙏

@mergify mergify bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Jun 13, 2025
@dapplion
Copy link
Collaborator

Hey @gitToki thanks for the contribution! But we are in the process of changing the syncing algorithm. The new version won't need to distinguish long chains since those will always be synced, see

@gitToki
Copy link
Contributor Author

gitToki commented Jul 1, 2025

Oh okay, I will close this PR then if it's no longer relevant

@gitToki gitToki closed this Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

syncing waiting-on-author The reviewer has suggested changes and awaits thier implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants