@aztec/bb-prover 0.40.0 → 0.41.0
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/dest/bb/execute.d.ts +7 -1
- package/dest/bb/execute.d.ts.map +1 -1
- package/dest/bb/execute.js +35 -26
- package/dest/prover/bb_native_proof_creator.d.ts +3 -2
- package/dest/prover/bb_native_proof_creator.d.ts.map +1 -1
- package/dest/prover/bb_native_proof_creator.js +53 -35
- package/dest/prover/bb_prover.d.ts +14 -3
- package/dest/prover/bb_prover.d.ts.map +1 -1
- package/dest/prover/bb_prover.js +67 -40
- package/dest/stats.d.ts +2 -5
- package/dest/stats.d.ts.map +1 -1
- package/dest/stats.js +20 -25
- package/package.json +6 -6
- package/src/bb/execute.ts +41 -26
- package/src/prover/bb_native_proof_creator.ts +104 -42
- package/src/prover/bb_prover.ts +122 -82
- package/src/stats.ts +23 -44
package/src/stats.ts
CHANGED
|
@@ -1,45 +1,6 @@
|
|
|
1
1
|
import { type PublicKernelRequest, PublicKernelType } from '@aztec/circuit-types';
|
|
2
|
-
import type { CircuitName
|
|
3
|
-
import { type
|
|
4
|
-
import { type ServerProtocolArtifact } from '@aztec/noir-protocol-circuits-types';
|
|
5
|
-
|
|
6
|
-
export function emitCircuitWitnessGenerationStats(
|
|
7
|
-
circuitName: CircuitName,
|
|
8
|
-
duration: number,
|
|
9
|
-
inputSize: number,
|
|
10
|
-
outputSize: number,
|
|
11
|
-
logger: Logger,
|
|
12
|
-
) {
|
|
13
|
-
const stats: CircuitWitnessGenerationStats = {
|
|
14
|
-
eventName: 'circuit-witness-generation',
|
|
15
|
-
circuitName,
|
|
16
|
-
inputSize,
|
|
17
|
-
outputSize,
|
|
18
|
-
duration,
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
logger.debug('Circuit witness generation stats', stats);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export function emitCircuitProvingStats(
|
|
25
|
-
circuitName: CircuitName,
|
|
26
|
-
duration: number,
|
|
27
|
-
inputSize: number,
|
|
28
|
-
outputSize: number,
|
|
29
|
-
proofSize: number,
|
|
30
|
-
logger: Logger,
|
|
31
|
-
) {
|
|
32
|
-
const stats: CircuitProvingStats = {
|
|
33
|
-
eventName: 'circuit-proving',
|
|
34
|
-
circuitName,
|
|
35
|
-
duration,
|
|
36
|
-
inputSize,
|
|
37
|
-
outputSize,
|
|
38
|
-
proofSize,
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
logger.debug('Circuit proving stats', stats);
|
|
42
|
-
}
|
|
2
|
+
import type { CircuitName } from '@aztec/circuit-types/stats';
|
|
3
|
+
import { type ClientProtocolArtifact, type ServerProtocolArtifact } from '@aztec/noir-protocol-circuits-types';
|
|
43
4
|
|
|
44
5
|
export function mapPublicKernelToCircuitName(kernelType: PublicKernelRequest['type']): CircuitName {
|
|
45
6
|
switch (kernelType) {
|
|
@@ -56,8 +17,10 @@ export function mapPublicKernelToCircuitName(kernelType: PublicKernelRequest['ty
|
|
|
56
17
|
}
|
|
57
18
|
}
|
|
58
19
|
|
|
59
|
-
export function
|
|
60
|
-
|
|
20
|
+
export function mapProtocolArtifactNameToCircuitName(
|
|
21
|
+
artifact: ServerProtocolArtifact | ClientProtocolArtifact,
|
|
22
|
+
): CircuitName {
|
|
23
|
+
switch (artifact) {
|
|
61
24
|
case 'BaseParityArtifact':
|
|
62
25
|
return 'base-parity';
|
|
63
26
|
case 'RootParityArtifact':
|
|
@@ -76,7 +39,23 @@ export function circuitTypeToCircuitName(circuitType: ServerProtocolArtifact): C
|
|
|
76
39
|
return 'public-kernel-teardown';
|
|
77
40
|
case 'PublicKernelTailArtifact':
|
|
78
41
|
return 'public-kernel-tail';
|
|
42
|
+
case 'PrivateKernelInitArtifact':
|
|
43
|
+
return 'private-kernel-init';
|
|
44
|
+
case 'PrivateKernelInnerArtifact':
|
|
45
|
+
return 'private-kernel-inner';
|
|
46
|
+
case 'PrivateKernelTailArtifact':
|
|
47
|
+
return 'private-kernel-tail';
|
|
48
|
+
case 'PrivateKernelTailToPublicArtifact':
|
|
49
|
+
return 'private-kernel-tail-to-public';
|
|
50
|
+
case 'PrivateKernelResetFullArtifact':
|
|
51
|
+
return 'private-kernel-reset-full';
|
|
52
|
+
case 'PrivateKernelResetBigArtifact':
|
|
53
|
+
return 'private-kernel-reset-big';
|
|
54
|
+
case 'PrivateKernelResetMediumArtifact':
|
|
55
|
+
return 'private-kernel-reset-medium';
|
|
56
|
+
case 'PrivateKernelResetSmallArtifact':
|
|
57
|
+
return 'private-kernel-reset-small';
|
|
79
58
|
default:
|
|
80
|
-
throw new Error(`Unknown circuit type: ${
|
|
59
|
+
throw new Error(`Unknown circuit type: ${artifact}`);
|
|
81
60
|
}
|
|
82
61
|
}
|