Extract log tracking into separate package #1317
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1317 +/- ##
=========================================
+ Coverage 30.09% 30.29% +0.2%
=========================================
Files 47 48 +1
Lines 3825 3869 +44
=========================================
+ Hits 1151 1172 +21
- Misses 2496 2516 +20
- Partials 178 181 +3
Continue to review full report at Codecov.
|
|
|
||
| cli, logTracker := NewClientWithTracker(t, env) | ||
| logTracker.SetUpdatePredicate(func(_, newRoot types.LogRootV1) bool { | ||
| return newRoot.TreeSize%5 == 1 |
There was a problem hiding this comment.
Why do we need to test this predicate, and not the original one?
There was a problem hiding this comment.
Good question.
a) The original predicate is tested in the tracker's unit tests.
b) The purpose of this is to produce more interesting consistency proofs in the test vectors. If we updated the log root every time, the consistency proofs would always be empty.
There was a problem hiding this comment.
Could you add a comment explaining this?
|
|
||
| cli, logTracker := NewClientWithTracker(t, env) | ||
| logTracker.SetUpdatePredicate(func(_, newRoot types.LogRootV1) bool { | ||
| return newRoot.TreeSize%5 == 1 |
There was a problem hiding this comment.
Could you add a comment explaining this?
* master: Extract log tracking into separate package (google#1317)
* master: Cache go mod download (google#1325) Extract log tracking into separate package (google#1317)
* master: Cache go mod download (google#1325) Extract log tracking into separate package (google#1317)
This PR isolates root tracking inside a new
trackerpackage.By putting all root tracking behind an interface, we can implement alternate, multi-threaded root trackers. #1311