@aztec/bb-prover 0.0.0-test.0 → 0.0.1-commit.0208eb9
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/avm_proving_tests/avm_proving_tester.d.ts +14 -18
- package/dest/avm_proving_tests/avm_proving_tester.d.ts.map +1 -1
- package/dest/avm_proving_tests/avm_proving_tester.js +146 -79
- package/dest/bb/cli.d.ts +1 -1
- package/dest/bb/execute.d.ts +17 -50
- package/dest/bb/execute.d.ts.map +1 -1
- package/dest/bb/execute.js +145 -278
- package/dest/bb/index.d.ts +1 -1
- package/dest/config.d.ts +3 -1
- package/dest/config.d.ts.map +1 -1
- package/dest/honk.d.ts +3 -3
- package/dest/honk.d.ts.map +1 -1
- package/dest/honk.js +3 -2
- package/dest/index.d.ts +2 -1
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -0
- package/dest/instrumentation.d.ts +3 -3
- package/dest/instrumentation.d.ts.map +1 -1
- package/dest/instrumentation.js +11 -43
- package/dest/prover/client/bb_private_kernel_prover.d.ts +38 -0
- package/dest/prover/client/bb_private_kernel_prover.d.ts.map +1 -0
- package/dest/prover/{bb_private_kernel_prover.js → client/bb_private_kernel_prover.js} +53 -21
- package/dest/prover/client/bundle.d.ts +6 -0
- package/dest/prover/client/bundle.d.ts.map +1 -0
- package/dest/prover/client/bundle.js +7 -0
- package/dest/prover/client/lazy.d.ts +6 -0
- package/dest/prover/client/lazy.d.ts.map +1 -0
- package/dest/prover/client/lazy.js +7 -0
- package/dest/prover/index.d.ts +3 -4
- package/dest/prover/index.d.ts.map +1 -1
- package/dest/prover/index.js +2 -3
- package/dest/prover/proof_utils.d.ts +19 -0
- package/dest/prover/proof_utils.d.ts.map +1 -0
- package/dest/prover/proof_utils.js +72 -0
- package/dest/prover/server/bb_prover.d.ts +97 -0
- package/dest/prover/server/bb_prover.d.ts.map +1 -0
- package/dest/prover/server/bb_prover.js +712 -0
- package/dest/test/delay_values.d.ts +1 -1
- package/dest/test/delay_values.d.ts.map +1 -1
- package/dest/test/delay_values.js +37 -23
- package/dest/test/index.d.ts +2 -1
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/index.js +1 -0
- package/dest/test/test_circuit_prover.d.ts +27 -36
- package/dest/test/test_circuit_prover.d.ts.map +1 -1
- package/dest/test/test_circuit_prover.js +517 -88
- package/dest/test/test_verifier.d.ts +6 -3
- package/dest/test/test_verifier.d.ts.map +1 -1
- package/dest/test/test_verifier.js +23 -1
- package/dest/verification_key/verification_key_data.d.ts +1 -2
- package/dest/verification_key/verification_key_data.d.ts.map +1 -1
- package/dest/verification_key/verification_key_data.js +9 -34
- package/dest/verifier/bb_verifier.d.ts +6 -5
- package/dest/verifier/bb_verifier.d.ts.map +1 -1
- package/dest/verifier/bb_verifier.js +45 -27
- package/dest/verifier/index.d.ts +2 -1
- package/dest/verifier/index.d.ts.map +1 -1
- package/dest/verifier/index.js +1 -0
- package/dest/verifier/queued_chonk_verifier.d.ts +15 -0
- package/dest/verifier/queued_chonk_verifier.d.ts.map +1 -0
- package/dest/verifier/queued_chonk_verifier.js +101 -0
- package/package.json +35 -33
- package/src/avm_proving_tests/avm_proving_tester.ts +223 -113
- package/src/bb/execute.ts +116 -291
- package/src/config.ts +2 -0
- package/src/honk.ts +3 -2
- package/src/index.ts +1 -0
- package/src/instrumentation.ts +10 -43
- package/src/prover/{bb_private_kernel_prover.ts → client/bb_private_kernel_prover.ts} +94 -33
- package/src/prover/client/bundle.ts +10 -0
- package/src/prover/client/lazy.ts +10 -0
- package/src/prover/index.ts +2 -3
- package/src/prover/proof_utils.ts +115 -0
- package/src/prover/server/bb_prover.ts +718 -0
- package/src/test/delay_values.ts +38 -22
- package/src/test/index.ts +1 -0
- package/src/test/test_circuit_prover.ts +264 -154
- package/src/test/test_verifier.ts +15 -3
- package/src/verification_key/verification_key_data.ts +11 -31
- package/src/verifier/bb_verifier.ts +62 -35
- package/src/verifier/index.ts +1 -0
- package/src/verifier/queued_chonk_verifier.ts +109 -0
- package/dest/prover/bb_native_private_kernel_prover.d.ts +0 -25
- package/dest/prover/bb_native_private_kernel_prover.d.ts.map +0 -1
- package/dest/prover/bb_native_private_kernel_prover.js +0 -69
- package/dest/prover/bb_private_kernel_prover.d.ts +0 -32
- package/dest/prover/bb_private_kernel_prover.d.ts.map +0 -1
- package/dest/prover/bb_prover.d.ts +0 -120
- package/dest/prover/bb_prover.d.ts.map +0 -1
- package/dest/prover/bb_prover.js +0 -423
- package/dest/prover/client_ivc_proof_utils.d.ts +0 -25
- package/dest/prover/client_ivc_proof_utils.d.ts.map +0 -1
- package/dest/prover/client_ivc_proof_utils.js +0 -43
- package/dest/stats.d.ts +0 -5
- package/dest/stats.d.ts.map +0 -1
- package/dest/stats.js +0 -62
- package/dest/wasm/bb_wasm_private_kernel_prover.d.ts +0 -17
- package/dest/wasm/bb_wasm_private_kernel_prover.d.ts.map +0 -1
- package/dest/wasm/bb_wasm_private_kernel_prover.js +0 -46
- package/dest/wasm/bundle.d.ts +0 -6
- package/dest/wasm/bundle.d.ts.map +0 -1
- package/dest/wasm/bundle.js +0 -8
- package/dest/wasm/lazy.d.ts +0 -6
- package/dest/wasm/lazy.d.ts.map +0 -1
- package/dest/wasm/lazy.js +0 -8
- package/src/prover/bb_native_private_kernel_prover.ts +0 -119
- package/src/prover/bb_prover.ts +0 -781
- package/src/prover/client_ivc_proof_utils.ts +0 -42
- package/src/stats.ts +0 -64
- package/src/wasm/bb_wasm_private_kernel_prover.ts +0 -55
- package/src/wasm/bundle.ts +0 -11
- package/src/wasm/lazy.ts +0 -11
package/src/test/delay_values.ts
CHANGED
|
@@ -1,31 +1,47 @@
|
|
|
1
1
|
import { ProvingRequestType } from '@aztec/stdlib/proofs';
|
|
2
2
|
|
|
3
3
|
export const WITGEN_DELAY_MS: Record<ProvingRequestType, number> = {
|
|
4
|
-
[ProvingRequestType.
|
|
5
|
-
[ProvingRequestType.
|
|
6
|
-
[ProvingRequestType.
|
|
7
|
-
[ProvingRequestType.
|
|
8
|
-
[ProvingRequestType.
|
|
9
|
-
[ProvingRequestType.
|
|
10
|
-
[ProvingRequestType.
|
|
11
|
-
[ProvingRequestType.
|
|
12
|
-
[ProvingRequestType.
|
|
13
|
-
[ProvingRequestType.
|
|
14
|
-
[ProvingRequestType.
|
|
4
|
+
[ProvingRequestType.PUBLIC_CHONK_VERIFIER]: 60,
|
|
5
|
+
[ProvingRequestType.PARITY_BASE]: 1_600,
|
|
6
|
+
[ProvingRequestType.PARITY_ROOT]: 40,
|
|
7
|
+
[ProvingRequestType.BLOCK_ROOT_FIRST_ROLLUP]: 45,
|
|
8
|
+
[ProvingRequestType.BLOCK_ROOT_EMPTY_TX_FIRST_ROLLUP]: 18,
|
|
9
|
+
[ProvingRequestType.BLOCK_ROOT_SINGLE_TX_FIRST_ROLLUP]: 27,
|
|
10
|
+
[ProvingRequestType.CHECKPOINT_MERGE_ROLLUP]: 30,
|
|
11
|
+
[ProvingRequestType.CHECKPOINT_ROOT_SINGLE_BLOCK_ROLLUP]: 36_000,
|
|
12
|
+
[ProvingRequestType.ROOT_ROLLUP]: 35,
|
|
13
|
+
[ProvingRequestType.PUBLIC_TX_BASE_ROLLUP]: 2_500,
|
|
14
|
+
[ProvingRequestType.TX_MERGE_ROLLUP]: 25,
|
|
15
15
|
[ProvingRequestType.PUBLIC_VM]: 0,
|
|
16
|
+
|
|
17
|
+
// TBD
|
|
18
|
+
[ProvingRequestType.BLOCK_MERGE_ROLLUP]: 30,
|
|
19
|
+
[ProvingRequestType.BLOCK_ROOT_ROLLUP]: 40_000,
|
|
20
|
+
[ProvingRequestType.BLOCK_ROOT_SINGLE_TX_ROLLUP]: 20_000,
|
|
21
|
+
[ProvingRequestType.CHECKPOINT_ROOT_ROLLUP]: 40_000,
|
|
22
|
+
[ProvingRequestType.CHECKPOINT_PADDING_ROLLUP]: 0,
|
|
23
|
+
[ProvingRequestType.PRIVATE_TX_BASE_ROLLUP]: 2_500, // Guess based on public
|
|
16
24
|
};
|
|
17
25
|
|
|
18
26
|
export const PROOF_DELAY_MS: Record<ProvingRequestType, number> = {
|
|
19
|
-
[ProvingRequestType.
|
|
27
|
+
[ProvingRequestType.PUBLIC_CHONK_VERIFIER]: 16_300,
|
|
28
|
+
[ProvingRequestType.PARITY_BASE]: 15_300,
|
|
29
|
+
[ProvingRequestType.PARITY_ROOT]: 18_600,
|
|
30
|
+
[ProvingRequestType.BLOCK_ROOT_FIRST_ROLLUP]: 17_400,
|
|
31
|
+
[ProvingRequestType.BLOCK_ROOT_EMPTY_TX_FIRST_ROLLUP]: 4_500,
|
|
32
|
+
[ProvingRequestType.BLOCK_ROOT_SINGLE_TX_FIRST_ROLLUP]: 9_200,
|
|
33
|
+
[ProvingRequestType.CHECKPOINT_MERGE_ROLLUP]: 10_200,
|
|
34
|
+
[ProvingRequestType.CHECKPOINT_ROOT_SINGLE_BLOCK_ROLLUP]: 37_100,
|
|
35
|
+
[ProvingRequestType.ROOT_ROLLUP]: 93_000,
|
|
36
|
+
[ProvingRequestType.TX_MERGE_ROLLUP]: 10_000,
|
|
37
|
+
[ProvingRequestType.PUBLIC_TX_BASE_ROLLUP]: 44_500,
|
|
38
|
+
[ProvingRequestType.PUBLIC_VM]: 180_000,
|
|
39
|
+
|
|
40
|
+
// TBD
|
|
20
41
|
[ProvingRequestType.BLOCK_MERGE_ROLLUP]: 15_000,
|
|
21
|
-
[ProvingRequestType.BLOCK_ROOT_ROLLUP]:
|
|
22
|
-
[ProvingRequestType.
|
|
23
|
-
[ProvingRequestType.
|
|
24
|
-
[ProvingRequestType.
|
|
25
|
-
[ProvingRequestType.
|
|
26
|
-
[ProvingRequestType.PUBLIC_BASE_ROLLUP]: 160_000,
|
|
27
|
-
[ProvingRequestType.ROOT_PARITY]: 30_000,
|
|
28
|
-
[ProvingRequestType.ROOT_ROLLUP]: 15_000,
|
|
29
|
-
[ProvingRequestType.TUBE_PROOF]: 30_000,
|
|
30
|
-
[ProvingRequestType.PUBLIC_VM]: 0,
|
|
42
|
+
[ProvingRequestType.BLOCK_ROOT_ROLLUP]: 35_000,
|
|
43
|
+
[ProvingRequestType.BLOCK_ROOT_SINGLE_TX_ROLLUP]: 15_000,
|
|
44
|
+
[ProvingRequestType.CHECKPOINT_ROOT_ROLLUP]: 35_000,
|
|
45
|
+
[ProvingRequestType.CHECKPOINT_PADDING_ROLLUP]: 0,
|
|
46
|
+
[ProvingRequestType.PRIVATE_TX_BASE_ROLLUP]: 22_000,
|
|
31
47
|
};
|
package/src/test/index.ts
CHANGED
|
@@ -1,71 +1,92 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
AVM_VERIFICATION_KEY_LENGTH_IN_FIELDS,
|
|
2
|
+
AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED,
|
|
4
3
|
NESTED_RECURSIVE_PROOF_LENGTH,
|
|
5
4
|
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
6
5
|
RECURSIVE_PROOF_LENGTH,
|
|
7
|
-
TUBE_PROOF_LENGTH,
|
|
8
6
|
} from '@aztec/constants';
|
|
9
7
|
import { createLogger } from '@aztec/foundation/log';
|
|
10
8
|
import { sleep } from '@aztec/foundation/sleep';
|
|
11
9
|
import { Timer } from '@aztec/foundation/timer';
|
|
12
10
|
import {
|
|
13
11
|
type ServerProtocolArtifact,
|
|
14
|
-
SimulatedServerCircuitArtifacts,
|
|
15
|
-
convertBaseParityInputsToWitnessMap,
|
|
16
|
-
convertBaseParityOutputsFromWitnessMap,
|
|
17
|
-
convertBlockMergeRollupInputsToWitnessMap,
|
|
18
12
|
convertBlockMergeRollupOutputsFromWitnessMap,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
convertBlockMergeRollupPrivateInputsToWitnessMap,
|
|
14
|
+
convertBlockRootEmptyTxFirstRollupOutputsFromWitnessMap,
|
|
15
|
+
convertBlockRootEmptyTxFirstRollupPrivateInputsToWitnessMap,
|
|
16
|
+
convertBlockRootFirstRollupOutputsFromWitnessMap,
|
|
17
|
+
convertBlockRootFirstRollupPrivateInputsToWitnessMap,
|
|
18
|
+
convertBlockRootRollupOutputsFromWitnessMap,
|
|
19
|
+
convertBlockRootRollupPrivateInputsToWitnessMap,
|
|
20
|
+
convertBlockRootSingleTxFirstRollupOutputsFromWitnessMap,
|
|
21
|
+
convertBlockRootSingleTxFirstRollupPrivateInputsToWitnessMap,
|
|
22
|
+
convertBlockRootSingleTxRollupOutputsFromWitnessMap,
|
|
23
|
+
convertBlockRootSingleTxRollupPrivateInputsToWitnessMap,
|
|
24
|
+
convertCheckpointMergeRollupOutputsFromWitnessMap,
|
|
25
|
+
convertCheckpointMergeRollupPrivateInputsToWitnessMap,
|
|
26
|
+
convertCheckpointPaddingRollupOutputsFromWitnessMap,
|
|
27
|
+
convertCheckpointPaddingRollupPrivateInputsToWitnessMap,
|
|
28
|
+
convertCheckpointRootRollupOutputsFromWitnessMap,
|
|
29
|
+
convertCheckpointRootRollupPrivateInputsToWitnessMap,
|
|
30
|
+
convertCheckpointRootSingleBlockRollupOutputsFromWitnessMap,
|
|
31
|
+
convertCheckpointRootSingleBlockRollupPrivateInputsToWitnessMap,
|
|
32
|
+
convertParityBaseOutputsFromWitnessMap,
|
|
33
|
+
convertParityBasePrivateInputsToWitnessMap,
|
|
34
|
+
convertParityRootOutputsFromWitnessMap,
|
|
35
|
+
convertParityRootPrivateInputsToWitnessMap,
|
|
36
|
+
convertPrivateTxBaseRollupOutputsFromWitnessMap,
|
|
37
|
+
convertPrivateTxBaseRollupPrivateInputsToWitnessMap,
|
|
38
|
+
convertPublicTxBaseRollupOutputsFromWitnessMap,
|
|
39
|
+
convertPublicTxBaseRollupPrivateInputsToWitnessMap,
|
|
26
40
|
convertRootRollupOutputsFromWitnessMap,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
convertSimulatedPublicBaseRollupOutputsFromWitnessMap,
|
|
33
|
-
convertSimulatedSingleTxBlockRootRollupInputsToWitnessMap,
|
|
34
|
-
convertSimulatedSingleTxBlockRootRollupOutputsFromWitnessMap,
|
|
41
|
+
convertRootRollupPrivateInputsToWitnessMap,
|
|
42
|
+
convertTxMergeRollupOutputsFromWitnessMap,
|
|
43
|
+
convertTxMergeRollupPrivateInputsToWitnessMap,
|
|
44
|
+
foreignCallHandler,
|
|
45
|
+
getSimulatedServerCircuitArtifact,
|
|
35
46
|
} from '@aztec/noir-protocol-circuits-types/server';
|
|
36
47
|
import { ProtocolCircuitVks } from '@aztec/noir-protocol-circuits-types/server/vks';
|
|
37
|
-
import {
|
|
48
|
+
import { mapProtocolArtifactNameToCircuitName } from '@aztec/noir-protocol-circuits-types/types';
|
|
49
|
+
import type { WitnessMap } from '@aztec/noir-types';
|
|
50
|
+
import { type CircuitSimulator, WASMSimulatorWithBlobs, emitCircuitSimulationStats } from '@aztec/simulator/server';
|
|
38
51
|
import type { AvmCircuitInputs } from '@aztec/stdlib/avm';
|
|
39
52
|
import {
|
|
40
|
-
type ProofAndVerificationKey,
|
|
41
53
|
type PublicInputsAndRecursiveProof,
|
|
42
54
|
type ServerCircuitProver,
|
|
43
|
-
makeProofAndVerificationKey,
|
|
44
55
|
makePublicInputsAndRecursiveProof,
|
|
45
56
|
} from '@aztec/stdlib/interfaces/server';
|
|
46
|
-
import type {
|
|
47
|
-
import {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
import type { ParityBasePrivateInputs, ParityPublicInputs, ParityRootPrivateInputs } from '@aztec/stdlib/parity';
|
|
58
|
+
import {
|
|
59
|
+
type Proof,
|
|
60
|
+
ProvingRequestType,
|
|
61
|
+
RecursiveProof,
|
|
62
|
+
makeEmptyRecursiveProof,
|
|
63
|
+
makeRecursiveProof,
|
|
64
|
+
} from '@aztec/stdlib/proofs';
|
|
65
|
+
import {
|
|
66
|
+
type BlockMergeRollupPrivateInputs,
|
|
67
|
+
type BlockRollupPublicInputs,
|
|
68
|
+
type BlockRootEmptyTxFirstRollupPrivateInputs,
|
|
69
|
+
type BlockRootFirstRollupPrivateInputs,
|
|
70
|
+
type BlockRootRollupPrivateInputs,
|
|
71
|
+
type BlockRootSingleTxFirstRollupPrivateInputs,
|
|
72
|
+
type BlockRootSingleTxRollupPrivateInputs,
|
|
73
|
+
type CheckpointMergeRollupPrivateInputs,
|
|
74
|
+
type CheckpointPaddingRollupPrivateInputs,
|
|
75
|
+
type CheckpointRollupPublicInputs,
|
|
76
|
+
type CheckpointRootRollupPrivateInputs,
|
|
77
|
+
type CheckpointRootSingleBlockRollupPrivateInputs,
|
|
78
|
+
type PrivateTxBaseRollupPrivateInputs,
|
|
79
|
+
type PublicChonkVerifierPrivateInputs,
|
|
80
|
+
PublicChonkVerifierPublicInputs,
|
|
81
|
+
type PublicTxBaseRollupPrivateInputs,
|
|
82
|
+
type RootRollupPrivateInputs,
|
|
83
|
+
type RootRollupPublicInputs,
|
|
84
|
+
type TxMergeRollupPrivateInputs,
|
|
85
|
+
type TxRollupPublicInputs,
|
|
61
86
|
} from '@aztec/stdlib/rollup';
|
|
62
|
-
import { VerificationKeyData } from '@aztec/stdlib/vks';
|
|
63
87
|
import { type TelemetryClient, getTelemetryClient, trackSpan } from '@aztec/telemetry-client';
|
|
64
88
|
|
|
65
|
-
import type { WitnessMap } from '@noir-lang/types';
|
|
66
|
-
|
|
67
89
|
import { ProverInstrumentation } from '../instrumentation.js';
|
|
68
|
-
import { mapProtocolArtifactNameToCircuitName } from '../stats.js';
|
|
69
90
|
import { PROOF_DELAY_MS, WITGEN_DELAY_MS } from './delay_values.js';
|
|
70
91
|
|
|
71
92
|
type TestDelay =
|
|
@@ -88,7 +109,7 @@ export class TestCircuitProver implements ServerCircuitProver {
|
|
|
88
109
|
private logger = createLogger('bb-prover:test-prover');
|
|
89
110
|
|
|
90
111
|
constructor(
|
|
91
|
-
private
|
|
112
|
+
private simulator?: CircuitSimulator,
|
|
92
113
|
private opts: TestDelay = { proverTestDelayType: 'fixed', proverTestDelayMs: 0 },
|
|
93
114
|
telemetry: TelemetryClient = getTelemetryClient(),
|
|
94
115
|
) {
|
|
@@ -106,15 +127,15 @@ export class TestCircuitProver implements ServerCircuitProver {
|
|
|
106
127
|
*/
|
|
107
128
|
@trackSpan('TestCircuitProver.getBaseParityProof')
|
|
108
129
|
public getBaseParityProof(
|
|
109
|
-
inputs:
|
|
130
|
+
inputs: ParityBasePrivateInputs,
|
|
110
131
|
): Promise<PublicInputsAndRecursiveProof<ParityPublicInputs, typeof RECURSIVE_PROOF_LENGTH>> {
|
|
111
|
-
return this.applyDelay(ProvingRequestType.
|
|
132
|
+
return this.applyDelay(ProvingRequestType.PARITY_BASE, () =>
|
|
112
133
|
this.simulate(
|
|
113
134
|
inputs,
|
|
114
|
-
'
|
|
135
|
+
'ParityBaseArtifact',
|
|
115
136
|
RECURSIVE_PROOF_LENGTH,
|
|
116
|
-
|
|
117
|
-
|
|
137
|
+
convertParityBasePrivateInputsToWitnessMap,
|
|
138
|
+
convertParityBaseOutputsFromWitnessMap,
|
|
118
139
|
),
|
|
119
140
|
);
|
|
120
141
|
}
|
|
@@ -126,55 +147,59 @@ export class TestCircuitProver implements ServerCircuitProver {
|
|
|
126
147
|
*/
|
|
127
148
|
@trackSpan('TestCircuitProver.getRootParityProof')
|
|
128
149
|
public getRootParityProof(
|
|
129
|
-
inputs:
|
|
150
|
+
inputs: ParityRootPrivateInputs,
|
|
130
151
|
): Promise<PublicInputsAndRecursiveProof<ParityPublicInputs, typeof NESTED_RECURSIVE_PROOF_LENGTH>> {
|
|
131
|
-
return this.applyDelay(ProvingRequestType.
|
|
152
|
+
return this.applyDelay(ProvingRequestType.PARITY_ROOT, () =>
|
|
132
153
|
this.simulate(
|
|
133
154
|
inputs,
|
|
134
|
-
'
|
|
155
|
+
'ParityRootArtifact',
|
|
135
156
|
NESTED_RECURSIVE_PROOF_LENGTH,
|
|
136
|
-
|
|
137
|
-
|
|
157
|
+
convertParityRootPrivateInputsToWitnessMap,
|
|
158
|
+
convertParityRootOutputsFromWitnessMap,
|
|
138
159
|
),
|
|
139
160
|
);
|
|
140
161
|
}
|
|
141
162
|
|
|
142
|
-
public
|
|
143
|
-
|
|
144
|
-
|
|
163
|
+
public getPublicChonkVerifierProof(
|
|
164
|
+
inputs: PublicChonkVerifierPrivateInputs,
|
|
165
|
+
): Promise<
|
|
166
|
+
PublicInputsAndRecursiveProof<PublicChonkVerifierPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
167
|
+
> {
|
|
168
|
+
return this.applyDelay(ProvingRequestType.PUBLIC_CHONK_VERIFIER, () =>
|
|
169
|
+
makePublicInputsAndRecursiveProof(
|
|
170
|
+
new PublicChonkVerifierPublicInputs(inputs.hidingKernelProofData.publicInputs, inputs.proverId),
|
|
171
|
+
makeEmptyRecursiveProof(NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH),
|
|
172
|
+
ProtocolCircuitVks.PublicChonkVerifier,
|
|
173
|
+
),
|
|
145
174
|
);
|
|
146
175
|
}
|
|
147
176
|
|
|
148
|
-
@trackSpan('TestCircuitProver.
|
|
149
|
-
public
|
|
150
|
-
inputs:
|
|
151
|
-
): Promise<
|
|
152
|
-
|
|
153
|
-
> {
|
|
154
|
-
return this.applyDelay(ProvingRequestType.PRIVATE_BASE_ROLLUP, () =>
|
|
177
|
+
@trackSpan('TestCircuitProver.getPrivateTxBaseRollupProof')
|
|
178
|
+
public getPrivateTxBaseRollupProof(
|
|
179
|
+
inputs: PrivateTxBaseRollupPrivateInputs,
|
|
180
|
+
): Promise<PublicInputsAndRecursiveProof<TxRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>> {
|
|
181
|
+
return this.applyDelay(ProvingRequestType.PRIVATE_TX_BASE_ROLLUP, () =>
|
|
155
182
|
this.simulate(
|
|
156
183
|
inputs,
|
|
157
|
-
'
|
|
184
|
+
'PrivateTxBaseRollupArtifact',
|
|
158
185
|
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
159
|
-
|
|
160
|
-
|
|
186
|
+
convertPrivateTxBaseRollupPrivateInputsToWitnessMap,
|
|
187
|
+
convertPrivateTxBaseRollupOutputsFromWitnessMap,
|
|
161
188
|
),
|
|
162
189
|
);
|
|
163
190
|
}
|
|
164
191
|
|
|
165
|
-
@trackSpan('TestCircuitProver.
|
|
166
|
-
public
|
|
167
|
-
inputs:
|
|
168
|
-
): Promise<
|
|
169
|
-
|
|
170
|
-
> {
|
|
171
|
-
return this.applyDelay(ProvingRequestType.PUBLIC_BASE_ROLLUP, () =>
|
|
192
|
+
@trackSpan('TestCircuitProver.getPublicTxBaseRollupProof')
|
|
193
|
+
public getPublicTxBaseRollupProof(
|
|
194
|
+
inputs: PublicTxBaseRollupPrivateInputs,
|
|
195
|
+
): Promise<PublicInputsAndRecursiveProof<TxRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>> {
|
|
196
|
+
return this.applyDelay(ProvingRequestType.PUBLIC_TX_BASE_ROLLUP, () =>
|
|
172
197
|
this.simulate(
|
|
173
198
|
inputs,
|
|
174
|
-
'
|
|
199
|
+
'PublicTxBaseRollupArtifact',
|
|
175
200
|
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
176
|
-
|
|
177
|
-
|
|
201
|
+
convertPublicTxBaseRollupPrivateInputsToWitnessMap,
|
|
202
|
+
convertPublicTxBaseRollupOutputsFromWitnessMap,
|
|
178
203
|
),
|
|
179
204
|
);
|
|
180
205
|
}
|
|
@@ -184,102 +209,175 @@ export class TestCircuitProver implements ServerCircuitProver {
|
|
|
184
209
|
* @param input - Inputs to the circuit.
|
|
185
210
|
* @returns The public inputs as outputs of the simulation.
|
|
186
211
|
*/
|
|
187
|
-
@trackSpan('TestCircuitProver.
|
|
188
|
-
public
|
|
189
|
-
input:
|
|
190
|
-
): Promise<
|
|
191
|
-
|
|
192
|
-
> {
|
|
193
|
-
return this.applyDelay(ProvingRequestType.MERGE_ROLLUP, () =>
|
|
212
|
+
@trackSpan('TestCircuitProver.getTxMergeRollupProof')
|
|
213
|
+
public getTxMergeRollupProof(
|
|
214
|
+
input: TxMergeRollupPrivateInputs,
|
|
215
|
+
): Promise<PublicInputsAndRecursiveProof<TxRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>> {
|
|
216
|
+
return this.applyDelay(ProvingRequestType.TX_MERGE_ROLLUP, () =>
|
|
194
217
|
this.simulate(
|
|
195
218
|
input,
|
|
196
|
-
'
|
|
219
|
+
'TxMergeRollupArtifact',
|
|
197
220
|
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
198
|
-
|
|
199
|
-
|
|
221
|
+
convertTxMergeRollupPrivateInputsToWitnessMap,
|
|
222
|
+
convertTxMergeRollupOutputsFromWitnessMap,
|
|
223
|
+
),
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
@trackSpan('TestCircuitProver.getBlockRootFirstRollupProof')
|
|
228
|
+
public getBlockRootFirstRollupProof(
|
|
229
|
+
input: BlockRootFirstRollupPrivateInputs,
|
|
230
|
+
): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>> {
|
|
231
|
+
return this.applyDelay(ProvingRequestType.BLOCK_ROOT_FIRST_ROLLUP, () =>
|
|
232
|
+
this.simulate(
|
|
233
|
+
input,
|
|
234
|
+
'BlockRootFirstRollupArtifact',
|
|
235
|
+
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
236
|
+
convertBlockRootFirstRollupPrivateInputsToWitnessMap,
|
|
237
|
+
convertBlockRootFirstRollupOutputsFromWitnessMap,
|
|
238
|
+
),
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
@trackSpan('TestCircuitProver.getBlockRootSingleTxFirstRollupProof')
|
|
243
|
+
public async getBlockRootSingleTxFirstRollupProof(
|
|
244
|
+
input: BlockRootSingleTxFirstRollupPrivateInputs,
|
|
245
|
+
): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>> {
|
|
246
|
+
return await this.applyDelay(ProvingRequestType.BLOCK_ROOT_SINGLE_TX_FIRST_ROLLUP, () =>
|
|
247
|
+
this.simulate(
|
|
248
|
+
input,
|
|
249
|
+
'BlockRootSingleTxFirstRollupArtifact',
|
|
250
|
+
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
251
|
+
convertBlockRootSingleTxFirstRollupPrivateInputsToWitnessMap,
|
|
252
|
+
convertBlockRootSingleTxFirstRollupOutputsFromWitnessMap,
|
|
253
|
+
),
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
@trackSpan('TestCircuitProver.getBlockRootEmptyTxFirstRollupProof')
|
|
258
|
+
public getBlockRootEmptyTxFirstRollupProof(
|
|
259
|
+
input: BlockRootEmptyTxFirstRollupPrivateInputs,
|
|
260
|
+
): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>> {
|
|
261
|
+
return this.applyDelay(ProvingRequestType.BLOCK_ROOT_EMPTY_TX_FIRST_ROLLUP, () =>
|
|
262
|
+
this.simulate(
|
|
263
|
+
input,
|
|
264
|
+
'BlockRootEmptyTxFirstRollupArtifact',
|
|
265
|
+
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
266
|
+
convertBlockRootEmptyTxFirstRollupPrivateInputsToWitnessMap,
|
|
267
|
+
convertBlockRootEmptyTxFirstRollupOutputsFromWitnessMap,
|
|
200
268
|
),
|
|
201
269
|
);
|
|
202
270
|
}
|
|
203
271
|
|
|
204
|
-
/**
|
|
205
|
-
* Simulates the block root rollup circuit from its inputs.
|
|
206
|
-
* @param input - Inputs to the circuit.
|
|
207
|
-
* @returns The public inputs as outputs of the simulation.
|
|
208
|
-
*/
|
|
209
272
|
@trackSpan('TestCircuitProver.getBlockRootRollupProof')
|
|
210
273
|
public getBlockRootRollupProof(
|
|
211
|
-
input:
|
|
212
|
-
): Promise<
|
|
213
|
-
PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
214
|
-
> {
|
|
274
|
+
input: BlockRootRollupPrivateInputs,
|
|
275
|
+
): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>> {
|
|
215
276
|
return this.applyDelay(ProvingRequestType.BLOCK_ROOT_ROLLUP, () =>
|
|
216
277
|
this.simulate(
|
|
217
278
|
input,
|
|
218
279
|
'BlockRootRollupArtifact',
|
|
219
280
|
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
220
|
-
|
|
221
|
-
|
|
281
|
+
convertBlockRootRollupPrivateInputsToWitnessMap,
|
|
282
|
+
convertBlockRootRollupOutputsFromWitnessMap,
|
|
283
|
+
),
|
|
284
|
+
);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
@trackSpan('TestCircuitProver.getBlockRootSingleTxRollupProof')
|
|
288
|
+
public async getBlockRootSingleTxRollupProof(
|
|
289
|
+
input: BlockRootSingleTxRollupPrivateInputs,
|
|
290
|
+
): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>> {
|
|
291
|
+
return await this.applyDelay(ProvingRequestType.BLOCK_ROOT_SINGLE_TX_ROLLUP, () =>
|
|
292
|
+
this.simulate(
|
|
293
|
+
input,
|
|
294
|
+
'BlockRootSingleTxRollupArtifact',
|
|
295
|
+
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
296
|
+
convertBlockRootSingleTxRollupPrivateInputsToWitnessMap,
|
|
297
|
+
convertBlockRootSingleTxRollupOutputsFromWitnessMap,
|
|
222
298
|
),
|
|
223
299
|
);
|
|
224
300
|
}
|
|
225
301
|
|
|
226
|
-
@trackSpan('TestCircuitProver.
|
|
227
|
-
public
|
|
228
|
-
input:
|
|
302
|
+
@trackSpan('TestCircuitProver.getBlockMergeRollupProof')
|
|
303
|
+
public getBlockMergeRollupProof(
|
|
304
|
+
input: BlockMergeRollupPrivateInputs,
|
|
305
|
+
): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>> {
|
|
306
|
+
return this.applyDelay(ProvingRequestType.BLOCK_MERGE_ROLLUP, () =>
|
|
307
|
+
this.simulate(
|
|
308
|
+
input,
|
|
309
|
+
'BlockMergeRollupArtifact',
|
|
310
|
+
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
311
|
+
convertBlockMergeRollupPrivateInputsToWitnessMap,
|
|
312
|
+
convertBlockMergeRollupOutputsFromWitnessMap,
|
|
313
|
+
),
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
@trackSpan('TestCircuitProver.getCheckpointRootRollupProof')
|
|
318
|
+
public getCheckpointRootRollupProof(
|
|
319
|
+
input: CheckpointRootRollupPrivateInputs,
|
|
229
320
|
): Promise<
|
|
230
|
-
PublicInputsAndRecursiveProof<
|
|
321
|
+
PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
231
322
|
> {
|
|
232
|
-
return
|
|
323
|
+
return this.applyDelay(ProvingRequestType.CHECKPOINT_ROOT_ROLLUP, () =>
|
|
233
324
|
this.simulate(
|
|
234
325
|
input,
|
|
235
|
-
'
|
|
326
|
+
'CheckpointRootRollupArtifact',
|
|
236
327
|
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
237
|
-
|
|
238
|
-
|
|
328
|
+
convertCheckpointRootRollupPrivateInputsToWitnessMap,
|
|
329
|
+
convertCheckpointRootRollupOutputsFromWitnessMap,
|
|
239
330
|
),
|
|
240
331
|
);
|
|
241
332
|
}
|
|
242
333
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
* @returns The public inputs as outputs of the simulation.
|
|
247
|
-
*/
|
|
248
|
-
@trackSpan('TestCircuitProver.getEmptyBlockRootRollupProof')
|
|
249
|
-
public getEmptyBlockRootRollupProof(
|
|
250
|
-
input: EmptyBlockRootRollupInputs,
|
|
334
|
+
@trackSpan('TestCircuitProver.getCheckpointRootSingleBlockRollupProof')
|
|
335
|
+
public getCheckpointRootSingleBlockRollupProof(
|
|
336
|
+
input: CheckpointRootSingleBlockRollupPrivateInputs,
|
|
251
337
|
): Promise<
|
|
252
|
-
PublicInputsAndRecursiveProof<
|
|
338
|
+
PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
253
339
|
> {
|
|
254
|
-
return this.applyDelay(ProvingRequestType.
|
|
340
|
+
return this.applyDelay(ProvingRequestType.CHECKPOINT_ROOT_SINGLE_BLOCK_ROLLUP, () =>
|
|
255
341
|
this.simulate(
|
|
256
342
|
input,
|
|
257
|
-
'
|
|
343
|
+
'CheckpointRootSingleBlockRollupArtifact',
|
|
258
344
|
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
259
|
-
|
|
260
|
-
|
|
345
|
+
convertCheckpointRootSingleBlockRollupPrivateInputsToWitnessMap,
|
|
346
|
+
convertCheckpointRootSingleBlockRollupOutputsFromWitnessMap,
|
|
261
347
|
),
|
|
262
348
|
);
|
|
263
349
|
}
|
|
264
350
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
* @returns The public inputs as outputs of the simulation.
|
|
269
|
-
*/
|
|
270
|
-
@trackSpan('TestCircuitProver.getBlockMergeRollupProof')
|
|
271
|
-
public getBlockMergeRollupProof(
|
|
272
|
-
input: BlockMergeRollupInputs,
|
|
351
|
+
@trackSpan('TestCircuitProver.getCheckpointPaddingRollupProof')
|
|
352
|
+
public getCheckpointPaddingRollupProof(
|
|
353
|
+
input: CheckpointPaddingRollupPrivateInputs,
|
|
273
354
|
): Promise<
|
|
274
|
-
PublicInputsAndRecursiveProof<
|
|
355
|
+
PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
275
356
|
> {
|
|
276
|
-
return this.applyDelay(ProvingRequestType.
|
|
357
|
+
return this.applyDelay(ProvingRequestType.CHECKPOINT_PADDING_ROLLUP, () =>
|
|
277
358
|
this.simulate(
|
|
278
359
|
input,
|
|
279
|
-
'
|
|
360
|
+
'CheckpointPaddingRollupArtifact',
|
|
280
361
|
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
281
|
-
|
|
282
|
-
|
|
362
|
+
convertCheckpointPaddingRollupPrivateInputsToWitnessMap,
|
|
363
|
+
convertCheckpointPaddingRollupOutputsFromWitnessMap,
|
|
364
|
+
),
|
|
365
|
+
);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
@trackSpan('TestCircuitProver.getCheckpointMergeRollupProof')
|
|
369
|
+
public getCheckpointMergeRollupProof(
|
|
370
|
+
input: CheckpointMergeRollupPrivateInputs,
|
|
371
|
+
): Promise<
|
|
372
|
+
PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
373
|
+
> {
|
|
374
|
+
return this.applyDelay(ProvingRequestType.CHECKPOINT_MERGE_ROLLUP, () =>
|
|
375
|
+
this.simulate(
|
|
376
|
+
input,
|
|
377
|
+
'CheckpointMergeRollupArtifact',
|
|
378
|
+
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
379
|
+
convertCheckpointMergeRollupPrivateInputsToWitnessMap,
|
|
380
|
+
convertCheckpointMergeRollupOutputsFromWitnessMap,
|
|
283
381
|
),
|
|
284
382
|
);
|
|
285
383
|
}
|
|
@@ -290,27 +388,26 @@ export class TestCircuitProver implements ServerCircuitProver {
|
|
|
290
388
|
* @returns The public inputs as outputs of the simulation.
|
|
291
389
|
*/
|
|
292
390
|
@trackSpan('TestCircuitProver.getRootRollupProof')
|
|
293
|
-
public getRootRollupProof(
|
|
391
|
+
public getRootRollupProof(
|
|
392
|
+
input: RootRollupPrivateInputs,
|
|
393
|
+
): Promise<PublicInputsAndRecursiveProof<RootRollupPublicInputs>> {
|
|
294
394
|
return this.applyDelay(ProvingRequestType.ROOT_ROLLUP, () =>
|
|
295
395
|
this.simulate(
|
|
296
396
|
input,
|
|
297
397
|
'RootRollupArtifact',
|
|
298
398
|
NESTED_RECURSIVE_PROOF_LENGTH,
|
|
299
|
-
|
|
399
|
+
convertRootRollupPrivateInputsToWitnessMap,
|
|
300
400
|
convertRootRollupOutputsFromWitnessMap,
|
|
301
401
|
),
|
|
302
402
|
);
|
|
303
403
|
}
|
|
304
404
|
|
|
305
|
-
public getAvmProof(_inputs: AvmCircuitInputs): Promise<
|
|
405
|
+
public getAvmProof(_inputs: AvmCircuitInputs): Promise<RecursiveProof<typeof AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED>> {
|
|
306
406
|
// We can't simulate the AVM because we don't have enough context to do so (e.g., DBs).
|
|
307
|
-
// We just return an empty proof
|
|
407
|
+
// We just return an empty proof.
|
|
308
408
|
this.logger.debug('Skipping AVM simulation in TestCircuitProver.');
|
|
309
409
|
return this.applyDelay(ProvingRequestType.PUBLIC_VM, () =>
|
|
310
|
-
|
|
311
|
-
makeEmptyRecursiveProof(AVM_PROOF_LENGTH_IN_FIELDS),
|
|
312
|
-
VerificationKeyData.makeFake(AVM_VERIFICATION_KEY_LENGTH_IN_FIELDS),
|
|
313
|
-
),
|
|
410
|
+
makeEmptyRecursiveProof(AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED),
|
|
314
411
|
);
|
|
315
412
|
}
|
|
316
413
|
|
|
@@ -341,25 +438,38 @@ export class TestCircuitProver implements ServerCircuitProver {
|
|
|
341
438
|
input: CircuitInputType,
|
|
342
439
|
artifactName: ServerProtocolArtifact,
|
|
343
440
|
proofLength: PROOF_LENGTH,
|
|
344
|
-
convertInput: (input: CircuitInputType) => WitnessMap,
|
|
345
|
-
convertOutput: (outputWitness: WitnessMap) => CircuitOutputType,
|
|
441
|
+
convertInput: (input: CircuitInputType, simulated?: boolean) => WitnessMap,
|
|
442
|
+
convertOutput: (outputWitness: WitnessMap, simulated?: boolean) => CircuitOutputType,
|
|
346
443
|
) {
|
|
347
444
|
const timer = new Timer();
|
|
348
|
-
const witnessMap = convertInput(input);
|
|
445
|
+
const witnessMap = convertInput(input, true /* simulated */);
|
|
349
446
|
const circuitName = mapProtocolArtifactNameToCircuitName(artifactName);
|
|
350
447
|
|
|
351
|
-
let
|
|
352
|
-
if (
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
448
|
+
let witness: WitnessMap;
|
|
449
|
+
if (
|
|
450
|
+
['CheckpointRootRollupArtifact', 'CheckpointRootSingleBlockRollupArtifact'].includes(artifactName) ||
|
|
451
|
+
this.simulator == undefined
|
|
452
|
+
) {
|
|
453
|
+
// TODO(#10323): Native ACVM simulator does not support foreign call handler so we use the wasm simulator
|
|
454
|
+
// when simulating checkpoint root rollup circuits or when the native ACVM simulator is not provided.
|
|
455
|
+
witness = (
|
|
456
|
+
await this.wasmSimulator.executeProtocolCircuit(
|
|
457
|
+
witnessMap,
|
|
458
|
+
getSimulatedServerCircuitArtifact(artifactName),
|
|
459
|
+
foreignCallHandler,
|
|
460
|
+
)
|
|
461
|
+
).witness;
|
|
462
|
+
} else {
|
|
463
|
+
witness = (
|
|
464
|
+
await this.simulator.executeProtocolCircuit(
|
|
465
|
+
witnessMap,
|
|
466
|
+
getSimulatedServerCircuitArtifact(artifactName),
|
|
467
|
+
undefined, // Native ACM simulator does not support foreign call handler
|
|
468
|
+
)
|
|
469
|
+
).witness;
|
|
356
470
|
}
|
|
357
|
-
const witness = await simulationProvider.executeProtocolCircuit(
|
|
358
|
-
witnessMap,
|
|
359
|
-
SimulatedServerCircuitArtifacts[artifactName],
|
|
360
|
-
);
|
|
361
471
|
|
|
362
|
-
const result = convertOutput(witness);
|
|
472
|
+
const result = convertOutput(witness, true /* simulated */);
|
|
363
473
|
|
|
364
474
|
this.instrumentation.recordDuration('simulationDuration', circuitName, timer);
|
|
365
475
|
emitCircuitSimulationStats(circuitName, timer.ms(), input.toBuffer().length, result.toBuffer().length, this.logger);
|