lighthouse
lighthouse copied to clipboard
fix: Distinguish long chains from failed chains in block lookup sync
Issue Addressed
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
Some required checks have failed. Could you please take a look @gitToki? 🙏
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
- https://github.com/sigp/lighthouse/issues/7678
Oh okay, I will close this PR then if it's no longer relevant