Skip to content

Conversation

@GheisMohammadi
Copy link
Collaborator

@GheisMohammadi GheisMohammadi commented Apr 23, 2025

This PR improves the reliability and clarity of the sync process. The P2P stream is now thread-safe and resets automatically on failure, which helps prevent sync hangs. Short range sync was updated to accept partial blocks and properly break the loop when done, improving flexibility and performance during catch-up.

Several refactors and clean-ups were made to staged sync: initSync now uses internal parameters instead of external variables, and the unused LogProgress option was removed. We also fixed DB path handling for stream sync and re-added last mile blocks to ensure full chain coverage.

On the beacon side, we cleaned up redundant shard checks, fixed beacon helper initialization, and clarified internal comments. Minor improvements include fixing stream failure type handling and simplifying epoch tracking with a dedicated variable.

@GheisMohammadi GheisMohammadi self-assigned this Apr 23, 2025
@GheisMohammadi GheisMohammadi marked this pull request as draft April 23, 2025 10:52
@GheisMohammadi GheisMohammadi changed the title Optimize and Clean-Up Stages in Staged Stream Sync Optimize and Clean-Up Stages in Staged Stream Sync, Thread Safe P2P Stream Apr 23, 2025
@GheisMohammadi GheisMohammadi marked this pull request as ready for review April 24, 2025 14:46
@mur-me mur-me requested a review from Frozen April 24, 2025 15:04
@GheisMohammadi GheisMohammadi merged commit 349c7e8 into dev Apr 24, 2025
3 checks passed
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.

4 participants