You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon inspection, I was surpsised that ~70% of the cases had SomeNotEarly_SomeEarly Zero Zero, which implies the test never involved downloading a header!
My initial guess is that the client and server chain are diverging before they ever reach startTick.
I suspect we want to tune the generator to visit that less often. But that can be a separate Issue.
… startTick (#1201)
This PR changes the generator for `ChainSyncClientSetup` such that
`startTick` is now heavily weighted to pick a lower value (closer to 1)
rather than a linear range between 1 and `maxStartTick`. This causes
fewer randomly-generated `ChainSyncClientSetup`s to produce test runs in
which no headers are sent due to immediate divergence.
Before:
```
ouroboros-consensus
ChainSyncClient
chainSync: OK (5.69s)
+++ OK, passed 10000 tests:
67.35% ForkTooDeep
27.89% NoMoreIntersection
0.25% RolledBackPastIntersection
TickArrivalTimeStats (10000 in total):
67.40% OnlyNotEarly_SomeEarly Zero Zero
10.76% OnlyNotEarly_SomeEarly Zero Many
6.72% OnlyNotEarly_SomeEarly One Many
5.95% OnlyNotEarly_SomeEarly One One
3.75% OnlyNotEarly_SomeEarly Many Zero
2.89% OnlyNotEarly_SomeEarly One Zero
1.38% OnlyNotEarly_SomeEarly Many Many
1.07% OnlyNotEarly_SomeEarly Many One
0.08% OnlyNotEarly_SomeEarly Zero One
```
After:
```
ouroboros-consensus
ChainSyncClient
chainSync: OK (8.51s)
+++ OK, passed 10000 tests:
84.58% NoMoreIntersection
10.51% ForkTooDeep
0.62% RolledBackPastIntersection
TickArrivalTimeStats (10000 in total):
19.50% OnlyNotEarly_SomeEarly One Many
16.81% OnlyNotEarly_SomeEarly One Zero
15.85% OnlyNotEarly_SomeEarly Zero Many
13.83% OnlyNotEarly_SomeEarly One One
13.25% OnlyNotEarly_SomeEarly Many Zero
10.58% OnlyNotEarly_SomeEarly Zero Zero
5.39% OnlyNotEarly_SomeEarly Many Many
4.79% OnlyNotEarly_SomeEarly Many One
```
Note that the `NoMoreIntersection` case is now significantly more common
than the `ForkTooDeep` case, rather than the inverse.
Closes#529
Originally posted by @nfrisby in #525 (comment)
The text was updated successfully, but these errors were encountered: