Commit 22685bd
fix(zkboost): fill mock_proving_time defaults from slot duration (#1401)
## Summary
- A partial override like `mock_proving_time: { kind: constant }`
silently became 0ms because dict.get on the missing `ms` key returned 0,
while omitting `mock_proving_time` entirely fell back to the launcher's
hardcoded 6000ms — surprising and inconsistent.
- Fill in kind-appropriate defaults during input validation so partial
overrides behave like the no-override case. Defaults now scale with
`slot_duration_ms` (2/3 of slot): `constant.ms`,
`random.min_ms`/`max_ms` (default_ms/2 .. default_ms*2), and
`linear.ms_per_mgas`.
- Updated the launcher's defensive fallback and the auto-injected
default zkvm to use the same 2/3-of-slot scaling.
## Test plan
- [ ] `kurtosis lint --format .` passes
- [ ] `zkvms: [{ kind: mock, proof_type: reth-zisk }]` → mock proving
time defaults to 4000ms on 6s slots (2/3 of 6000)
- [ ] `zkvms: [{ kind: mock, proof_type: reth-zisk, mock_proving_time: {
kind: constant } }]` → resolves to 4000ms (no longer 0ms)
- [ ] `zkvms: [{ kind: mock, proof_type: reth-zisk, mock_proving_time: {
kind: random } }]` → resolves to 2000–8000ms on 6s slots
- [ ] On a 12s slot, defaults scale to 8000ms / 4000–16000ms
---------
Co-authored-by: Chetany Bhardwaj <chetanyiot@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent b6bb63b commit 22685bd
3 files changed
Lines changed: 73 additions & 46 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1226 | 1226 | | |
1227 | 1227 | | |
1228 | 1228 | | |
1229 | | - | |
1230 | | - | |
| 1229 | + | |
| 1230 | + | |
1231 | 1231 | | |
1232 | 1232 | | |
1233 | 1233 | | |
| |||
1236 | 1236 | | |
1237 | 1237 | | |
1238 | 1238 | | |
1239 | | - | |
| 1239 | + | |
1240 | 1240 | | |
1241 | 1241 | | |
1242 | | - | |
1243 | | - | |
1244 | | - | |
1245 | | - | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
1246 | 1246 | | |
1247 | 1247 | | |
1248 | 1248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
500 | 500 | | |
501 | 501 | | |
502 | 502 | | |
| 503 | + | |
503 | 504 | | |
504 | 505 | | |
505 | 506 | | |
506 | 507 | | |
507 | 508 | | |
508 | 509 | | |
509 | | - | |
510 | | - | |
| 510 | + | |
| 511 | + | |
511 | 512 | | |
512 | 513 | | |
513 | 514 | | |
| |||
592 | 593 | | |
593 | 594 | | |
594 | 595 | | |
595 | | - | |
596 | | - | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
597 | 604 | | |
598 | 605 | | |
599 | | - | |
| 606 | + | |
600 | 607 | | |
601 | 608 | | |
602 | 609 | | |
| |||
605 | 612 | | |
606 | 613 | | |
607 | 614 | | |
| 615 | + | |
608 | 616 | | |
609 | | - | |
610 | | - | |
611 | | - | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
612 | 641 | | |
613 | | - | |
614 | | - | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
615 | 646 | | |
616 | 647 | | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
626 | 654 | | |
627 | | - | |
628 | | - | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
629 | 658 | | |
630 | 659 | | |
631 | | - | |
| 660 | + | |
632 | 661 | | |
633 | 662 | | |
| 663 | + | |
634 | 664 | | |
635 | 665 | | |
636 | 666 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | 68 | | |
71 | 69 | | |
72 | 70 | | |
| |||
122 | 120 | | |
123 | 121 | | |
124 | 122 | | |
125 | | - | |
126 | | - | |
127 | | - | |
| 123 | + | |
128 | 124 | | |
129 | 125 | | |
130 | 126 | | |
| |||
137 | 133 | | |
138 | 134 | | |
139 | 135 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
152 | 149 | | |
153 | 150 | | |
154 | 151 | | |
| |||
0 commit comments