-
Notifications
You must be signed in to change notification settings - Fork 492
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
ledger: create catchpoint tracker #3085
ledger: create catchpoint tracker #3085
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3085 +/- ##
==========================================
- Coverage 47.34% 47.18% -0.16%
==========================================
Files 364 365 +1
Lines 58296 58361 +65
==========================================
- Hits 27599 27537 -62
- Misses 27515 27631 +116
- Partials 3182 3193 +11
Continue to review full report at Codecov.
|
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.
I like the separation of the logic.
In the same time I'm a bit concerned with mixing commit data (offset, base) with context data into deferredCommitContext
. I propose to keep them separate: let trackers contribute into commit data by modifying (offset, base) as needed but only setting/getting data from the context in order to have kind of "these data are set by au and used by ct"
I've broken a subset of |
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.
Looks good. The only thing worries me is deferredCommitRange
is modified by all trackers and there are no restrictions on offset/base change. Maybe some kind "protocol" on modifications is needed otherwise there is a chance some tracker can set the offset way too off for some other tracker. It looks like the range deferredCommitRange
wants to be a type with some encapsulated behavior with max/min offset values for this round.
I didn't want to be too restrictive on what can be done with the |
## Summary When implementing the catchpoint tracker, I missed the re-initilization location for some of the local variables. This would generate incorrect catchpoint labels after a node completes a fast-catchup. #3085 ## Test Plan - [x] Add unit tests - [x] Perform manual testing
Summary
Extract catchpoint logic out of the accounts update tracker.
Test Plan
Refactor existing unit tests.