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: reorg detector and syncer issues on develop #272

Merged
merged 12 commits into from
Jan 23, 2025

Conversation

goran-ethernal
Copy link
Collaborator

@goran-ethernal goran-ethernal commented Jan 21, 2025

Description

This PR fixes the issues found on the l1infotreesyncer and reorg detector, when we might not be tracking a correct block hash in the reorg detector.

It also fixes an issue when download channel is closing, it passes an empty block object (since it is passing objects by value and not by reference), with number 0, and empty hash, which processor passes to the reorg detector which is not correct.

Important Note:
e2e tests use sumulated client as the l1 client node, which only knows of SafeBlocks. That is why this PR expanded the constructor function of the EVMDownloader to receive finalizedBlockType parameter. When we run the cdk node or any syncer that syncs data from L1, the finalizedBlockType is FinalizedBlock as seen in the run.go. e2e tests use SafeBlock.
Also, L2 does not have a notion of FinalizedBlock, so bridgeL2Syncer will use the LatestBlock for this parameter.

Fixes # (issue)

@goran-ethernal goran-ethernal self-assigned this Jan 21, 2025
@goran-ethernal goran-ethernal force-pushed the fix/reorg-detector-syncer-issues-cherry-pick branch 5 times, most recently from 434d530 to 80c6240 Compare January 21, 2025 12:54
@goran-ethernal goran-ethernal force-pushed the fix/reorg-detector-syncer-issues-cherry-pick branch from 80c6240 to 3de7f02 Compare January 21, 2025 13:19
@goran-ethernal goran-ethernal marked this pull request as ready for review January 21, 2025 16:33
@goran-ethernal goran-ethernal changed the title fix: reorg detector and syncer issues cherry-pick to develop fix: reorg detector and syncer issues on develop Jan 21, 2025
@goran-ethernal goran-ethernal merged commit e3b3dd5 into develop Jan 23, 2025
14 checks passed
@goran-ethernal goran-ethernal deleted the fix/reorg-detector-syncer-issues-cherry-pick branch January 23, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants