@nite-framework/nite-zk-profiler 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -7
- package/dist/report.js +5 -2
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -45,7 +45,8 @@ $ nite-zk profile Sample.compact
|
|
|
45
45
|
insert32 2299 13 8192 256x ~2.6s
|
|
46
46
|
|
|
47
47
|
4 circuits, toolchain 0.31.1, midnight-zkir 2.1.0, 0.9s
|
|
48
|
-
est. prove
|
|
48
|
+
est. prove models prover work as 2^k, on an uncalibrated default. Run `nite-zk calibrate` to anchor it to your prover.
|
|
49
|
+
It excludes network time, and assumes the proving key for that k is already on the prover.
|
|
49
50
|
```
|
|
50
51
|
|
|
51
52
|
`k` is the number that matters. `cost` is `2^k` expressed relative to the cheapest circuit in the contract, so you can see at a glance which circuits dominate your proving budget.
|
|
@@ -452,12 +453,15 @@ $ nite-zk calibrate --observed 9000 --at-k 16
|
|
|
452
453
|
Calibrated: 0.1373 ms per domain row, from 9000ms at k=16.
|
|
453
454
|
```
|
|
454
455
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
a
|
|
456
|
+
The figure models **prover work only**. It excludes network round trip and
|
|
457
|
+
server queueing, and it assumes the proving key for that `k` is already on the
|
|
458
|
+
prover rather than being fetched. Wall clock time against a remote proof server
|
|
459
|
+
is frequently dominated by exactly those two things, which no model of `k` can
|
|
460
|
+
see. The same gate degree effect that makes key size unpredictable, described
|
|
461
|
+
below, puts a factor of about two around any figure derived from `k` alone.
|
|
462
|
+
|
|
463
|
+
So it answers "how much work is this circuit" rather than "how long will my user
|
|
464
|
+
wait". The first is what you control while writing Compact.
|
|
461
465
|
|
|
462
466
|
`save` records which contracts the budget describes, so `check` needs no
|
|
463
467
|
arguments afterwards. That is what makes it a one line CI step. It also records
|
package/dist/report.js
CHANGED
|
@@ -88,8 +88,11 @@ export function formatProfile(contracts, opts) {
|
|
|
88
88
|
}
|
|
89
89
|
if (opts.showEstimate) {
|
|
90
90
|
lines.push(gray(opts.calibration
|
|
91
|
-
? ` est. prove
|
|
92
|
-
|
|
91
|
+
? ` est. prove models prover work as 2^k, calibrated from an observed ` +
|
|
92
|
+
`${formatDuration(opts.calibration.observedMs)} proof at k=${opts.calibration.observedK}.`
|
|
93
|
+
: " est. prove models prover work as 2^k, on an uncalibrated default. " +
|
|
94
|
+
"Run `nite-zk calibrate` to anchor it to your prover."));
|
|
95
|
+
lines.push(gray(" It excludes network time, and assumes the proving key for that k is already on the prover."));
|
|
93
96
|
}
|
|
94
97
|
lines.push("");
|
|
95
98
|
return lines.join("\n");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nite-framework/nite-zk-profiler",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "See what a Compact circuit costs to prove, without generating proving keys",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"zero-knowledge",
|
|
24
24
|
"profiler",
|
|
25
25
|
"proving-cost",
|
|
26
|
-
"nite-zk-profiler"
|
|
26
|
+
"nite-zk-profiler",
|
|
27
|
+
"@nite-framework/nite-zk-profiler"
|
|
27
28
|
],
|
|
28
29
|
"license": "MIT",
|
|
29
30
|
"repository": {
|