From 5c8b20cf4de4785f40ae2e39cef6ceae67f19deb Mon Sep 17 00:00:00 2001 From: ludamad Date: Tue, 2 May 2023 17:02:07 -0400 Subject: [PATCH 1/7] fix: post-merge aztec3-temporary --- circuits/cpp/CMakeLists.txt | 6 ++++++ circuits/cpp/barretenberg | 2 +- circuits/cpp/cmake/barretenberg.cmake | 21 ++++++++++++++++--- .../cpp/src/aztec3/utils/types/convert.hpp | 4 ++-- 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/circuits/cpp/CMakeLists.txt b/circuits/cpp/CMakeLists.txt index 43b0113c1ec..7cb0206a649 100644 --- a/circuits/cpp/CMakeLists.txt +++ b/circuits/cpp/CMakeLists.txt @@ -83,6 +83,12 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "wasm32") set(BENCHMARKS OFF) set(DISABLE_TBB 1) add_compile_definitions(_WASI_EMULATED_PROCESS_CLOCKS=1) + # TODO resolve how we can all get on the same generator counts + # Wasm (currently) takes less generators + set(CMAKE_BBERG_CXX_FLAGS "-DBARRETENBERG_CRYPTO_GENERATOR_PARAMETERS_HACK=64,16,32,64") +else() + # Native can take more generators + set(CMAKE_BBERG_CXX_FLAGS "-DBARRETENBERG_CRYPTO_GENERATOR_PARAMETERS_HACK=2048,32,128,2048") endif() set(CMAKE_C_STANDARD 11) diff --git a/circuits/cpp/barretenberg b/circuits/cpp/barretenberg index 27f5f8bb9aa..cc45c9c5602 160000 --- a/circuits/cpp/barretenberg +++ b/circuits/cpp/barretenberg @@ -1 +1 @@ -Subproject commit 27f5f8bb9aa41c4099f520e7cb25e448c189657e +Subproject commit cc45c9c560233eecd542124b662668718a9a6233 diff --git a/circuits/cpp/cmake/barretenberg.cmake b/circuits/cpp/cmake/barretenberg.cmake index 5878804ddca..7b46d5177f8 100644 --- a/circuits/cpp/cmake/barretenberg.cmake +++ b/circuits/cpp/cmake/barretenberg.cmake @@ -27,16 +27,31 @@ endif() # "Enabling this option forces the build step to always be run. This can be the easiest way to robustly # ensure that the external project's own build dependencies are evaluated rather than relying on the # default success timestamp-based method." - https://cmake.org/cmake/help/latest/module/ExternalProject.html + ExternalProject_Add(Barretenberg SOURCE_DIR ${BBERG_DIR} BUILD_IN_SOURCE TRUE BUILD_ALWAYS TRUE UPDATE_COMMAND "" INSTALL_COMMAND "" - CONFIGURE_COMMAND ${CMAKE_COMMAND} --preset ${CMAKE_BBERG_PRESET} -DSERIALIZE_CANARY=${SERIALIZE_CANARY} -DENABLE_ASAN=${ENABLE_ASAN} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - BUILD_COMMAND ${CMAKE_COMMAND} --build --preset ${CMAKE_BBERG_PRESET} ${BBERG_TARGETS} + CONFIGURE_COMMAND + ${CMAKE_COMMAND} + --preset ${CMAKE_BBERG_PRESET} + -DCMAKE_CXX_FLAGS=${CMAKE_BBERG_CXX_FLAGS} + -DSERIALIZE_CANARY=${SERIALIZE_CANARY} + -DMULTITHREADING=${MULTITHREADING} + -DENABLE_ASAN=${ENABLE_ASAN} + -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} + BUILD_COMMAND + ${CMAKE_COMMAND} + --build + --preset ${CMAKE_BBERG_PRESET} + ${BBERG_TARGETS} # byproducts needed by ninja generator (not needed by make) - BUILD_BYPRODUCTS ${BBERG_BUILD_DIR}/lib/libbarretenberg.a ${BBERG_BUILD_DIR}/lib/libenv.a) + BUILD_BYPRODUCTS + ${BBERG_BUILD_DIR}/lib/libbarretenberg.a + ${BBERG_BUILD_DIR}/lib/libenv.a +) include_directories(${BBERG_DIR}/src) diff --git a/circuits/cpp/src/aztec3/utils/types/convert.hpp b/circuits/cpp/src/aztec3/utils/types/convert.hpp index 32658083df9..6f3c8ef43d0 100644 --- a/circuits/cpp/src/aztec3/utils/types/convert.hpp +++ b/circuits/cpp/src/aztec3/utils/types/convert.hpp @@ -180,7 +180,7 @@ template typename NT::ecdsa_signature to_nt(typename CT @@ -252,4 +252,4 @@ template std::array Date: Wed, 3 May 2023 14:07:37 -0400 Subject: [PATCH 2/7] tests and fixes --- .../cpp/src/aztec3/circuits/abis/c_bind.cpp | 18 +++ .../aztec3/circuits/kernel/public/common.cpp | 4 + .../aztec3/circuits/kernel/public/common.hpp | 20 +++ ..._kernel_circuit_public_previous_kernel.cpp | 2 +- .../cpp/src/aztec3/utils/dummy_composer.hpp | 3 + yarn-project/circuits.js/package.json | 2 +- .../src/kernel/public_kernel.test.ts | 3 + .../kernel/__snapshots__/index.test.ts.snap | 146 +++++++++++++++++- .../src/structs/kernel/index.test.ts | 18 +++ .../circuits.js/src/structs/shared.ts | 7 +- .../circuits.js/src/tests/factories.ts | 2 +- 11 files changed, 217 insertions(+), 8 deletions(-) diff --git a/circuits/cpp/src/aztec3/circuits/abis/c_bind.cpp b/circuits/cpp/src/aztec3/circuits/abis/c_bind.cpp index 195b180c09f..2c5ef06956e 100644 --- a/circuits/cpp/src/aztec3/circuits/abis/c_bind.cpp +++ b/circuits/cpp/src/aztec3/circuits/abis/c_bind.cpp @@ -15,14 +15,17 @@ #include "rollup/root/root_rollup_inputs.hpp" #include "rollup/root/root_rollup_public_inputs.hpp" +#include "aztec3/circuits/abis/combined_accumulated_data.hpp" #include "aztec3/circuits/abis/function_data.hpp" #include "aztec3/circuits/abis/function_leaf_preimage.hpp" #include "aztec3/circuits/abis/new_contract_data.hpp" +#include "aztec3/circuits/abis/signed_tx_request.hpp" #include #include #include #include +#include "barretenberg/crypto/ecdsa/ecdsa.hpp" #include "barretenberg/srs/reference_string/mem_reference_string.hpp" #include #include @@ -414,6 +417,21 @@ WASM_EXPORT const char* abis__test_roundtrip_reserialize_root_rollup_public_inpu return as_serialized_output>(rollup_inputs_buf, size); } +WASM_EXPORT const char* abis__test_roundtrip_serialize_combined_accumulated_data(uint8_t const* input, uint32_t* size) +{ + return as_string_output>(input, size); +} + +WASM_EXPORT const char* abis__test_roundtrip_serialize_signature(uint8_t const* input, uint32_t* size) +{ + return as_string_output(input, size); +} + +WASM_EXPORT const char* abis__test_roundtrip_serialize_signed_tx_request(uint8_t const* input, uint32_t* size) +{ + return as_string_output>(input, size); +} + WASM_EXPORT const char* abis__test_roundtrip_serialize_private_kernel_inputs(uint8_t const* input, uint32_t* size) { return as_string_output>(input, size); diff --git a/circuits/cpp/src/aztec3/circuits/kernel/public/common.cpp b/circuits/cpp/src/aztec3/circuits/kernel/public/common.cpp index c9109347882..db73d5b5910 100644 --- a/circuits/cpp/src/aztec3/circuits/kernel/public/common.cpp +++ b/circuits/cpp/src/aztec3/circuits/kernel/public/common.cpp @@ -39,14 +39,18 @@ void validate_this_public_call_hash(DummyComposer& composer, { // Pops the current function execution from the stack and validates it against the call stack item + info(21); // TODO: this logic might need to change to accommodate the weird edge 3 initial txs (the 'main' tx, the 'fee' tx, // and the 'gas rebate' tx). const auto popped_public_call_hash = array_pop(public_inputs.end.public_call_stack); + info(22); const auto calculated_this_public_call_hash = public_kernel_inputs.public_call.call_stack_item.hash(); + info(23); composer.do_assert( popped_public_call_hash == calculated_this_public_call_hash, "calculated public_call_hash does not match provided public_call_hash at the top of the call stack", CircuitErrorCode::PUBLIC_KERNEL__CALCULATED_PRIVATE_CALL_HASH_AND_PROVIDED_PRIVATE_CALL_HASH_MISMATCH); + info(24); }; } // namespace aztec3::circuits::kernel::public_kernel \ No newline at end of file diff --git a/circuits/cpp/src/aztec3/circuits/kernel/public/common.hpp b/circuits/cpp/src/aztec3/circuits/kernel/public/common.hpp index 59312ea30a3..26953d0a5bb 100644 --- a/circuits/cpp/src/aztec3/circuits/kernel/public/common.hpp +++ b/circuits/cpp/src/aztec3/circuits/kernel/public/common.hpp @@ -41,9 +41,12 @@ namespace aztec3::circuits::kernel::public_kernel { template void common_validate_call_stack(DummyComposer& composer, KernelInput const& public_kernel_inputs) { + info(31); // Ensures that the stack of pre-images corresponds to the call stack auto& stack = public_kernel_inputs.public_call.call_stack_item.public_inputs.public_call_stack; + info(32); auto& preimages = public_kernel_inputs.public_call.public_call_stack_preimages; + info(33); // grab our contract address, our storage contract address and our portal contract address to verify // child executions in the case of delegate call types @@ -54,6 +57,10 @@ void common_validate_call_stack(DummyComposer& composer, KernelInput const& publ auto our_portal_contract_address = public_kernel_inputs.public_call.call_stack_item.public_inputs.call_context.portal_contract_address; + composer.do_assert(hash == calculated_hash, + format("public_call_stack[", i, "] = ", hash, "; does not reconcile"), + CircuitErrorCode::PUBLIC_KERNEL__PUBLIC_CALL_STACK_MISMATCH); + info(34); for (size_t i = 0; i < stack.size(); ++i) { const auto& hash = stack[i]; const auto& preimage = preimages[i]; @@ -69,6 +76,7 @@ void common_validate_call_stack(DummyComposer& composer, KernelInput const& publ format("public_call_stack[", i, "] = ", hash, "; does not reconcile"), CircuitErrorCode::PUBLIC_KERNEL__PUBLIC_CALL_STACK_MISMATCH); + info(35); // here we validate the msg sender for each call on the stack // we need to consider regular vs delegate calls const auto preimage_msg_sender = preimage.public_inputs.call_context.msg_sender; @@ -83,6 +91,7 @@ void common_validate_call_stack(DummyComposer& composer, KernelInput const& publ "; does not reconcile"), CircuitErrorCode::PUBLIC_KERNEL__PUBLIC_CALL_STACK_INVALID_MSG_SENDER); + info(36); // here we validate the storage address for each call on the stack // we need to consider regular vs delegate calls const auto preimage_storage_address = preimage.public_inputs.call_context.storage_contract_address; @@ -97,6 +106,7 @@ void common_validate_call_stack(DummyComposer& composer, KernelInput const& publ "; does not reconcile"), CircuitErrorCode::PUBLIC_KERNEL__PUBLIC_CALL_STACK_INVALID_STORAGE_ADDRESS); + info(37); // if it is a delegate call then we check that the portal contract in the pre image is our portal contract const auto preimage_portal_address = preimage.public_inputs.call_context.portal_contract_address; const auto expected_portal_address = our_portal_contract_address; @@ -110,6 +120,7 @@ void common_validate_call_stack(DummyComposer& composer, KernelInput const& publ "; does not reconcile"), CircuitErrorCode::PUBLIC_KERNEL__PUBLIC_CALL_STACK_INVALID_PORTAL_ADDRESS); + info(38); const auto num_state_transitions = array_length(preimage.public_inputs.state_transitions); composer.do_assert(!is_static_call || num_state_transitions == 0, format("call_state_transitions[", i, "] should be empty"), @@ -126,20 +137,29 @@ void common_validate_call_stack(DummyComposer& composer, KernelInput const& publ template void common_validate_call_context(DummyComposer& composer, KernelInput const& public_kernel_inputs) { + info(11); const auto& call_stack_item = public_kernel_inputs.public_call.call_stack_item; + info(12); const auto is_delegate_call = call_stack_item.public_inputs.call_context.is_delegate_call; + info(13); const auto is_static_call = call_stack_item.public_inputs.call_context.is_static_call; + info(14); const auto contract_address = call_stack_item.contract_address; + info(15); const auto storage_contract_address = call_stack_item.public_inputs.call_context.storage_contract_address; + info(16); const auto state_transitions_length = array_length(call_stack_item.public_inputs.state_transitions); + info(17); composer.do_assert(!is_delegate_call || contract_address != storage_contract_address, std::string("call_context contract_address == storage_contract_address on delegate_call"), CircuitErrorCode::PUBLIC_KERNEL__CALL_CONTEXT_INVALID_STORAGE_ADDRESS_FOR_DELEGATE_CALL); + info(18); composer.do_assert(!is_static_call || state_transitions_length == 0, std::string("call_context state transitions found on static call"), CircuitErrorCode::PUBLIC_KERNEL__CALL_CONTEXT_TRANSITIONS_PROHIBITED_FOR_STATIC_CALL); + info(19); }; /** diff --git a/circuits/cpp/src/aztec3/circuits/kernel/public/native_public_kernel_circuit_public_previous_kernel.cpp b/circuits/cpp/src/aztec3/circuits/kernel/public/native_public_kernel_circuit_public_previous_kernel.cpp index 4fb2d5ea6d8..93cf5b89de1 100644 --- a/circuits/cpp/src/aztec3/circuits/kernel/public/native_public_kernel_circuit_public_previous_kernel.cpp +++ b/circuits/cpp/src/aztec3/circuits/kernel/public/native_public_kernel_circuit_public_previous_kernel.cpp @@ -63,7 +63,7 @@ KernelCircuitPublicInputs native_public_kernel_circuit_public_previous_kerne // validate the kernel execution common to all invocation circumstances common_validate_kernel_execution(composer, public_kernel_inputs); - // vallidate our public call hash + // validate our public call hash validate_this_public_call_hash(composer, public_kernel_inputs, public_inputs); // update the public end state of the circuit diff --git a/circuits/cpp/src/aztec3/utils/dummy_composer.hpp b/circuits/cpp/src/aztec3/utils/dummy_composer.hpp index ebc306387f2..edb19a1bf62 100644 --- a/circuits/cpp/src/aztec3/utils/dummy_composer.hpp +++ b/circuits/cpp/src/aztec3/utils/dummy_composer.hpp @@ -15,6 +15,9 @@ class DummyComposer { void do_assert(bool const& assertion, std::string const& msg, CircuitErrorCode error_code) { if (!assertion) { +#ifdef __wasm__ + info("Error(", error_code, "): ", msg); +#endif failure_msgs.push_back(CircuitError{ error_code, msg }); } } diff --git a/yarn-project/circuits.js/package.json b/yarn-project/circuits.js/package.json index 1fc22c15955..f1bacbd62e4 100644 --- a/yarn-project/circuits.js/package.json +++ b/yarn-project/circuits.js/package.json @@ -22,7 +22,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" }, "inherits": [ "../package.common.json" diff --git a/yarn-project/circuits.js/src/kernel/public_kernel.test.ts b/yarn-project/circuits.js/src/kernel/public_kernel.test.ts index 4250cb4bdd3..54d29675eed 100644 --- a/yarn-project/circuits.js/src/kernel/public_kernel.test.ts +++ b/yarn-project/circuits.js/src/kernel/public_kernel.test.ts @@ -4,6 +4,9 @@ import { makePublicKernelInputsNoKernelInput, makePublicKernelInputsWithEmptyOut describe('kernel/public_kernel', () => { it('simulates public kernel circuit with previous public kernel', async function () { const input = makePublicKernelInputsWithEmptyOutput(); + // Fix validity + input.publicCallData.callStackItem.functionData.isConstructor = false; + input.publicCallData.callStackItem.functionData.isPrivate = false; input.previousKernel.publicInputs.isPrivateKernel = false; const result = await simulatePublicKernelCircuit(input); expect(result).toBeDefined(); diff --git a/yarn-project/circuits.js/src/structs/kernel/__snapshots__/index.test.ts.snap b/yarn-project/circuits.js/src/structs/kernel/__snapshots__/index.test.ts.snap index 99e458bb043..1254c2ec7b6 100644 --- a/yarn-project/circuits.js/src/structs/kernel/__snapshots__/index.test.ts.snap +++ b/yarn-project/circuits.js/src/structs/kernel/__snapshots__/index.test.ts.snap @@ -1,5 +1,147 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`structs/kernel serializes and prints CombinedAccumulatedData 1`] = ` +"aggregation_object: +P0: { 0x1, 0x2 } +P1: { 0x101, 0x102 } +public_inputs: [ + 0x3 + 0x4 + 0x5 + 0x6 +] +proof_witness_indices: [ 7 8 9 10 11 12 ] +has_data: 0 + +private_call_count: 0xd +public_call_count: 0xe +new_commitments: +[ 0x101 0x102 0x103 0x104 ] +new_nullifiers: +[ 0x201 0x202 0x203 0x204 ] +private_call_stack: +[ 0x301 0x302 0x303 0x304 0x305 0x306 0x307 0x308 ] +public_call_stack: +[ 0x401 0x402 0x403 0x404 0x405 0x406 0x407 0x408 ] +new_l2_to_l1_msgs: +[ 0x501 0x502 0x503 0x504 ] +new_contracts: +[ contract_address: 0x601 +portal_contract_address: 0x202020202020202020202020202020202020202 +function_tree_root: 0x603 + ] +optionally_revealed_data: +[ call_stack_item_hash: 0x701 +function_data: +function_selector: 702 +is_private: 1 +is_constructor: 1 + +emitted_events: +[ 0x801 0x802 0x803 0x804 ] +vk_hash: 0x703 +portal_contract_address: 0x404040404040404040404040404040404040404 +pay_fee_from_l1: 1 +pay_fee_from_public_l2: 0 +called_from_l1: 1 +called_from_public_l2: 0 + call_stack_item_hash: 0x702 +function_data: +function_selector: 703 +is_private: 1 +is_constructor: 1 + +emitted_events: +[ 0x802 0x803 0x804 0x805 ] +vk_hash: 0x704 +portal_contract_address: 0x505050505050505050505050505050505050505 +pay_fee_from_l1: 1 +pay_fee_from_public_l2: 0 +called_from_l1: 1 +called_from_public_l2: 0 + call_stack_item_hash: 0x703 +function_data: +function_selector: 704 +is_private: 1 +is_constructor: 1 + +emitted_events: +[ 0x803 0x804 0x805 0x806 ] +vk_hash: 0x705 +portal_contract_address: 0x606060606060606060606060606060606060606 +pay_fee_from_l1: 1 +pay_fee_from_public_l2: 0 +called_from_l1: 1 +called_from_public_l2: 0 + call_stack_item_hash: 0x704 +function_data: +function_selector: 705 +is_private: 1 +is_constructor: 1 + +emitted_events: +[ 0x804 0x805 0x806 0x807 ] +vk_hash: 0x706 +portal_contract_address: 0x707070707070707070707070707070707070707 +pay_fee_from_l1: 1 +pay_fee_from_public_l2: 0 +called_from_l1: 1 +called_from_public_l2: 0 + ] +state_transitions: +[ leaf_index: 0x801 +old_value: 0x802 +new_value: 0x803 + leaf_index: 0x802 +old_value: 0x803 +new_value: 0x804 + leaf_index: 0x803 +old_value: 0x804 +new_value: 0x805 + leaf_index: 0x804 +old_value: 0x805 +new_value: 0x806 + ] +state_reads: +[ leaf_index: 0x901 +value: 0x902 + leaf_index: 0x902 +value: 0x903 + leaf_index: 0x903 +value: 0x904 + leaf_index: 0x904 +value: 0x905 + ] +" +`; + +exports[`structs/kernel serializes and prints EcdsaSignature 1`] = `"{ 0101010101010101010101010101010101010101010101010101010101010101, 0202020202020202020202020202020202020202020202020202020202020202, 3 }"`; + +exports[`structs/kernel serializes and prints SignedTxRequest 1`] = ` +"tx_request: +from: 0x1 +to: 0x11 +function_data: function_selector: 257 +is_private: 1 +is_constructor: 1 + +args: [ 0x201 0x202 0x203 0x204 0x205 0x206 0x207 0x208 ] +nonce: 0x301 +tx_context: is_fee_payment_tx: 0 +is_rebate_payment_tx: 0 +is_contract_deployment_tx: 1 +contract_deployment_data: +constructor_vk_hash: 0x401 +function_tree_root: 0x402 +contract_address_salt: 0x403 +portal_contract_address: 0x404040404040404040404040404040404040404 + +chain_id: 0x501 + +signature: { 0101010101010101010101010101010101010101010101010101010101010101, 0202020202020202020202020202020202020202020202020202020202020202, 3 } +" +`; + exports[`structs/kernel serializes and prints previous_kernel_data 1`] = ` "public_inputs: end: aggregation_object: @@ -171,7 +313,7 @@ portal_contract_address: 0x404040404040404040404040404040404040404 chain_id: 0x501 -signature: { 0101010101010101010101010101010101010101010101010101010101010101, 0202020202020202020202020202020202020202020202020202020202020202 } +signature: { 0101010101010101010101010101010101010101010101010101010101010101, 0202020202020202020202020202020202020202020202020202020202020202, 3 } previous_kernel: public_inputs: end: @@ -1044,7 +1186,7 @@ portal_contract_address: 0x404040404040404040404040404040404040404 chain_id: 0x501 -signature: { 0101010101010101010101010101010101010101010101010101010101010101, 0202020202020202020202020202020202020202020202020202020202020202 } +signature: { 0101010101010101010101010101010101010101010101010101010101010101, 0202020202020202020202020202020202020202020202020202020202020202, 3 } public_call: call_stack_item: diff --git a/yarn-project/circuits.js/src/structs/kernel/index.test.ts b/yarn-project/circuits.js/src/structs/kernel/index.test.ts index 5189a47177e..dd17dcc2778 100644 --- a/yarn-project/circuits.js/src/structs/kernel/index.test.ts +++ b/yarn-project/circuits.js/src/structs/kernel/index.test.ts @@ -1,10 +1,13 @@ import { expectSerializeToMatchSnapshot } from '../../tests/expectSerialize.js'; +import { makeSignedTxRequest } from '../../tests/factories.js'; +import { makeEcdsaSignature } from '../../tests/factories.js'; import { makePreviousKernelData, makePrivateKernelInputs, makeKernelPublicInputs, makePublicKernelInputsNoKernelInput, makePublicKernelInputs, + makeAccumulatedData, } from '../../tests/factories.js'; describe('structs/kernel', () => { @@ -24,6 +27,21 @@ describe('structs/kernel', () => { ); }); + it(`serializes and prints EcdsaSignature`, async () => { + await expectSerializeToMatchSnapshot(makeEcdsaSignature().toBuffer(), 'abis__test_roundtrip_serialize_signature'); + }); + it(`serializes and prints SignedTxRequest`, async () => { + await expectSerializeToMatchSnapshot( + makeSignedTxRequest().toBuffer(), + 'abis__test_roundtrip_serialize_signed_tx_request', + ); + }); + it(`serializes and prints CombinedAccumulatedData`, async () => { + await expectSerializeToMatchSnapshot( + makeAccumulatedData().toBuffer(), + 'abis__test_roundtrip_serialize_combined_accumulated_data', + ); + }); it(`serializes and prints private_kernel_public_inputs`, async () => { const kernelInputs = makeKernelPublicInputs(); await expectSerializeToMatchSnapshot( diff --git a/yarn-project/circuits.js/src/structs/shared.ts b/yarn-project/circuits.js/src/structs/shared.ts index d753bb179c6..6392296dd3e 100644 --- a/yarn-project/circuits.js/src/structs/shared.ts +++ b/yarn-project/circuits.js/src/structs/shared.ts @@ -57,17 +57,18 @@ export class AffineElement { * @see cpp/barretenberg/cpp/src/barretenberg/crypto/ecdsa/ecdsa.hpp */ export class EcdsaSignature { - constructor(public r: Buffer, public s: Buffer) { + constructor(public r: Buffer, public s: Buffer, public v: Buffer) { assertLength(this, 'r', 32); assertLength(this, 's', 32); + assertLength(this, 'v', 1); } toBuffer() { - return serializeToBuffer(this.r, this.s); + return serializeToBuffer(this.r, this.s, this.v); } public static random() { - return new EcdsaSignature(randomBytes(32), randomBytes(32)); + return new EcdsaSignature(randomBytes(32), randomBytes(32), randomBytes(1)); } } diff --git a/yarn-project/circuits.js/src/tests/factories.ts b/yarn-project/circuits.js/src/tests/factories.ts index 8052374eff6..b8d846e1596 100644 --- a/yarn-project/circuits.js/src/tests/factories.ts +++ b/yarn-project/circuits.js/src/tests/factories.ts @@ -394,7 +394,7 @@ export function makeAztecAddress(seed = 1): AztecAddress { } export function makeEcdsaSignature(seed = 1): EcdsaSignature { - return new EcdsaSignature(Buffer.alloc(32, seed), Buffer.alloc(32, seed + 1)); + return new EcdsaSignature(Buffer.alloc(32, seed), Buffer.alloc(32, seed + 1), Buffer.alloc(1, seed + 2)); } export function makeBaseRollupPublicInputs(seed = 0) { From faf500080e463d8df07eb57b06abc9e0a11234b3 Mon Sep 17 00:00:00 2001 From: ludamad Date: Wed, 3 May 2023 14:11:14 -0400 Subject: [PATCH 3/7] tests and fixes --- circuits/cpp/src/aztec3/circuits/kernel/public/common.hpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/circuits/cpp/src/aztec3/circuits/kernel/public/common.hpp b/circuits/cpp/src/aztec3/circuits/kernel/public/common.hpp index 26953d0a5bb..a571a25efb9 100644 --- a/circuits/cpp/src/aztec3/circuits/kernel/public/common.hpp +++ b/circuits/cpp/src/aztec3/circuits/kernel/public/common.hpp @@ -57,9 +57,6 @@ void common_validate_call_stack(DummyComposer& composer, KernelInput const& publ auto our_portal_contract_address = public_kernel_inputs.public_call.call_stack_item.public_inputs.call_context.portal_contract_address; - composer.do_assert(hash == calculated_hash, - format("public_call_stack[", i, "] = ", hash, "; does not reconcile"), - CircuitErrorCode::PUBLIC_KERNEL__PUBLIC_CALL_STACK_MISMATCH); info(34); for (size_t i = 0; i < stack.size(); ++i) { const auto& hash = stack[i]; From aab8caf7db03ce59f85ca1a24925f510530396cf Mon Sep 17 00:00:00 2001 From: ludamad Date: Wed, 3 May 2023 15:24:08 -0400 Subject: [PATCH 4/7] Fix generator amounts --- circuits/cpp/CMakeLists.txt | 4 ++-- .../aztec3/circuits/kernel/public/common.cpp | 4 ---- .../aztec3/circuits/kernel/public/common.hpp | 17 ----------------- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/circuits/cpp/CMakeLists.txt b/circuits/cpp/CMakeLists.txt index 7cb0206a649..d898b9ce05d 100644 --- a/circuits/cpp/CMakeLists.txt +++ b/circuits/cpp/CMakeLists.txt @@ -85,10 +85,10 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "wasm32") add_compile_definitions(_WASI_EMULATED_PROCESS_CLOCKS=1) # TODO resolve how we can all get on the same generator counts # Wasm (currently) takes less generators - set(CMAKE_BBERG_CXX_FLAGS "-DBARRETENBERG_CRYPTO_GENERATOR_PARAMETERS_HACK=64,16,32,64") + set(CMAKE_BBERG_CXX_FLAGS "-DBARRETENBERG_CRYPTO_GENERATOR_PARAMETERS_HACK=64,32,16,64") else() # Native can take more generators - set(CMAKE_BBERG_CXX_FLAGS "-DBARRETENBERG_CRYPTO_GENERATOR_PARAMETERS_HACK=2048,32,128,2048") + set(CMAKE_BBERG_CXX_FLAGS "-DBARRETENBERG_CRYPTO_GENERATOR_PARAMETERS_HACK=2048,128,32,2048") endif() set(CMAKE_C_STANDARD 11) diff --git a/circuits/cpp/src/aztec3/circuits/kernel/public/common.cpp b/circuits/cpp/src/aztec3/circuits/kernel/public/common.cpp index db73d5b5910..c9109347882 100644 --- a/circuits/cpp/src/aztec3/circuits/kernel/public/common.cpp +++ b/circuits/cpp/src/aztec3/circuits/kernel/public/common.cpp @@ -39,18 +39,14 @@ void validate_this_public_call_hash(DummyComposer& composer, { // Pops the current function execution from the stack and validates it against the call stack item - info(21); // TODO: this logic might need to change to accommodate the weird edge 3 initial txs (the 'main' tx, the 'fee' tx, // and the 'gas rebate' tx). const auto popped_public_call_hash = array_pop(public_inputs.end.public_call_stack); - info(22); const auto calculated_this_public_call_hash = public_kernel_inputs.public_call.call_stack_item.hash(); - info(23); composer.do_assert( popped_public_call_hash == calculated_this_public_call_hash, "calculated public_call_hash does not match provided public_call_hash at the top of the call stack", CircuitErrorCode::PUBLIC_KERNEL__CALCULATED_PRIVATE_CALL_HASH_AND_PROVIDED_PRIVATE_CALL_HASH_MISMATCH); - info(24); }; } // namespace aztec3::circuits::kernel::public_kernel \ No newline at end of file diff --git a/circuits/cpp/src/aztec3/circuits/kernel/public/common.hpp b/circuits/cpp/src/aztec3/circuits/kernel/public/common.hpp index a571a25efb9..59312ea30a3 100644 --- a/circuits/cpp/src/aztec3/circuits/kernel/public/common.hpp +++ b/circuits/cpp/src/aztec3/circuits/kernel/public/common.hpp @@ -41,12 +41,9 @@ namespace aztec3::circuits::kernel::public_kernel { template void common_validate_call_stack(DummyComposer& composer, KernelInput const& public_kernel_inputs) { - info(31); // Ensures that the stack of pre-images corresponds to the call stack auto& stack = public_kernel_inputs.public_call.call_stack_item.public_inputs.public_call_stack; - info(32); auto& preimages = public_kernel_inputs.public_call.public_call_stack_preimages; - info(33); // grab our contract address, our storage contract address and our portal contract address to verify // child executions in the case of delegate call types @@ -57,7 +54,6 @@ void common_validate_call_stack(DummyComposer& composer, KernelInput const& publ auto our_portal_contract_address = public_kernel_inputs.public_call.call_stack_item.public_inputs.call_context.portal_contract_address; - info(34); for (size_t i = 0; i < stack.size(); ++i) { const auto& hash = stack[i]; const auto& preimage = preimages[i]; @@ -73,7 +69,6 @@ void common_validate_call_stack(DummyComposer& composer, KernelInput const& publ format("public_call_stack[", i, "] = ", hash, "; does not reconcile"), CircuitErrorCode::PUBLIC_KERNEL__PUBLIC_CALL_STACK_MISMATCH); - info(35); // here we validate the msg sender for each call on the stack // we need to consider regular vs delegate calls const auto preimage_msg_sender = preimage.public_inputs.call_context.msg_sender; @@ -88,7 +83,6 @@ void common_validate_call_stack(DummyComposer& composer, KernelInput const& publ "; does not reconcile"), CircuitErrorCode::PUBLIC_KERNEL__PUBLIC_CALL_STACK_INVALID_MSG_SENDER); - info(36); // here we validate the storage address for each call on the stack // we need to consider regular vs delegate calls const auto preimage_storage_address = preimage.public_inputs.call_context.storage_contract_address; @@ -103,7 +97,6 @@ void common_validate_call_stack(DummyComposer& composer, KernelInput const& publ "; does not reconcile"), CircuitErrorCode::PUBLIC_KERNEL__PUBLIC_CALL_STACK_INVALID_STORAGE_ADDRESS); - info(37); // if it is a delegate call then we check that the portal contract in the pre image is our portal contract const auto preimage_portal_address = preimage.public_inputs.call_context.portal_contract_address; const auto expected_portal_address = our_portal_contract_address; @@ -117,7 +110,6 @@ void common_validate_call_stack(DummyComposer& composer, KernelInput const& publ "; does not reconcile"), CircuitErrorCode::PUBLIC_KERNEL__PUBLIC_CALL_STACK_INVALID_PORTAL_ADDRESS); - info(38); const auto num_state_transitions = array_length(preimage.public_inputs.state_transitions); composer.do_assert(!is_static_call || num_state_transitions == 0, format("call_state_transitions[", i, "] should be empty"), @@ -134,29 +126,20 @@ void common_validate_call_stack(DummyComposer& composer, KernelInput const& publ template void common_validate_call_context(DummyComposer& composer, KernelInput const& public_kernel_inputs) { - info(11); const auto& call_stack_item = public_kernel_inputs.public_call.call_stack_item; - info(12); const auto is_delegate_call = call_stack_item.public_inputs.call_context.is_delegate_call; - info(13); const auto is_static_call = call_stack_item.public_inputs.call_context.is_static_call; - info(14); const auto contract_address = call_stack_item.contract_address; - info(15); const auto storage_contract_address = call_stack_item.public_inputs.call_context.storage_contract_address; - info(16); const auto state_transitions_length = array_length(call_stack_item.public_inputs.state_transitions); - info(17); composer.do_assert(!is_delegate_call || contract_address != storage_contract_address, std::string("call_context contract_address == storage_contract_address on delegate_call"), CircuitErrorCode::PUBLIC_KERNEL__CALL_CONTEXT_INVALID_STORAGE_ADDRESS_FOR_DELEGATE_CALL); - info(18); composer.do_assert(!is_static_call || state_transitions_length == 0, std::string("call_context state transitions found on static call"), CircuitErrorCode::PUBLIC_KERNEL__CALL_CONTEXT_TRANSITIONS_PROHIBITED_FOR_STATIC_CALL); - info(19); }; /** From bd09bc53b85c250ff8f9865a1e7d6ce9c7eeb9cd Mon Sep 17 00:00:00 2001 From: ludamad Date: Wed, 3 May 2023 15:32:38 -0400 Subject: [PATCH 5/7] Fix generator counts in native --- circuits/cpp/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circuits/cpp/CMakeLists.txt b/circuits/cpp/CMakeLists.txt index d898b9ce05d..5ebea6a074f 100644 --- a/circuits/cpp/CMakeLists.txt +++ b/circuits/cpp/CMakeLists.txt @@ -88,7 +88,7 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "wasm32") set(CMAKE_BBERG_CXX_FLAGS "-DBARRETENBERG_CRYPTO_GENERATOR_PARAMETERS_HACK=64,32,16,64") else() # Native can take more generators - set(CMAKE_BBERG_CXX_FLAGS "-DBARRETENBERG_CRYPTO_GENERATOR_PARAMETERS_HACK=2048,128,32,2048") + set(CMAKE_BBERG_CXX_FLAGS "-DBARRETENBERG_CRYPTO_GENERATOR_PARAMETERS_HACK=2048,32,128,2048") endif() set(CMAKE_C_STANDARD 11) From df591658cd2989f672c0667b69ab7a98e3670c0a Mon Sep 17 00:00:00 2001 From: ludamad Date: Wed, 3 May 2023 15:45:07 -0400 Subject: [PATCH 6/7] Update --- yarn-project/acir-simulator/package.json | 2 +- yarn-project/archiver/package.json | 2 +- yarn-project/aztec-cli/package.json | 2 +- yarn-project/aztec-node/package.json | 2 +- yarn-project/aztec-rpc/package.json | 2 +- yarn-project/aztec.js/package.json | 2 +- yarn-project/barretenberg.js/package.json | 2 +- yarn-project/ethereum.js/package.json | 2 +- yarn-project/foundation/package.json | 2 +- yarn-project/kernel-prover/package.json | 2 +- yarn-project/key-store/package.json | 2 +- yarn-project/l1-contracts/package.json | 2 +- yarn-project/merkle-tree/package.json | 2 +- yarn-project/noir-contracts/package.json | 2 +- yarn-project/p2p/package.json | 2 +- yarn-project/package.common.json | 2 +- yarn-project/prover-client/package.json | 2 +- yarn-project/sequencer-client/package.json | 2 +- yarn-project/types/package.json | 2 +- yarn-project/world-state/package.json | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/yarn-project/acir-simulator/package.json b/yarn-project/acir-simulator/package.json index fe84969efd4..ae48fce6a72 100644 --- a/yarn-project/acir-simulator/package.json +++ b/yarn-project/acir-simulator/package.json @@ -16,7 +16,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" }, "inherits": [ "../package.common.json" diff --git a/yarn-project/archiver/package.json b/yarn-project/archiver/package.json index d080b10e108..ff793e518f1 100644 --- a/yarn-project/archiver/package.json +++ b/yarn-project/archiver/package.json @@ -16,7 +16,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", "start": "node ./dest", "start:dev": "tsc-watch -p tsconfig.json --onSuccess 'yarn start'", "test:integration": "concurrently -k -s first -c reset,dim -n test,anvil \"yarn test:integration:run\" \"anvil\"", diff --git a/yarn-project/aztec-cli/package.json b/yarn-project/aztec-cli/package.json index 4deb2329f00..32e5efdfdec 100644 --- a/yarn-project/aztec-cli/package.json +++ b/yarn-project/aztec-cli/package.json @@ -19,7 +19,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" }, "inherits": [ "../package.common.json" diff --git a/yarn-project/aztec-node/package.json b/yarn-project/aztec-node/package.json index b7b85661988..cba542cfc04 100644 --- a/yarn-project/aztec-node/package.json +++ b/yarn-project/aztec-node/package.json @@ -17,7 +17,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" }, "inherits": [ "../package.common.json" diff --git a/yarn-project/aztec-rpc/package.json b/yarn-project/aztec-rpc/package.json index 764c9497455..78ecaa4427d 100644 --- a/yarn-project/aztec-rpc/package.json +++ b/yarn-project/aztec-rpc/package.json @@ -16,7 +16,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" }, "inherits": [ "../package.common.json" diff --git a/yarn-project/aztec.js/package.json b/yarn-project/aztec.js/package.json index 51070fd628f..9f4c1e9ca9d 100644 --- a/yarn-project/aztec.js/package.json +++ b/yarn-project/aztec.js/package.json @@ -16,7 +16,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" }, "inherits": [ "../package.common.json" diff --git a/yarn-project/barretenberg.js/package.json b/yarn-project/barretenberg.js/package.json index ab6677cabdd..12c9820c033 100644 --- a/yarn-project/barretenberg.js/package.json +++ b/yarn-project/barretenberg.js/package.json @@ -20,7 +20,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", "test-debug": "NODE_NO_WARNINGS=1 node --inspect-brk --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests --runInBand" }, "inherits": [ diff --git a/yarn-project/ethereum.js/package.json b/yarn-project/ethereum.js/package.json index aa630dcd31f..575ce283d14 100644 --- a/yarn-project/ethereum.js/package.json +++ b/yarn-project/ethereum.js/package.json @@ -30,7 +30,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", "gen_fixtures": "NODE_NO_WARNINGS=1 node ./dest/contract/gen_def/index.js ./src/contract/fixtures/contracts.json" }, "inherits": [ diff --git a/yarn-project/foundation/package.json b/yarn-project/foundation/package.json index 29518ac0223..b08f67a6477 100644 --- a/yarn-project/foundation/package.json +++ b/yarn-project/foundation/package.json @@ -35,7 +35,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" }, "inherits": [ "../package.common.json" diff --git a/yarn-project/kernel-prover/package.json b/yarn-project/kernel-prover/package.json index 7e916b7998b..4f79ffd7a67 100644 --- a/yarn-project/kernel-prover/package.json +++ b/yarn-project/kernel-prover/package.json @@ -16,7 +16,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" }, "inherits": [ "../package.common.json" diff --git a/yarn-project/key-store/package.json b/yarn-project/key-store/package.json index 4e1e7e85373..099ca33e59f 100644 --- a/yarn-project/key-store/package.json +++ b/yarn-project/key-store/package.json @@ -16,7 +16,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" }, "inherits": [ "../package.common.json" diff --git a/yarn-project/l1-contracts/package.json b/yarn-project/l1-contracts/package.json index 05f01222e9d..1d9a5aa4376 100644 --- a/yarn-project/l1-contracts/package.json +++ b/yarn-project/l1-contracts/package.json @@ -19,7 +19,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", "generate": "contract_gen_def && bash scripts/update-viem-abis.sh && yarn formatting:fix" }, "inherits": [ diff --git a/yarn-project/merkle-tree/package.json b/yarn-project/merkle-tree/package.json index 56a2522d48c..5308d3e1e9b 100644 --- a/yarn-project/merkle-tree/package.json +++ b/yarn-project/merkle-tree/package.json @@ -11,7 +11,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" }, "inherits": [ "../package.common.json", diff --git a/yarn-project/noir-contracts/package.json b/yarn-project/noir-contracts/package.json index 3bf0f02eb0d..7ef150be10b 100644 --- a/yarn-project/noir-contracts/package.json +++ b/yarn-project/noir-contracts/package.json @@ -19,7 +19,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", "noir:build": "yarn noir:build:test && yarn noir:build:parent && yarn noir:build:child && yarn noir:build:zk_token && yarn noir:build:pub_token", "noir:build:test": "(cd src/contracts/test_contract && nargo compile main --contracts) && ts-node --esm src/scripts/copy_output.ts test", "noir:build:parent": "(cd src/contracts/parent_contract && nargo compile main --contracts) && ts-node --esm src/scripts/copy_output.ts parent", diff --git a/yarn-project/p2p/package.json b/yarn-project/p2p/package.json index f77591e062c..464dee67e88 100644 --- a/yarn-project/p2p/package.json +++ b/yarn-project/p2p/package.json @@ -16,7 +16,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", "start": "node ./dest", "start:dev": "tsc-watch -p tsconfig.json --onSuccess 'yarn start'" }, diff --git a/yarn-project/package.common.json b/yarn-project/package.common.json index b92459496ab..2156c22a83b 100644 --- a/yarn-project/package.common.json +++ b/yarn-project/package.common.json @@ -7,7 +7,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" }, "files": ["dest", "src", "!*.test.*"], "types": "./dest/index.d.ts", diff --git a/yarn-project/prover-client/package.json b/yarn-project/prover-client/package.json index be2d758ef36..e0386b7ed17 100644 --- a/yarn-project/prover-client/package.json +++ b/yarn-project/prover-client/package.json @@ -16,7 +16,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" }, "inherits": [ "../package.common.json" diff --git a/yarn-project/sequencer-client/package.json b/yarn-project/sequencer-client/package.json index 4734c098cd2..22ee80a7a6d 100644 --- a/yarn-project/sequencer-client/package.json +++ b/yarn-project/sequencer-client/package.json @@ -16,7 +16,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", "test:integration": "concurrently -k -s first -c reset,dim -n test,anvil \"yarn test:integration:run\" \"anvil\"", "test:integration:run": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --config jest.integration.config.json" }, diff --git a/yarn-project/types/package.json b/yarn-project/types/package.json index 9585cb6fb34..f2047ac3d0f 100644 --- a/yarn-project/types/package.json +++ b/yarn-project/types/package.json @@ -16,7 +16,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" }, "inherits": [ "../package.common.json" diff --git a/yarn-project/world-state/package.json b/yarn-project/world-state/package.json index 31eb93924e7..e2d2de637fa 100644 --- a/yarn-project/world-state/package.json +++ b/yarn-project/world-state/package.json @@ -11,7 +11,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "DEBUG=wasm NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" }, "inherits": [ "../package.common.json" From f8ad6b8d2568ee669937c2b81e667a3c3094591f Mon Sep 17 00:00:00 2001 From: ludamad Date: Wed, 3 May 2023 15:57:09 -0400 Subject: [PATCH 7/7] Point to aztec3-temporary --- circuits/cpp/barretenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circuits/cpp/barretenberg b/circuits/cpp/barretenberg index cc45c9c5602..af243b20ebf 160000 --- a/circuits/cpp/barretenberg +++ b/circuits/cpp/barretenberg @@ -1 +1 @@ -Subproject commit cc45c9c560233eecd542124b662668718a9a6233 +Subproject commit af243b20ebf38b27e79a1631cc056eab66573fd3