@aztec/ivc-integration 3.0.3 → 4.0.0-devnet.1-patch.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.
@@ -12,7 +12,6 @@ import {
12
12
  } from '@aztec/bb-prover';
13
13
  import {
14
14
  AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED,
15
- AVM_V2_VERIFICATION_KEY_LENGTH_IN_FIELDS_PADDED,
16
15
  CHONK_PROOF_LENGTH,
17
16
  HIDING_KERNEL_IO_PUBLIC_INPUTS_SIZE,
18
17
  NESTED_RECURSIVE_PROOF_LENGTH,
@@ -25,7 +24,6 @@ import type { AvmCircuitInputs, AvmCircuitPublicInputs } from '@aztec/stdlib/avm
25
24
  import { makeProofAndVerificationKey } from '@aztec/stdlib/interfaces/server';
26
25
  import type { NoirCompiledCircuit } from '@aztec/stdlib/noir';
27
26
  import { Proof, RecursiveProof } from '@aztec/stdlib/proofs';
28
- import { enhanceProofWithPiValidationFlag } from '@aztec/stdlib/rollup';
29
27
  import { VerificationKeyAsFields, VerificationKeyData } from '@aztec/stdlib/vks';
30
28
 
31
29
  import * as fs from 'fs/promises';
@@ -153,9 +151,7 @@ export async function proveAvm(
153
151
  avmCircuitInputs: AvmCircuitInputs,
154
152
  workingDirectory: string,
155
153
  logger: Logger,
156
- skipPublicInputsValidation: boolean = false,
157
154
  ): Promise<{
158
- vk: VerificationKeyAsFields;
159
155
  proof: Fr[];
160
156
  publicInputs: AvmCircuitPublicInputs;
161
157
  }> {
@@ -171,11 +167,7 @@ export async function proveAvm(
171
167
  }
172
168
 
173
169
  const avmProofPath = proofRes.proofPath;
174
- const avmVkDirectoryPath = proofRes.vkDirectoryPath;
175
170
  expect(avmProofPath).toBeDefined();
176
- expect(avmVkDirectoryPath).toBeDefined();
177
-
178
- const avmVkPath = path.join(proofRes.vkDirectoryPath as string, VK_FILENAME);
179
171
 
180
172
  // Read the binary proof
181
173
  const avmProofBuffer = await fs.readFile(avmProofPath!);
@@ -193,26 +185,11 @@ export async function proveAvm(
193
185
  proof.push(new Fr(0));
194
186
  }
195
187
 
196
- // Read the key
197
- const vkBuffer = await fs.readFile(avmVkPath!);
198
- const vkReader = BufferReader.asReader(vkBuffer);
199
- const vk: Fr[] = [];
200
- while (!vkReader.isEmpty()) {
201
- vk.push(Fr.fromBuffer(vkReader));
202
- }
203
- // We extend to a fixed-size padded vk as during development any new AVM circuit precomputed
204
- // column changes the vk length and we do not have a mechanism to feedback a cpp constant to noir/TS.
205
- // TODO(#13390): Revive a non-padded vk proof
206
- while (vk.length < AVM_V2_VERIFICATION_KEY_LENGTH_IN_FIELDS_PADDED) {
207
- vk.push(new Fr(0));
208
- }
209
-
210
188
  const verificationResult = await verifyAvmProof(
211
189
  bbPath,
212
190
  workingDirectory,
213
191
  proofRes.proofPath!,
214
192
  avmCircuitInputs.publicInputs,
215
- path.join(proofRes.vkDirectoryPath!, VK_FILENAME),
216
193
  logger,
217
194
  );
218
195
 
@@ -220,12 +197,8 @@ export async function proveAvm(
220
197
  throw new Error(`AVM V2 proof verification failed: ${verificationResult.reason}`);
221
198
  }
222
199
 
223
- // TODO(#14234)[Unconditional PIs validation]: Remove next lines and return proof instead of proofWithPublicInputsValidationFlag
224
- const proofWithPublicInputsValidationFlag = enhanceProofWithPiValidationFlag(proof, skipPublicInputsValidation);
225
-
226
200
  return {
227
- proof: proofWithPublicInputsValidationFlag,
228
- vk: await VerificationKeyAsFields.fromKey(vk),
201
+ proof,
229
202
  publicInputs: avmCircuitInputs.publicInputs,
230
203
  };
231
204
  }
@@ -39,7 +39,7 @@ export type PrivateKernelPublicInputs = {
39
39
 
40
40
  export type ChonkProofData = {
41
41
  public_inputs: KernelPublicInputs;
42
- proof: FixedLengthArray<Field, 1963>;
42
+ proof: FixedLengthArray<Field, 1935>;
43
43
  vk_data: VerificationKey<127>;
44
44
  }
45
45
 
@@ -186,7 +186,7 @@ export type RollupPublicInputs = {
186
186
 
187
187
  export type PreviousRollupData = {
188
188
  base_or_merge_public_inputs: RollupPublicInputs;
189
- proof: FixedLengthArray<Field, 531>;
189
+ proof: FixedLengthArray<Field, 519>;
190
190
  vk: VerificationKey<115>;
191
191
  }
192
192
 
@@ -293,14 +293,14 @@ export async function MockPrivateKernelTail(prev_kernel_public_inputs: PrivateKe
293
293
  }
294
294
  export type MockRollupTxBasePublicInputType = {
295
295
  chonk_proof_data: ChonkProofData;
296
- proof: FixedLengthArray<Field, 20000>;
296
+ proof: FixedLengthArray<Field, 16200>;
297
297
  public_inputs: AvmCircuitPublicInputs;
298
298
  }
299
299
 
300
300
  export type MockRollupTxBasePublicReturnType = RollupPublicInputs;
301
301
 
302
302
 
303
- export async function MockRollupTxBasePublic(chonk_proof_data: ChonkProofData, proof: FixedLengthArray<Field, 20000>, public_inputs: AvmCircuitPublicInputs, MockRollupTxBasePublic_circuit: CompiledCircuit, foreignCallHandler?: ForeignCallHandler): Promise<RollupPublicInputs> {
303
+ export async function MockRollupTxBasePublic(chonk_proof_data: ChonkProofData, proof: FixedLengthArray<Field, 16200>, public_inputs: AvmCircuitPublicInputs, MockRollupTxBasePublic_circuit: CompiledCircuit, foreignCallHandler?: ForeignCallHandler): Promise<RollupPublicInputs> {
304
304
  const program = new Noir(MockRollupTxBasePublic_circuit);
305
305
  const args: InputMap = { chonk_proof_data, proof, public_inputs };
306
306
  const { returnValue } = await program.execute(args, foreignCallHandler);
Binary file