From 0666fc77c890bc71fe1414f21d8c266bd9439233 Mon Sep 17 00:00:00 2001 From: Ilyas Ridhuan Date: Fri, 12 Apr 2024 13:23:02 +0100 Subject: [PATCH] fix: bump crs to handle range checks (#5724) Please read [contributing guidelines](CONTRIBUTING.md) and remove this line. --- barretenberg/cpp/src/barretenberg/bb/main.cpp | 4 ++-- yarn-project/simulator/src/public/avm_executor.test.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/bb/main.cpp b/barretenberg/cpp/src/barretenberg/bb/main.cpp index bab9d9dfae1..8c1eed36e37 100644 --- a/barretenberg/cpp/src/barretenberg/bb/main.cpp +++ b/barretenberg/cpp/src/barretenberg/bb/main.cpp @@ -531,8 +531,8 @@ void avm_prove(const std::filesystem::path& bytecode_path, } std::vector const call_data = many_from_buffer(call_data_bytes); - // Hardcoded circuit size for now - init_bn254_crs(256); + // Hardcoded circuit size for now, with enough to support 16-bit range checks + init_bn254_crs(1 << 17); // Prove execution and return vk auto const [verification_key, proof] = avm_trace::Execution::prove(avm_bytecode, call_data); diff --git a/yarn-project/simulator/src/public/avm_executor.test.ts b/yarn-project/simulator/src/public/avm_executor.test.ts index cf2c254e3ac..fa7a20d423b 100644 --- a/yarn-project/simulator/src/public/avm_executor.test.ts +++ b/yarn-project/simulator/src/public/avm_executor.test.ts @@ -67,5 +67,5 @@ describe('AVM WitGen and Proof Generation', () => { const [proof, vk] = await executor.getAvmProof(execution); const valid = await executor.verifyAvmProof(vk, proof); expect(valid).toBe(true); - }); + }, 60 * 1000); // 60 seconds should be enough to generate the proof with 16-bit range checks });