forked from matter-labs/zksync-era
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(en): Make ENs detect reorgs earlier (matter-labs#964)
## What ❔ Currently, the reorg detector only detects divergence based on the latest local miniblock / L1 batch. This means that if a reorg actually happens, it will only be detected be an EN once the main node catches up to it. This PR changes this logic as follows. If the main node doesn't contain local node data, it makes sense to check correspondence of the latest L1 batch / miniblock on the main node. ## Why ❔ Late reorg detection is less efficient and it may be the reason (or one of the reasons?) EN integration tests in CI frequently fail when gossip-based syncing is enabled. ## Checklist - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [x] Tests for the changes have been added / updated. - [x] Documentation comments have been added / updated. - [x] Code has been formatted via `zk fmt` and `zk lint`. - [x] Spellcheck has been run via `zk spellcheck`. - [x] Linkcheck has been run via `zk linkcheck`.
- Loading branch information
Showing
3 changed files
with
252 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.