From 178f0ccda70e2f3fad522a51eefc6351a5b13517 Mon Sep 17 00:00:00 2001 From: kevaundray Date: Sat, 26 Aug 2023 18:59:37 +0000 Subject: [PATCH 1/2] use 2^19 for NodeJS CLI --- circuits/cpp/barretenberg/ts/src/main.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/circuits/cpp/barretenberg/ts/src/main.ts b/circuits/cpp/barretenberg/ts/src/main.ts index eecda39aa0aa..9740eec78ec1 100755 --- a/circuits/cpp/barretenberg/ts/src/main.ts +++ b/circuits/cpp/barretenberg/ts/src/main.ts @@ -8,8 +8,13 @@ import { Command } from 'commander'; createDebug.log = console.error.bind(console); const debug = createDebug('bb.js'); -// Maximum we support natively. It is 2^19 for browser. -const MAX_CIRCUIT_SIZE = 2 ** 23; +// Maximum we support in node and the browser is 2^19. +// This is because both node and browser use barretenberg.wasm. +// +// This is not a restriction in the bb binary and one should be +// aware of this discrepancy, when creating proofs in bb versus +// creating the same proofs in the node CLI. +const MAX_CIRCUIT_SIZE = 2 ** 19; function getBytecode(bytecodePath: string) { const encodedCircuit = readFileSync(bytecodePath, 'utf-8'); From 7a43701e71bf6280bfac4454c083b12b3d0f1391 Mon Sep 17 00:00:00 2001 From: kevaundray Date: Sat, 26 Aug 2023 19:13:57 +0000 Subject: [PATCH 2/2] prettier --- circuits/cpp/barretenberg/ts/src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circuits/cpp/barretenberg/ts/src/main.ts b/circuits/cpp/barretenberg/ts/src/main.ts index 9740eec78ec1..87f737735927 100755 --- a/circuits/cpp/barretenberg/ts/src/main.ts +++ b/circuits/cpp/barretenberg/ts/src/main.ts @@ -12,7 +12,7 @@ const debug = createDebug('bb.js'); // This is because both node and browser use barretenberg.wasm. // // This is not a restriction in the bb binary and one should be -// aware of this discrepancy, when creating proofs in bb versus +// aware of this discrepancy, when creating proofs in bb versus // creating the same proofs in the node CLI. const MAX_CIRCUIT_SIZE = 2 ** 19;