-
Notifications
You must be signed in to change notification settings - Fork 16
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(sync): bifurcation for syncTarget #219
base: main
Are you sure you want to change the base?
Conversation
93d28e6
to
f9d2daf
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.
more comments for tests would be helpful - and I think there's some deduplication that can be done throughout the tests if possible ideally but that's just a nice to have.
TODO:
- some sort of metric reported if verifySkipping fails
- reject networkHead in case verifySkipping fails (log it aggressively w/ a WARN and report as metric)
- change name of err message
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 coverage with tests. 2 remaining comments to address
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.
Finally, I get to this. Apologies for taking it that long.
The logic is correct, and test coverage is great. I have a few semantical comments on error handling, comments and metrics.
I also had an idea on how to make bifurcation part of a general code path with recursion, but that would require minor refactoring of existing methods. It could make the code a bit cleaner, but the impact of spending more time on this is really low, so lets keep it as it is.
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.
One thing I recalled. Only mocha currently has this case, and we should test the patch there before merging by detecting if bifurcation happened and succeeded.
Fixes #217