@aztec/bb-prover 3.0.0-nightly.20250916 → 3.0.0-nightly.20250918
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/prover/server/bb_prover.d.ts +13 -23
- package/dest/prover/server/bb_prover.d.ts.map +1 -1
- package/dest/prover/server/bb_prover.js +48 -99
- package/dest/stats.d.ts.map +1 -1
- package/dest/stats.js +16 -6
- package/dest/test/delay_values.d.ts.map +1 -1
- package/dest/test/delay_values.js +18 -8
- package/dest/test/test_circuit_prover.d.ts +12 -22
- package/dest/test/test_circuit_prover.d.ts.map +1 -1
- package/dest/test/test_circuit_prover.js +55 -38
- package/package.json +16 -16
- package/src/prover/server/bb_prover.ts +166 -188
- package/src/stats.ts +16 -6
- package/src/test/delay_values.ts +18 -8
- package/src/test/test_circuit_prover.ts +154 -79
|
@@ -5,7 +5,7 @@ import { type ProofAndVerificationKey, type PublicInputsAndRecursiveProof, type
|
|
|
5
5
|
import type { PrivateToPublicKernelCircuitPublicInputs } from '@aztec/stdlib/kernel';
|
|
6
6
|
import type { BaseParityInputs, ParityPublicInputs, RootParityInputs } from '@aztec/stdlib/parity';
|
|
7
7
|
import { Proof } from '@aztec/stdlib/proofs';
|
|
8
|
-
import { type BaseOrMergeRollupPublicInputs,
|
|
8
|
+
import { type BaseOrMergeRollupPublicInputs, BlockMergeRollupPrivateInputs, BlockRollupPublicInputs, BlockRootEmptyTxFirstRollupPrivateInputs, BlockRootFirstRollupPrivateInputs, BlockRootRollupPrivateInputs, BlockRootSingleTxFirstRollupPrivateInputs, BlockRootSingleTxRollupPrivateInputs, CheckpointMergeRollupPrivateInputs, CheckpointPaddingRollupPrivateInputs, CheckpointRollupPublicInputs, CheckpointRootRollupPrivateInputs, CheckpointRootSingleBlockRollupPrivateInputs, type MergeRollupInputs, type PrivateBaseRollupInputs, PublicBaseRollupInputs, PublicTubePrivateInputs, type RootRollupPrivateInputs, type RootRollupPublicInputs } from '@aztec/stdlib/rollup';
|
|
9
9
|
import type { VerificationKeyData } from '@aztec/stdlib/vks';
|
|
10
10
|
import { type TelemetryClient } from '@aztec/telemetry-client';
|
|
11
11
|
import type { ACVMConfig, BBConfig } from '../../config.js';
|
|
@@ -59,34 +59,24 @@ export declare class BBNativeRollupProver implements ServerCircuitProver {
|
|
|
59
59
|
* @returns The public inputs as outputs of the simulation.
|
|
60
60
|
*/
|
|
61
61
|
getMergeRollupProof(input: MergeRollupInputs): Promise<PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
* @returns The public inputs as outputs of the simulation.
|
|
73
|
-
*/
|
|
74
|
-
getEmptyBlockRootRollupProof(input: EmptyBlockRootRollupInputs): Promise<PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
75
|
-
getPaddingBlockRootRollupProof(input: PaddingBlockRootRollupInputs): Promise<PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
76
|
-
/**
|
|
77
|
-
* Simulates the block merge rollup circuit from its inputs.
|
|
78
|
-
* @param input - Inputs to the circuit.
|
|
79
|
-
* @returns The public inputs as outputs of the simulation.
|
|
80
|
-
*/
|
|
81
|
-
getBlockMergeRollupProof(input: BlockMergeRollupInputs): Promise<PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
62
|
+
getBlockRootFirstRollupProof(input: BlockRootFirstRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
63
|
+
getBlockRootSingleTxFirstRollupProof(input: BlockRootSingleTxFirstRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
64
|
+
getBlockRootEmptyTxFirstRollupProof(input: BlockRootEmptyTxFirstRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
65
|
+
getBlockRootRollupProof(input: BlockRootRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
66
|
+
getBlockRootSingleTxRollupProof(input: BlockRootSingleTxRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
67
|
+
getBlockMergeRollupProof(input: BlockMergeRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
68
|
+
getCheckpointRootRollupProof(input: CheckpointRootRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
69
|
+
getCheckpointRootSingleBlockRollupProof(input: CheckpointRootSingleBlockRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
70
|
+
getCheckpointPaddingRollupProof(input: CheckpointPaddingRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
71
|
+
getCheckpointMergeRollupProof(input: CheckpointMergeRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
82
72
|
/**
|
|
83
73
|
* Simulates the root rollup circuit from its inputs.
|
|
84
74
|
* @param input - Inputs to the circuit.
|
|
85
75
|
* @returns The public inputs as outputs of the simulation.
|
|
86
76
|
*/
|
|
87
|
-
getRootRollupProof(input:
|
|
77
|
+
getRootRollupProof(input: RootRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<RootRollupPublicInputs, typeof NESTED_RECURSIVE_PROOF_LENGTH>>;
|
|
78
|
+
private createRecursiveProofAndVerify;
|
|
88
79
|
private generateProofWithBB;
|
|
89
|
-
private createProof;
|
|
90
80
|
private generateAvmProofWithBB;
|
|
91
81
|
private createAvmProof;
|
|
92
82
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bb_prover.d.ts","sourceRoot":"","sources":["../../../src/prover/server/bb_prover.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oCAAoC,EACpC,6BAA6B,EAC7B,yCAAyC,EAEzC,sBAAsB,EAEvB,MAAM,kBAAkB,CAAC;AAK1B,OAAO,EACL,KAAK,sBAAsB,
|
|
1
|
+
{"version":3,"file":"bb_prover.d.ts","sourceRoot":"","sources":["../../../src/prover/server/bb_prover.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oCAAoC,EACpC,6BAA6B,EAC7B,yCAAyC,EAEzC,sBAAsB,EAEvB,MAAM,kBAAkB,CAAC;AAK1B,OAAO,EACL,KAAK,sBAAsB,EAoC5B,MAAM,4CAA4C,CAAC;AAIpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAElF,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,mBAAmB,EAGzB,MAAM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AAE,KAAK,EAAE,KAAK;YAMxF,qBAAqB;IA2BnC;;;;OAIG;IACH,OAAO,CAAC,gCAAgC;YAQ1B,oBAAoB;IAuBlC,OAAO,CAAC,cAAc;CAYvB"}
|
|
@@ -9,7 +9,7 @@ import { Fr } from '@aztec/foundation/fields';
|
|
|
9
9
|
import { runInDirectory } from '@aztec/foundation/fs';
|
|
10
10
|
import { createLogger } from '@aztec/foundation/log';
|
|
11
11
|
import { BufferReader } from '@aztec/foundation/serialize';
|
|
12
|
-
import { convertBaseParityInputsToWitnessMap, convertBaseParityOutputsFromWitnessMap,
|
|
12
|
+
import { convertBaseParityInputsToWitnessMap, convertBaseParityOutputsFromWitnessMap, convertBlockMergeRollupOutputsFromWitnessMap, convertBlockMergeRollupPrivateInputsToWitnessMap, convertBlockRootEmptyTxFirstRollupOutputsFromWitnessMap, convertBlockRootEmptyTxFirstRollupPrivateInputsToWitnessMap, convertBlockRootFirstRollupOutputsFromWitnessMap, convertBlockRootFirstRollupPrivateInputsToWitnessMap, convertBlockRootRollupOutputsFromWitnessMap, convertBlockRootRollupPrivateInputsToWitnessMap, convertBlockRootSingleTxFirstRollupOutputsFromWitnessMap, convertBlockRootSingleTxFirstRollupPrivateInputsToWitnessMap, convertBlockRootSingleTxRollupOutputsFromWitnessMap, convertBlockRootSingleTxRollupPrivateInputsToWitnessMap, convertCheckpointMergeRollupOutputsFromWitnessMap, convertCheckpointMergeRollupPrivateInputsToWitnessMap, convertCheckpointPaddingRollupOutputsFromWitnessMap, convertCheckpointPaddingRollupPrivateInputsToWitnessMap, convertCheckpointRootRollupOutputsFromWitnessMap, convertCheckpointRootRollupPrivateInputsToWitnessMap, convertCheckpointRootSingleBlockRollupOutputsFromWitnessMap, convertCheckpointRootSingleBlockRollupPrivateInputsToWitnessMap, convertMergeRollupInputsToWitnessMap, convertMergeRollupOutputsFromWitnessMap, convertPrivateBaseRollupInputsToWitnessMap, convertPrivateBaseRollupOutputsFromWitnessMap, convertPublicBaseRollupInputsToWitnessMap, convertPublicBaseRollupOutputsFromWitnessMap, convertPublicTubeOutputsFromWitnessMap, convertPublicTubePrivateInputsToWitnessMap, convertRootParityInputsToWitnessMap, convertRootParityOutputsFromWitnessMap, convertRootRollupOutputsFromWitnessMap, convertRootRollupPrivateInputsToWitnessMap, getServerCircuitArtifact } from '@aztec/noir-protocol-circuits-types/server';
|
|
13
13
|
import { ServerCircuitVks } from '@aztec/noir-protocol-circuits-types/server/vks';
|
|
14
14
|
import { NativeACVMSimulator } from '@aztec/simulator/server';
|
|
15
15
|
import { ProvingError } from '@aztec/stdlib/errors';
|
|
@@ -55,21 +55,15 @@ const logger = createLogger('bb-prover');
|
|
|
55
55
|
* Simulates the base parity circuit from its inputs.
|
|
56
56
|
* @param inputs - Inputs to the circuit.
|
|
57
57
|
* @returns The public inputs of the parity circuit.
|
|
58
|
-
*/
|
|
59
|
-
|
|
60
|
-
const verificationKey = this.getVerificationKeyDataForCircuit('BaseParityArtifact');
|
|
61
|
-
await this.verifyProof('BaseParityArtifact', proof.binaryProof);
|
|
62
|
-
return makePublicInputsAndRecursiveProof(circuitOutput, proof, verificationKey);
|
|
58
|
+
*/ getBaseParityProof(inputs) {
|
|
59
|
+
return this.createRecursiveProofAndVerify(inputs, 'BaseParityArtifact', RECURSIVE_PROOF_LENGTH, convertBaseParityInputsToWitnessMap, convertBaseParityOutputsFromWitnessMap);
|
|
63
60
|
}
|
|
64
61
|
/**
|
|
65
62
|
* Simulates the root parity circuit from its inputs.
|
|
66
63
|
* @param inputs - Inputs to the circuit.
|
|
67
64
|
* @returns The public inputs of the parity circuit.
|
|
68
|
-
*/
|
|
69
|
-
|
|
70
|
-
const verificationKey = this.getVerificationKeyDataForCircuit('RootParityArtifact');
|
|
71
|
-
await this.verifyProof('RootParityArtifact', proof.binaryProof);
|
|
72
|
-
return makePublicInputsAndRecursiveProof(circuitOutput, proof, verificationKey);
|
|
65
|
+
*/ getRootParityProof(inputs) {
|
|
66
|
+
return this.createRecursiveProofAndVerify(inputs, 'RootParityArtifact', NESTED_RECURSIVE_PROOF_LENGTH, convertRootParityInputsToWitnessMap, convertRootParityOutputsFromWitnessMap);
|
|
73
67
|
}
|
|
74
68
|
/**
|
|
75
69
|
* Creates an AVM proof and verifies it.
|
|
@@ -93,88 +87,72 @@ const logger = createLogger('bb-prover');
|
|
|
93
87
|
* Simulates the base rollup circuit from its inputs.
|
|
94
88
|
* @param inputs - Inputs to the circuit.
|
|
95
89
|
* @returns The public inputs as outputs of the simulation.
|
|
96
|
-
*/
|
|
97
|
-
|
|
98
|
-
const { circuitOutput, proof } = await this.createRecursiveProof(inputs, artifactName, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, convertPrivateBaseRollupInputsToWitnessMap, convertPrivateBaseRollupOutputsFromWitnessMap);
|
|
99
|
-
const verificationKey = this.getVerificationKeyDataForCircuit(artifactName);
|
|
100
|
-
await this.verifyProof(artifactName, proof.binaryProof);
|
|
101
|
-
return makePublicInputsAndRecursiveProof(circuitOutput, proof, verificationKey);
|
|
90
|
+
*/ getPrivateBaseRollupProof(inputs) {
|
|
91
|
+
return this.createRecursiveProofAndVerify(inputs, 'PrivateBaseRollupArtifact', NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, convertPrivateBaseRollupInputsToWitnessMap, convertPrivateBaseRollupOutputsFromWitnessMap);
|
|
102
92
|
}
|
|
103
93
|
/**
|
|
104
94
|
* Requests that the public kernel tail circuit be executed and the proof generated
|
|
105
95
|
* @param kernelRequest - The object encapsulating the request for a proof
|
|
106
96
|
* @returns The requested circuit's public inputs and proof
|
|
107
|
-
*/
|
|
108
|
-
|
|
109
|
-
const { circuitOutput, proof } = await this.createRecursiveProof(inputs, artifactName, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, convertPublicBaseRollupInputsToWitnessMap, convertPublicBaseRollupOutputsFromWitnessMap);
|
|
110
|
-
const verificationKey = this.getVerificationKeyDataForCircuit(artifactName);
|
|
111
|
-
await this.verifyProof(artifactName, proof.binaryProof);
|
|
112
|
-
return makePublicInputsAndRecursiveProof(circuitOutput, proof, verificationKey);
|
|
97
|
+
*/ getPublicBaseRollupProof(inputs) {
|
|
98
|
+
return this.createRecursiveProofAndVerify(inputs, 'PublicBaseRollupArtifact', NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, convertPublicBaseRollupInputsToWitnessMap, convertPublicBaseRollupOutputsFromWitnessMap);
|
|
113
99
|
}
|
|
114
100
|
/**
|
|
115
101
|
* Simulates the merge rollup circuit from its inputs.
|
|
116
102
|
* @param input - Inputs to the circuit.
|
|
117
103
|
* @returns The public inputs as outputs of the simulation.
|
|
118
|
-
*/
|
|
119
|
-
|
|
120
|
-
const verificationKey = this.getVerificationKeyDataForCircuit('MergeRollupArtifact');
|
|
121
|
-
await this.verifyProof('MergeRollupArtifact', proof.binaryProof);
|
|
122
|
-
return makePublicInputsAndRecursiveProof(circuitOutput, proof, verificationKey);
|
|
104
|
+
*/ getMergeRollupProof(input) {
|
|
105
|
+
return this.createRecursiveProofAndVerify(input, 'MergeRollupArtifact', NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, convertMergeRollupInputsToWitnessMap, convertMergeRollupOutputsFromWitnessMap);
|
|
123
106
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
* @param input - Inputs to the circuit.
|
|
127
|
-
* @returns The public inputs as outputs of the simulation.
|
|
128
|
-
*/ async getBlockRootRollupProof(input) {
|
|
129
|
-
const { circuitOutput, proof } = await this.createRecursiveProof(input, 'BlockRootRollupArtifact', NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, convertBlockRootRollupInputsToWitnessMap, convertBlockRootRollupOutputsFromWitnessMap);
|
|
130
|
-
const verificationKey = this.getVerificationKeyDataForCircuit('BlockRootRollupArtifact');
|
|
131
|
-
await this.verifyProof('BlockRootRollupArtifact', proof.binaryProof);
|
|
132
|
-
return makePublicInputsAndRecursiveProof(circuitOutput, proof, verificationKey);
|
|
107
|
+
getBlockRootFirstRollupProof(input) {
|
|
108
|
+
return this.createRecursiveProofAndVerify(input, 'BlockRootFirstRollupArtifact', NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, convertBlockRootFirstRollupPrivateInputsToWitnessMap, convertBlockRootFirstRollupOutputsFromWitnessMap);
|
|
133
109
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
const verificationKey = this.getVerificationKeyDataForCircuit('SingleTxBlockRootRollupArtifact');
|
|
137
|
-
await this.verifyProof('SingleTxBlockRootRollupArtifact', proof.binaryProof);
|
|
138
|
-
return makePublicInputsAndRecursiveProof(circuitOutput, proof, verificationKey);
|
|
110
|
+
getBlockRootSingleTxFirstRollupProof(input) {
|
|
111
|
+
return this.createRecursiveProofAndVerify(input, 'BlockRootSingleTxFirstRollupArtifact', NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, convertBlockRootSingleTxFirstRollupPrivateInputsToWitnessMap, convertBlockRootSingleTxFirstRollupOutputsFromWitnessMap);
|
|
139
112
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
* @param input - Inputs to the circuit.
|
|
143
|
-
* @returns The public inputs as outputs of the simulation.
|
|
144
|
-
*/ async getEmptyBlockRootRollupProof(input) {
|
|
145
|
-
const { circuitOutput, proof } = await this.createRecursiveProof(input, 'EmptyBlockRootRollupArtifact', NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, convertEmptyBlockRootRollupInputsToWitnessMap, convertEmptyBlockRootRollupOutputsFromWitnessMap);
|
|
146
|
-
const verificationKey = this.getVerificationKeyDataForCircuit('EmptyBlockRootRollupArtifact');
|
|
147
|
-
await this.verifyProof('EmptyBlockRootRollupArtifact', proof.binaryProof);
|
|
148
|
-
return makePublicInputsAndRecursiveProof(circuitOutput, proof, verificationKey);
|
|
113
|
+
getBlockRootEmptyTxFirstRollupProof(input) {
|
|
114
|
+
return this.createRecursiveProofAndVerify(input, 'BlockRootEmptyTxFirstRollupArtifact', NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, convertBlockRootEmptyTxFirstRollupPrivateInputsToWitnessMap, convertBlockRootEmptyTxFirstRollupOutputsFromWitnessMap);
|
|
149
115
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
const verificationKey = this.getVerificationKeyDataForCircuit('PaddingBlockRootRollupArtifact');
|
|
153
|
-
await this.verifyProof('PaddingBlockRootRollupArtifact', proof.binaryProof);
|
|
154
|
-
return makePublicInputsAndRecursiveProof(circuitOutput, proof, verificationKey);
|
|
116
|
+
getBlockRootRollupProof(input) {
|
|
117
|
+
return this.createRecursiveProofAndVerify(input, 'BlockRootRollupArtifact', NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, convertBlockRootRollupPrivateInputsToWitnessMap, convertBlockRootRollupOutputsFromWitnessMap);
|
|
155
118
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
119
|
+
getBlockRootSingleTxRollupProof(input) {
|
|
120
|
+
return this.createRecursiveProofAndVerify(input, 'BlockRootSingleTxRollupArtifact', NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, convertBlockRootSingleTxRollupPrivateInputsToWitnessMap, convertBlockRootSingleTxRollupOutputsFromWitnessMap);
|
|
121
|
+
}
|
|
122
|
+
getBlockMergeRollupProof(input) {
|
|
123
|
+
return this.createRecursiveProofAndVerify(input, 'BlockMergeRollupArtifact', NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, convertBlockMergeRollupPrivateInputsToWitnessMap, convertBlockMergeRollupOutputsFromWitnessMap);
|
|
124
|
+
}
|
|
125
|
+
getCheckpointRootRollupProof(input) {
|
|
126
|
+
return this.createRecursiveProofAndVerify(input, 'CheckpointRootRollupArtifact', NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, convertCheckpointRootRollupPrivateInputsToWitnessMap, convertCheckpointRootRollupOutputsFromWitnessMap);
|
|
127
|
+
}
|
|
128
|
+
getCheckpointRootSingleBlockRollupProof(input) {
|
|
129
|
+
return this.createRecursiveProofAndVerify(input, 'CheckpointRootSingleBlockRollupArtifact', NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, convertCheckpointRootSingleBlockRollupPrivateInputsToWitnessMap, convertCheckpointRootSingleBlockRollupOutputsFromWitnessMap);
|
|
130
|
+
}
|
|
131
|
+
getCheckpointPaddingRollupProof(input) {
|
|
132
|
+
return this.createRecursiveProofAndVerify(input, 'CheckpointPaddingRollupArtifact', NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, convertCheckpointPaddingRollupPrivateInputsToWitnessMap, convertCheckpointPaddingRollupOutputsFromWitnessMap);
|
|
133
|
+
}
|
|
134
|
+
getCheckpointMergeRollupProof(input) {
|
|
135
|
+
return this.createRecursiveProofAndVerify(input, 'CheckpointMergeRollupArtifact', NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, convertCheckpointMergeRollupPrivateInputsToWitnessMap, convertCheckpointMergeRollupOutputsFromWitnessMap);
|
|
165
136
|
}
|
|
166
137
|
/**
|
|
167
138
|
* Simulates the root rollup circuit from its inputs.
|
|
168
139
|
* @param input - Inputs to the circuit.
|
|
169
140
|
* @returns The public inputs as outputs of the simulation.
|
|
170
141
|
*/ async getRootRollupProof(input) {
|
|
171
|
-
const {
|
|
172
|
-
const recursiveProof = makeRecursiveProofFromBinary(proof, NESTED_RECURSIVE_PROOF_LENGTH);
|
|
173
|
-
const verificationKey = this.getVerificationKeyDataForCircuit('RootRollupArtifact');
|
|
174
|
-
await this.verifyProof('RootRollupArtifact', proof);
|
|
142
|
+
const { proof, ...output } = await this.createRecursiveProofAndVerify(input, 'RootRollupArtifact', ULTRA_KECCAK_PROOF_LENGTH, convertRootRollupPrivateInputsToWitnessMap, convertRootRollupOutputsFromWitnessMap);
|
|
143
|
+
const recursiveProof = makeRecursiveProofFromBinary(proof.binaryProof, NESTED_RECURSIVE_PROOF_LENGTH);
|
|
175
144
|
// TODO(https://github.com/AztecProtocol/aztec-packages/issues/13188): Remove this hack.
|
|
176
145
|
recursiveProof.binaryProof.numPublicInputs += PAIRING_POINTS_SIZE;
|
|
177
|
-
return
|
|
146
|
+
return {
|
|
147
|
+
...output,
|
|
148
|
+
proof: recursiveProof
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
async createRecursiveProofAndVerify(input, artifactName, proofLength, convertInput, convertOutput) {
|
|
152
|
+
const { circuitOutput, proof } = await this.createRecursiveProof(input, artifactName, proofLength, convertInput, convertOutput);
|
|
153
|
+
await this.verifyProof(artifactName, proof.binaryProof);
|
|
154
|
+
const verificationKey = this.getVerificationKeyDataForCircuit(artifactName);
|
|
155
|
+
return makePublicInputsAndRecursiveProof(circuitOutput, proof, verificationKey);
|
|
178
156
|
}
|
|
179
157
|
async generateProofWithBB(input, circuitType, convertInput, convertOutput, workingDirectory) {
|
|
180
158
|
// Have the ACVM write the partial witness here
|
|
@@ -211,35 +189,6 @@ const logger = createLogger('bb-prover');
|
|
|
211
189
|
provingResult
|
|
212
190
|
};
|
|
213
191
|
}
|
|
214
|
-
async createProof(input, circuitType, convertInput, convertOutput) {
|
|
215
|
-
const operation = async (bbWorkingDirectory)=>{
|
|
216
|
-
const { provingResult, circuitOutput: output } = await this.generateProofWithBB(input, circuitType, convertInput, convertOutput, bbWorkingDirectory);
|
|
217
|
-
const vkData = this.getVerificationKeyDataForCircuit(circuitType);
|
|
218
|
-
const PROOF_LENGTH = circuitType == 'RootRollupArtifact' ? ULTRA_KECCAK_PROOF_LENGTH : RECURSIVE_PROOF_LENGTH;
|
|
219
|
-
const proof = await readProofsFromOutputDirectory(provingResult.proofPath, vkData, PROOF_LENGTH, logger);
|
|
220
|
-
const circuitName = mapProtocolArtifactNameToCircuitName(circuitType);
|
|
221
|
-
this.instrumentation.recordDuration('provingDuration', circuitName, provingResult.durationMs);
|
|
222
|
-
this.instrumentation.recordSize('proofSize', circuitName, proof.binaryProof.buffer.length);
|
|
223
|
-
this.instrumentation.recordSize('circuitPublicInputCount', circuitName, vkData.numPublicInputs);
|
|
224
|
-
this.instrumentation.recordSize('circuitSize', circuitName, vkData.circuitSize);
|
|
225
|
-
logger.info(`Generated proof for ${circuitType} in ${Math.ceil(provingResult.durationMs)} ms`, {
|
|
226
|
-
circuitName,
|
|
227
|
-
// does not include reading the proof from disk
|
|
228
|
-
duration: provingResult.durationMs,
|
|
229
|
-
proofSize: proof.binaryProof.buffer.length,
|
|
230
|
-
eventName: 'circuit-proving',
|
|
231
|
-
// circuitOutput is the partial witness that became the input to the proof
|
|
232
|
-
inputSize: output.toBuffer().length,
|
|
233
|
-
circuitSize: vkData.circuitSize,
|
|
234
|
-
numPublicInputs: vkData.numPublicInputs
|
|
235
|
-
});
|
|
236
|
-
return {
|
|
237
|
-
circuitOutput: output,
|
|
238
|
-
proof: proof.binaryProof
|
|
239
|
-
};
|
|
240
|
-
};
|
|
241
|
-
return await this.runInDirectory(operation);
|
|
242
|
-
}
|
|
243
192
|
async generateAvmProofWithBB(input, workingDirectory) {
|
|
244
193
|
logger.info(`Proving avm-circuit for TX ${input.hints.tx.hash}...`);
|
|
245
194
|
const provingResult = await generateAvmProof(this.config.bbBinaryPath, workingDirectory, input, logger);
|
package/dest/stats.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../src/stats.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,wBAAgB,oCAAoC,CAAC,QAAQ,EAAE,gBAAgB,GAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../src/stats.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,wBAAgB,oCAAoC,CAAC,QAAQ,EAAE,gBAAgB,GAAG,WAAW,CAuD5F"}
|
package/dest/stats.js
CHANGED
|
@@ -12,16 +12,26 @@ export function mapProtocolArtifactNameToCircuitName(artifact) {
|
|
|
12
12
|
return 'public-base-rollup';
|
|
13
13
|
case 'MergeRollupArtifact':
|
|
14
14
|
return 'merge-rollup';
|
|
15
|
+
case 'BlockRootFirstRollupArtifact':
|
|
16
|
+
return 'block-root-first-rollup';
|
|
17
|
+
case 'BlockRootSingleTxFirstRollupArtifact':
|
|
18
|
+
return 'block-root-single-tx-first-rollup';
|
|
19
|
+
case 'BlockRootEmptyTxFirstRollupArtifact':
|
|
20
|
+
return 'block-root-empty-tx-first-rollup';
|
|
15
21
|
case 'BlockRootRollupArtifact':
|
|
16
22
|
return 'block-root-rollup';
|
|
17
|
-
case '
|
|
18
|
-
return 'single-tx-
|
|
19
|
-
case 'EmptyBlockRootRollupArtifact':
|
|
20
|
-
return 'empty-block-root-rollup';
|
|
21
|
-
case 'PaddingBlockRootRollupArtifact':
|
|
22
|
-
return 'padding-block-root-rollup';
|
|
23
|
+
case 'BlockRootSingleTxRollupArtifact':
|
|
24
|
+
return 'block-root-single-tx-rollup';
|
|
23
25
|
case 'BlockMergeRollupArtifact':
|
|
24
26
|
return 'block-merge-rollup';
|
|
27
|
+
case 'CheckpointRootRollupArtifact':
|
|
28
|
+
return 'checkpoint-root-rollup';
|
|
29
|
+
case 'CheckpointRootSingleBlockRollupArtifact':
|
|
30
|
+
return 'checkpoint-root-single-block-rollup';
|
|
31
|
+
case 'CheckpointPaddingRollupArtifact':
|
|
32
|
+
return 'checkpoint-padding-rollup';
|
|
33
|
+
case 'CheckpointMergeRollupArtifact':
|
|
34
|
+
return 'checkpoint-merge-rollup';
|
|
25
35
|
case 'RootRollupArtifact':
|
|
26
36
|
return 'root-rollup';
|
|
27
37
|
case 'PrivateKernelInitArtifact':
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delay_values.d.ts","sourceRoot":"","sources":["../../src/test/delay_values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"delay_values.d.ts","sourceRoot":"","sources":["../../src/test/delay_values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAmB9D,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAmB7D,CAAC"}
|
|
@@ -2,12 +2,17 @@ import { ProvingRequestType } from '@aztec/stdlib/proofs';
|
|
|
2
2
|
export const WITGEN_DELAY_MS = {
|
|
3
3
|
[ProvingRequestType.BASE_PARITY]: 60,
|
|
4
4
|
[ProvingRequestType.BLOCK_MERGE_ROLLUP]: 650,
|
|
5
|
-
[ProvingRequestType.
|
|
6
|
-
[ProvingRequestType.
|
|
7
|
-
[ProvingRequestType.
|
|
5
|
+
[ProvingRequestType.BLOCK_ROOT_FIRST_ROLLUP]: 60_000,
|
|
6
|
+
[ProvingRequestType.BLOCK_ROOT_SINGLE_TX_FIRST_ROLLUP]: 40_000,
|
|
7
|
+
[ProvingRequestType.BLOCK_ROOT_EMPTY_TX_FIRST_ROLLUP]: 20_000,
|
|
8
|
+
[ProvingRequestType.BLOCK_ROOT_ROLLUP]: 40_000,
|
|
9
|
+
[ProvingRequestType.BLOCK_ROOT_SINGLE_TX_ROLLUP]: 20_000,
|
|
10
|
+
[ProvingRequestType.CHECKPOINT_ROOT_ROLLUP]: 40_000,
|
|
11
|
+
[ProvingRequestType.CHECKPOINT_ROOT_SINGLE_BLOCK_ROLLUP]: 20_000,
|
|
12
|
+
[ProvingRequestType.CHECKPOINT_PADDING_ROLLUP]: 0,
|
|
13
|
+
[ProvingRequestType.CHECKPOINT_MERGE_ROLLUP]: 650,
|
|
8
14
|
[ProvingRequestType.MERGE_ROLLUP]: 0,
|
|
9
15
|
[ProvingRequestType.PRIVATE_BASE_ROLLUP]: 400_000,
|
|
10
|
-
[ProvingRequestType.SINGLE_TX_BLOCK_ROOT_ROLLUP]: 0,
|
|
11
16
|
[ProvingRequestType.PUBLIC_BASE_ROLLUP]: 470_000,
|
|
12
17
|
[ProvingRequestType.ROOT_PARITY]: 100,
|
|
13
18
|
[ProvingRequestType.ROOT_ROLLUP]: 650,
|
|
@@ -17,12 +22,17 @@ export const WITGEN_DELAY_MS = {
|
|
|
17
22
|
export const PROOF_DELAY_MS = {
|
|
18
23
|
[ProvingRequestType.BASE_PARITY]: 3_000,
|
|
19
24
|
[ProvingRequestType.BLOCK_MERGE_ROLLUP]: 15_000,
|
|
20
|
-
[ProvingRequestType.
|
|
21
|
-
[ProvingRequestType.
|
|
22
|
-
[ProvingRequestType.
|
|
25
|
+
[ProvingRequestType.BLOCK_ROOT_FIRST_ROLLUP]: 55_000,
|
|
26
|
+
[ProvingRequestType.BLOCK_ROOT_SINGLE_TX_FIRST_ROLLUP]: 35_000,
|
|
27
|
+
[ProvingRequestType.BLOCK_ROOT_EMPTY_TX_FIRST_ROLLUP]: 15_000,
|
|
28
|
+
[ProvingRequestType.BLOCK_ROOT_ROLLUP]: 35_000,
|
|
29
|
+
[ProvingRequestType.BLOCK_ROOT_SINGLE_TX_ROLLUP]: 15_000,
|
|
30
|
+
[ProvingRequestType.CHECKPOINT_ROOT_ROLLUP]: 35_000,
|
|
31
|
+
[ProvingRequestType.CHECKPOINT_ROOT_SINGLE_BLOCK_ROLLUP]: 15_000,
|
|
32
|
+
[ProvingRequestType.CHECKPOINT_PADDING_ROLLUP]: 0,
|
|
33
|
+
[ProvingRequestType.CHECKPOINT_MERGE_ROLLUP]: 15_000,
|
|
23
34
|
[ProvingRequestType.MERGE_ROLLUP]: 0,
|
|
24
35
|
[ProvingRequestType.PRIVATE_BASE_ROLLUP]: 145_000,
|
|
25
|
-
[ProvingRequestType.SINGLE_TX_BLOCK_ROOT_ROLLUP]: 0,
|
|
26
36
|
[ProvingRequestType.PUBLIC_BASE_ROLLUP]: 160_000,
|
|
27
37
|
[ProvingRequestType.ROOT_PARITY]: 30_000,
|
|
28
38
|
[ProvingRequestType.ROOT_ROLLUP]: 15_000,
|
|
@@ -6,7 +6,7 @@ import { type ProofAndVerificationKey, type PublicInputsAndRecursiveProof, type
|
|
|
6
6
|
import type { PrivateToPublicKernelCircuitPublicInputs } from '@aztec/stdlib/kernel';
|
|
7
7
|
import type { BaseParityInputs, ParityPublicInputs, RootParityInputs } from '@aztec/stdlib/parity';
|
|
8
8
|
import { type Proof } from '@aztec/stdlib/proofs';
|
|
9
|
-
import type { BaseOrMergeRollupPublicInputs,
|
|
9
|
+
import type { BaseOrMergeRollupPublicInputs, BlockMergeRollupPrivateInputs, BlockRollupPublicInputs, BlockRootEmptyTxFirstRollupPrivateInputs, BlockRootFirstRollupPrivateInputs, BlockRootRollupPrivateInputs, BlockRootSingleTxFirstRollupPrivateInputs, BlockRootSingleTxRollupPrivateInputs, CheckpointMergeRollupPrivateInputs, CheckpointPaddingRollupPrivateInputs, CheckpointRollupPublicInputs, CheckpointRootRollupPrivateInputs, CheckpointRootSingleBlockRollupPrivateInputs, MergeRollupInputs, PrivateBaseRollupInputs, PublicBaseRollupInputs, PublicTubePrivateInputs, RootRollupPrivateInputs, RootRollupPublicInputs } from '@aztec/stdlib/rollup';
|
|
10
10
|
import { type TelemetryClient } from '@aztec/telemetry-client';
|
|
11
11
|
type TestDelay = {
|
|
12
12
|
proverTestDelayType: 'fixed';
|
|
@@ -48,32 +48,22 @@ export declare class TestCircuitProver implements ServerCircuitProver {
|
|
|
48
48
|
* @returns The public inputs as outputs of the simulation.
|
|
49
49
|
*/
|
|
50
50
|
getMergeRollupProof(input: MergeRollupInputs): Promise<PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
* @returns The public inputs as outputs of the simulation.
|
|
62
|
-
*/
|
|
63
|
-
getEmptyBlockRootRollupProof(input: EmptyBlockRootRollupInputs): Promise<PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
64
|
-
getPaddingBlockRootRollupProof(input: PaddingBlockRootRollupInputs): Promise<PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
65
|
-
/**
|
|
66
|
-
* Simulates the block merge rollup circuit from its inputs.
|
|
67
|
-
* @param input - Inputs to the circuit.
|
|
68
|
-
* @returns The public inputs as outputs of the simulation.
|
|
69
|
-
*/
|
|
70
|
-
getBlockMergeRollupProof(input: BlockMergeRollupInputs): Promise<PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
51
|
+
getBlockRootFirstRollupProof(input: BlockRootFirstRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
52
|
+
getBlockRootSingleTxFirstRollupProof(input: BlockRootSingleTxFirstRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
53
|
+
getBlockRootEmptyTxFirstRollupProof(input: BlockRootEmptyTxFirstRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
54
|
+
getBlockRootRollupProof(input: BlockRootRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
55
|
+
getBlockRootSingleTxRollupProof(input: BlockRootSingleTxRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
56
|
+
getBlockMergeRollupProof(input: BlockMergeRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
57
|
+
getCheckpointRootRollupProof(input: CheckpointRootRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
58
|
+
getCheckpointRootSingleBlockRollupProof(input: CheckpointRootSingleBlockRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
59
|
+
getCheckpointPaddingRollupProof(input: CheckpointPaddingRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
60
|
+
getCheckpointMergeRollupProof(input: CheckpointMergeRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
71
61
|
/**
|
|
72
62
|
* Simulates the root rollup circuit from its inputs.
|
|
73
63
|
* @param input - Inputs to the circuit.
|
|
74
64
|
* @returns The public inputs as outputs of the simulation.
|
|
75
65
|
*/
|
|
76
|
-
getRootRollupProof(input:
|
|
66
|
+
getRootRollupProof(input: RootRollupPrivateInputs): Promise<PublicInputsAndRecursiveProof<RootRollupPublicInputs>>;
|
|
77
67
|
getAvmProof(_inputs: AvmCircuitInputs): Promise<ProofAndVerificationKey<typeof AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED>>;
|
|
78
68
|
private applyDelay;
|
|
79
69
|
verifyProof(_1: ServerProtocolArtifact, _2: Proof): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test_circuit_prover.d.ts","sourceRoot":"","sources":["../../src/test/test_circuit_prover.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oCAAoC,EAEpC,6BAA6B,EAC7B,yCAAyC,EACzC,sBAAsB,EACvB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EACL,KAAK,sBAAsB,
|
|
1
|
+
{"version":3,"file":"test_circuit_prover.d.ts","sourceRoot":"","sources":["../../src/test/test_circuit_prover.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oCAAoC,EAEpC,6BAA6B,EAC7B,yCAAyC,EACzC,sBAAsB,EACvB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EACL,KAAK,sBAAsB,EAmC5B,MAAM,4CAA4C,CAAC;AAGpD,OAAO,EAAE,KAAK,gBAAgB,EAAsD,MAAM,yBAAyB,CAAC;AACpH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,mBAAmB,EAGzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,sBAAsB,CAAC;AACrF,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACnG,OAAO,EAAE,KA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