-
Notifications
You must be signed in to change notification settings - Fork 419
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
feat: checkpoint syncer fraud flag #4587
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4587 +/- ##
=======================================
Coverage 73.89% 73.89%
=======================================
Files 100 100
Lines 1421 1421
Branches 180 180
=======================================
Hits 1050 1050
Misses 350 350
Partials 21 21
|
f877759
to
6013bc0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very nice!
### Description Builds on top of #4587 Adds a check in the `CheckpointSubmitter` builder which emits a panic if a reorg flag was posted, since this potentially signals fraud ### Drive-by changes `CheckpointSubmitter::build` was made private, so any use of it is now replaced by the `build_and_submit` flow ### Related issues <!-- - Fixes #[issue number here] --> ### Backward compatibility Yes ### Testing Unit Tests - which is enough as long as `CheckpointSubmitter::build` is kept private
Upon detection of a merkle root mismatch between the local merkle tree (built from indexed events) and the onchain one, reorg diagnostic data is posted to checkpoint storage.
This PR focuses on the submitter logic and leaves two things for a follow up PR:
I assume rolling out to validators will happen after the follow up PR, but running with logic from this PR will already mean the reorg diagnostic flag is posted to S3 (though not tested).