Skip to content
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

fix(l1): full-sync with both consensus and execution node #2081

Draft
wants to merge 4 commits into
base: fix/full-sync
Choose a base branch
from
Draft
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions crates/networking/p2p/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,14 @@ impl SyncManager {
store.add_block_headers(block_hashes.clone(), block_headers)?;

if self.sync_mode == SyncMode::Full {
if sync_head_found {
// Filter out everything after the sync_head
block_hashes = block_hashes
.iter()
.take_while(|&hash| *hash != sync_head)
.cloned()
.collect();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This logic should be on both sync modes: snap and full.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in 973719d!

self.download_and_run_blocks(&mut block_hashes, store.clone())
.await?;
}
Expand Down
Loading