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

Add basic reorg handling #490

Merged
merged 1 commit into from
Jul 22, 2024
Merged

Add basic reorg handling #490

merged 1 commit into from
Jul 22, 2024

Conversation

jannikluhn
Copy link
Contributor

Reorgs are detected by comparing each incoming header with the current sync head. If the incoming header is supposed to be the child of the sync head according to its block number, but the parent hash is different, a reorg is detected. Then, we delete the most recent events in the database.

Reorgs are detected by comparing each incoming header with the current
sync head. If the incoming header is supposed to be the child of the
sync head according to its block number, but the parent hash is
different, a reorg is detected.
Copy link
Contributor

@fredo fredo left a comment

Choose a reason for hiding this comment

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

lgtm just wondering if we need to delete anything else than txs? What about validator registry etc?

@jannikluhn
Copy link
Contributor Author

For the validator registry it's not that urgent because duplicates are handled automatically. We just look at the latest signed message there, so it doesn't matter if we insert the same message more than once into the db.

@jannikluhn jannikluhn merged commit e6640c0 into gnosis Jul 22, 2024
7 of 12 checks passed
@jannikluhn jannikluhn deleted the basic-reorg-handling branch August 6, 2024 08:11
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.

None yet

2 participants