diff --git a/yarn-project/noir-bb-bench/.gitignore b/yarn-project/noir-bb-bench/.gitignore index e47407045af3..6ba00775a237 100644 --- a/yarn-project/noir-bb-bench/.gitignore +++ b/yarn-project/noir-bb-bench/.gitignore @@ -1,3 +1,4 @@ artifacts/ circuits/**/proofs/* circuits/**/Prover.toml +src/types/index.ts diff --git a/yarn-project/noir-bb-bench/package.json b/yarn-project/noir-bb-bench/package.json index dd644431dc5e..1776d8a560af 100644 --- a/yarn-project/noir-bb-bench/package.json +++ b/yarn-project/noir-bb-bench/package.json @@ -11,7 +11,7 @@ "./package.local.json" ], "scripts": { - "build": "yarn clean && yarn generate && yarn build:app", + "build": "yarn clean && yarn generate && yarn build:ts", "clean": "rm -rf ./dest .tsbuildinfo src/types artifacts", "generate": "yarn generate:artifacts && yarn generate:code", "generate:artifacts": "mkdir -p artifacts/keys && ls circuits | xargs -n 1 ./generate_artifacts.sh", diff --git a/yarn-project/noir-bb-bench/package.local.json b/yarn-project/noir-bb-bench/package.local.json index 599c72fd4d9b..754f84ec0b03 100644 --- a/yarn-project/noir-bb-bench/package.local.json +++ b/yarn-project/noir-bb-bench/package.local.json @@ -1,8 +1,8 @@ { "scripts": { - "build": "yarn clean && yarn generate && yarn build:app", + "build": "yarn clean && yarn generate && yarn build:ts", "clean": "rm -rf ./dest .tsbuildinfo src/types artifacts", - "build:app": "tsc -b && rm -rf dest && webpack && cp ../../barretenberg/favicon.ico dest" + "build:ts": "tsc -b" }, "files": ["dest", "src", "artifacts", "!*.test.*"] } diff --git a/yarn-project/noir-bb-bench/src/index.ts b/yarn-project/noir-bb-bench/src/index.ts index 0930819589ee..b14877a23d22 100644 --- a/yarn-project/noir-bb-bench/src/index.ts +++ b/yarn-project/noir-bb-bench/src/index.ts @@ -3,6 +3,7 @@ import { type ForeignCallOutput, Noir } from '@noir-lang/noir_js'; import { type InputValue } from '@noir-lang/noirc_abi'; import createDebug from 'debug'; +// these files are generated import Circuit1 from '../artifacts/circuit_1.json' assert { type: 'json' }; import Circuit2 from '../artifacts/circuit_2.json' assert { type: 'json' }; import Vk1 from '../artifacts/keys/circuit_1.vk.data.json' assert { type: 'json' }; diff --git a/yarn-project/noir-bb-bench/src/types/index.ts b/yarn-project/noir-bb-bench/src/types/index.ts deleted file mode 100644 index eaeae0b101ee..000000000000 --- a/yarn-project/noir-bb-bench/src/types/index.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* Autogenerated file, do not edit! */ - -/* eslint-disable */ -import { CompiledCircuit, ForeignCallHandler, InputMap, Noir } from '@noir-lang/noir_js'; - -export { ForeignCallHandler } from '@noir-lang/noir_js'; - -export type FixedLengthArray = L extends 0 ? never[] : T[] & { length: L }; -export type Field = string; - -export type Circuit_1InputType = { - x: Field; - y: Field; -}; - -export async function Circuit_1( - x: Field, - y: Field, - Circuit_1_circuit: CompiledCircuit, - foreignCallHandler?: ForeignCallHandler, -): Promise { - const program = new Noir(Circuit_1_circuit); - const args: InputMap = { x, y }; - const { returnValue } = await program.execute(args, foreignCallHandler); - return returnValue as null; -} -export type Circuit_2InputType = { - verification_key: FixedLengthArray; - proof: FixedLengthArray; - public_inputs: FixedLengthArray; - key_hash: Field; - z: Field; -}; - -export async function Circuit_2( - verification_key: FixedLengthArray, - proof: FixedLengthArray, - public_inputs: FixedLengthArray, - key_hash: Field, - z: Field, - Circuit_2_circuit: CompiledCircuit, - foreignCallHandler?: ForeignCallHandler, -): Promise { - const program = new Noir(Circuit_2_circuit); - const args: InputMap = { verification_key, proof, public_inputs, key_hash, z }; - const { returnValue } = await program.execute(args, foreignCallHandler); - return returnValue as null; -}