forked from ethereum-optimism/optimism
-
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.
Fix sync-start bug + improve sync-start comments (ethereum-optimism#355)
Fix bug (L1 origin head with non-canonical ancestors) This happened in the scenario where `l2ahead == true` (L1 origin of start is ahead of know L1 head) and `start` had an ancestor whose L1 origin was known not to be canonical. Example: L1 head is at block X. `start` has an L1 origin with number X + 1 but its parent L2 block has an L1 origin with number X whose blockhash is not canonical. In this case, the algorithm still returned `start` as the unsafe L1 head, which is incorrect. This also touches a bunch of comments to generally improve understanbility.
- Loading branch information
Showing
1 changed file
with
122 additions
and
81 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