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 L2 reorg related issues #203

Merged
merged 3 commits into from
Mar 16, 2022
Merged

Fix L2 reorg related issues #203

merged 3 commits into from
Mar 16, 2022

Conversation

Mirko-von-Leipzig
Copy link
Contributor

This PR fixes two separate bugs.

  1. The L2 reorg tail was off-by-one block which means afterL2 reorg we would skip a block which would fail due to the state root not matching.
  2. After an L2 reorg, we don't clean up transaction data which meant following new blocks could fail due to already existing transactions.

Inserting a transaction after a reorg failed due to it already existing.

Also standardized upsert behaviour as REPLACE.
Copy link
Contributor

@kkovaacs kkovaacs left a comment

Choose a reason for hiding this comment

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

LGTM

@Mirko-von-Leipzig Mirko-von-Leipzig merged commit fa61a4a into main Mar 16, 2022
@Mirko-von-Leipzig Mirko-von-Leipzig deleted the fix_l2_reorg branch March 16, 2022 15:17
Mirko-von-Leipzig added a commit that referenced this pull request Mar 16, 2022
Fix L2 reorg related issues
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.

3 participants