diff --git a/yarn-project/pxe/package.json b/yarn-project/pxe/package.json index 13813f40674..44400ab24ee 100644 --- a/yarn-project/pxe/package.json +++ b/yarn-project/pxe/package.json @@ -38,6 +38,7 @@ "@aztec/foundation": "workspace:^", "@aztec/key-store": "workspace:^", "@aztec/noir-compiler": "workspace:^", + "@aztec/noir-private-kernel": "workspace:^", "@aztec/types": "workspace:^", "koa": "^2.14.2", "koa-router": "^12.0.0", diff --git a/yarn-project/pxe/src/kernel_prover/proof_creator.ts b/yarn-project/pxe/src/kernel_prover/proof_creator.ts index 016018ba808..37ebbe148c0 100644 --- a/yarn-project/pxe/src/kernel_prover/proof_creator.ts +++ b/yarn-project/pxe/src/kernel_prover/proof_creator.ts @@ -9,7 +9,6 @@ import { PrivateKernelInputsOrdering, Proof, makeEmptyProof, - privateKernelSimInit, privateKernelSimInner, privateKernelSimOrdering, } from '@aztec/circuits.js'; @@ -17,6 +16,7 @@ import { siloCommitment } from '@aztec/circuits.js/abis'; import { Fr } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; import { elapsed } from '@aztec/foundation/timer'; +import { executeInit } from '@aztec/noir-private-kernel'; /** * Represents the output of the proof creation process for init and inner private kernel circuit. @@ -108,11 +108,8 @@ export class KernelProofCreator implements ProofCreator { } public async createProofInit(privateInputs: PrivateKernelInputsInit): Promise { - const wasm = await CircuitsWasm.get(); - const [time, result] = await elapsed(() => privateKernelSimInit(wasm, privateInputs)); - if (result instanceof CircuitError) { - throw new CircuitError(result.code, result.message); - } + const [time, result] = await elapsed(() => executeInit(privateInputs)); + this.log(`Simulated private kernel init`, { eventName: 'circuit-simulation', circuitName: 'private-kernel-init', diff --git a/yarn-project/pxe/tsconfig.json b/yarn-project/pxe/tsconfig.json index 1190999ce69..c5af1a60b7c 100644 --- a/yarn-project/pxe/tsconfig.json +++ b/yarn-project/pxe/tsconfig.json @@ -24,6 +24,9 @@ { "path": "../noir-compiler" }, + { + "path": "../noir-private-kernel" + }, { "path": "../types" } diff --git a/yarn-project/yarn.lock b/yarn-project/yarn.lock index c67ac61c1ff..7c54ff2ad06 100644 --- a/yarn-project/yarn.lock +++ b/yarn-project/yarn.lock @@ -615,7 +615,7 @@ __metadata: languageName: unknown linkType: soft -"@aztec/noir-private-kernel@workspace:noir-private-kernel": +"@aztec/noir-private-kernel@workspace:^, @aztec/noir-private-kernel@workspace:noir-private-kernel": version: 0.0.0-use.local resolution: "@aztec/noir-private-kernel@workspace:noir-private-kernel" dependencies: @@ -720,6 +720,7 @@ __metadata: "@aztec/foundation": "workspace:^" "@aztec/key-store": "workspace:^" "@aztec/noir-compiler": "workspace:^" + "@aztec/noir-private-kernel": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 "@rushstack/eslint-patch": ^1.1.4