From 5995de64264f2a8701dc32265eb72214e23c4c87 Mon Sep 17 00:00:00 2001 From: LHerskind Date: Thu, 15 Jun 2023 15:57:24 +0000 Subject: [PATCH 1/3] feat: add version and chainid to tx_context + check in base --- .../abis/rollup/constant_rollup_data.hpp | 13 +++- .../rollup/root/root_rollup_public_inputs.hpp | 2 + .../src/aztec3/circuits/abis/tx_context.hpp | 30 +++++++++- .../src/aztec3/circuits/abis/tx_request.hpp | 11 +--- .../src/aztec3/circuits/global_variables.hpp | 59 +++++++++++++++++++ .../kernel/private/testing_harness.cpp | 13 ++-- .../src/aztec3/circuits/rollup/base/.test.cpp | 58 ++++++++++++++++++ .../base/native_base_rollup_circuit.cpp | 20 +++++++ .../aztec3/circuits/rollup/merge/.test.cpp | 4 +- .../cpp/src/aztec3/utils/circuit_errors.hpp | 2 + .../src/structs/rollup/base_rollup.ts | 2 + .../src/structs/rollup/root_rollup.ts | 3 +- .../circuits.js/src/structs/tx_context.ts | 2 + 13 files changed, 194 insertions(+), 25 deletions(-) create mode 100644 circuits/cpp/src/aztec3/circuits/global_variables.hpp diff --git a/circuits/cpp/src/aztec3/circuits/abis/rollup/constant_rollup_data.hpp b/circuits/cpp/src/aztec3/circuits/abis/rollup/constant_rollup_data.hpp index d6e14fb659d..f79a4fb664f 100644 --- a/circuits/cpp/src/aztec3/circuits/abis/rollup/constant_rollup_data.hpp +++ b/circuits/cpp/src/aztec3/circuits/abis/rollup/constant_rollup_data.hpp @@ -2,6 +2,8 @@ #include "../append_only_tree_snapshot.hpp" +#include "aztec3/circuits/global_variables.hpp" + #include namespace aztec3::circuits::abis { @@ -20,13 +22,17 @@ template struct ConstantRollupData { fr base_rollup_vk_hash = 0; fr merge_rollup_vk_hash = 0; + // Global variables + GlobalVariables global_variables{}; + MSGPACK_FIELDS(start_tree_of_historic_private_data_tree_roots_snapshot, start_tree_of_historic_contract_tree_roots_snapshot, start_tree_of_historic_l1_to_l2_msg_tree_roots_snapshot, private_kernel_vk_tree_root, public_kernel_vk_tree_root, base_rollup_vk_hash, - merge_rollup_vk_hash); + merge_rollup_vk_hash, + global_variables); bool operator==(ConstantRollupData const&) const = default; }; @@ -42,6 +48,7 @@ template void read(uint8_t const*& it, ConstantRollupData& o read(it, obj.public_kernel_vk_tree_root); read(it, obj.base_rollup_vk_hash); read(it, obj.merge_rollup_vk_hash); + read(it, obj.global_variables); }; template void write(std::vector& buf, ConstantRollupData const& obj) @@ -55,6 +62,7 @@ template void write(std::vector& buf, ConstantRollupData write(buf, obj.public_kernel_vk_tree_root); write(buf, obj.base_rollup_vk_hash); write(buf, obj.merge_rollup_vk_hash); + write(buf, obj.global_variables); }; template std::ostream& operator<<(std::ostream& os, ConstantRollupData const& obj) @@ -68,7 +76,8 @@ template std::ostream& operator<<(std::ostream& os, ConstantRollu << "private_kernel_vk_tree_root: " << obj.private_kernel_vk_tree_root << "\n" << "public_kernel_vk_tree_root: " << obj.public_kernel_vk_tree_root << "\n" << "base_rollup_vk_hash: " << obj.base_rollup_vk_hash << "\n" - << "merge_rollup_vk_hash: " << obj.merge_rollup_vk_hash << "\n"; + << "merge_rollup_vk_hash: " << obj.merge_rollup_vk_hash << "\n" + << "global_variables: " << obj.global_variables << "\n"; } } // namespace aztec3::circuits::abis diff --git a/circuits/cpp/src/aztec3/circuits/abis/rollup/root/root_rollup_public_inputs.hpp b/circuits/cpp/src/aztec3/circuits/abis/rollup/root/root_rollup_public_inputs.hpp index 9cefb2e1e98..01ac11944fa 100644 --- a/circuits/cpp/src/aztec3/circuits/abis/rollup/root/root_rollup_public_inputs.hpp +++ b/circuits/cpp/src/aztec3/circuits/abis/rollup/root/root_rollup_public_inputs.hpp @@ -15,6 +15,8 @@ template struct RootRollupPublicInputs { using fr = typename NCT::fr; using AggregationObject = typename NCT::AggregationObject; + // @todo @LHerskind: the global variables from constants should be included here. + // All below are shared between the base and merge rollups AggregationObject end_aggregation_object; diff --git a/circuits/cpp/src/aztec3/circuits/abis/tx_context.hpp b/circuits/cpp/src/aztec3/circuits/abis/tx_context.hpp index 329528b1fa4..67e0e32ce43 100644 --- a/circuits/cpp/src/aztec3/circuits/abis/tx_context.hpp +++ b/circuits/cpp/src/aztec3/circuits/abis/tx_context.hpp @@ -24,13 +24,23 @@ template struct TxContext { ContractDeploymentData contract_deployment_data{}; + fr chain_id = 0; + fr version = 0; + // for serialization: update up with new fields - MSGPACK_FIELDS(is_fee_payment_tx, is_rebate_payment_tx, is_contract_deployment_tx, contract_deployment_data); + MSGPACK_FIELDS(is_fee_payment_tx, + is_rebate_payment_tx, + is_contract_deployment_tx, + contract_deployment_data, + chain_id, + version); + boolean operator==(TxContext const& other) const { return is_fee_payment_tx == other.is_fee_payment_tx && is_rebate_payment_tx == other.is_rebate_payment_tx && is_contract_deployment_tx == other.is_contract_deployment_tx && - contract_deployment_data == other.contract_deployment_data; + contract_deployment_data == other.contract_deployment_data && chain_id == other.chain_id && + version == other.version; }; template TxContext> to_circuit_type(Composer& composer) const @@ -46,6 +56,8 @@ template struct TxContext { to_ct(is_rebate_payment_tx), to_ct(is_contract_deployment_tx), contract_deployment_data.to_circuit_type(composer), + to_ct(chain_id), + to_ct(version), }; return tx_context; @@ -62,6 +74,8 @@ template struct TxContext { to_nt(is_rebate_payment_tx), to_nt(is_contract_deployment_tx), to_native_type(contract_deployment_data), + to_nt(chain_id), + to_nt(version), }; return tx_context; @@ -75,6 +89,8 @@ template struct TxContext { fr(is_rebate_payment_tx).set_public(); fr(is_contract_deployment_tx).set_public(); contract_deployment_data.set_public(); + fr(chain_id).set_public(); + fr(version).set_public(); } fr hash() const @@ -84,6 +100,8 @@ template struct TxContext { fr(is_rebate_payment_tx), fr(is_contract_deployment_tx), contract_deployment_data.hash(), + chain_id, + version, }; return NCT::compress(inputs, GeneratorIndex::TX_CONTEXT); @@ -98,6 +116,8 @@ template void read(uint8_t const*& it, TxContext& tx_context read(it, tx_context.is_rebate_payment_tx); read(it, tx_context.is_contract_deployment_tx); read(it, tx_context.contract_deployment_data); + read(it, tx_context.chain_id); + read(it, tx_context.version); }; template void write(std::vector& buf, TxContext const& tx_context) @@ -108,6 +128,8 @@ template void write(std::vector& buf, TxContext con write(buf, tx_context.is_rebate_payment_tx); write(buf, tx_context.is_contract_deployment_tx); write(buf, tx_context.contract_deployment_data); + write(buf, tx_context.chain_id); + write(buf, tx_context.version); }; template std::ostream& operator<<(std::ostream& os, TxContext const& tx_context) @@ -117,7 +139,9 @@ template std::ostream& operator<<(std::ostream& os, TxContext struct TxRequest { fr args_hash = 0; fr nonce = 0; TxContext tx_context{}; - fr chain_id = 0; boolean operator==(TxContext const& other) const { return from == other.from && to == other.to && function_data == other.function_data && - args_hash == other.args && nonce == other.nonce && tx_context == other.tx_context && - chain_id == other.chain_id; + args_hash == other.args && nonce == other.nonce && tx_context == other.tx_context; }; template TxRequest> to_circuit_type(Composer& composer) const @@ -45,7 +43,6 @@ template struct TxRequest { TxRequest> tx_request = { to_ct(from), to_ct(to), to_circuit_type(function_data), to_ct(args_hash), to_ct(nonce), to_circuit_type(tx_context), - to_ct(chain_id), }; return tx_request; @@ -60,7 +57,6 @@ template struct TxRequest { inputs.push_back(args_hash); inputs.push_back(nonce); inputs.push_back(tx_context.hash()); - inputs.push_back(chain_id); return NCT::compress(inputs, GeneratorIndex::TX_REQUEST); } @@ -76,7 +72,6 @@ template void read(uint8_t const*& it, TxRequest& tx_request read(it, tx_request.args_hash); read(it, tx_request.nonce); read(it, tx_request.tx_context); - read(it, tx_request.chain_id); }; template void write(std::vector& buf, TxRequest const& tx_request) @@ -89,7 +84,6 @@ template void write(std::vector& buf, TxRequest con write(buf, tx_request.args_hash); write(buf, tx_request.nonce); write(buf, tx_request.tx_context); - write(buf, tx_request.chain_id); }; template std::ostream& operator<<(std::ostream& os, TxRequest const& tx_request) @@ -99,8 +93,7 @@ template std::ostream& operator<<(std::ostream& os, TxRequest + +namespace aztec3::circuits::abis { + +using aztec3::utils::types::CircuitTypes; +using aztec3::utils::types::NativeTypes; + +template struct GlobalVariables { + using fr = typename NCT::fr; + + fr timestamp = 0; + fr block_number = 0; + fr chain_id = 0; + fr version = 0; + + MSGPACK_FIELDS(timestamp, block_number, chain_id, version); + + bool operator==(GlobalVariables const&) const = default; +}; + +template void read(uint8_t const*& it, GlobalVariables& obj) +{ + using serialize::read; + + read(it, obj.timestamp); + read(it, obj.block_number); + read(it, obj.chain_id); + read(it, obj.version); +}; + +template void write(std::vector& buf, GlobalVariables const& obj) +{ + using serialize::write; + + write(buf, obj.timestamp); + write(buf, obj.block_number); + write(buf, obj.chain_id); + write(buf, obj.version); +}; + +template std::ostream& operator<<(std::ostream& os, GlobalVariables const& obj) +{ + os << "timestamp: " << obj.timestamp << std::endl; + os << "block_number: " << obj.block_number << std::endl; + os << "chain_id: " << obj.chain_id << std::endl; + os << "version: " << obj.version << std::endl; + return os; +}; + +} // namespace aztec3::circuits::abis \ No newline at end of file diff --git a/circuits/cpp/src/aztec3/circuits/kernel/private/testing_harness.cpp b/circuits/cpp/src/aztec3/circuits/kernel/private/testing_harness.cpp index 77866d91a2d..40a5a8624d0 100644 --- a/circuits/cpp/src/aztec3/circuits/kernel/private/testing_harness.cpp +++ b/circuits/cpp/src/aztec3/circuits/kernel/private/testing_harness.cpp @@ -399,14 +399,11 @@ PrivateKernelInputsInit do_private_call_get_kernel_inputs_init(bool const is .function_data = private_call_data.call_stack_item.function_data, .args_hash = compute_var_args_hash(args_vec), .nonce = 0, - .tx_context = - TxContext{ - .is_fee_payment_tx = false, - .is_rebate_payment_tx = false, - .is_contract_deployment_tx = is_constructor, - .contract_deployment_data = contract_deployment_data, - }, - .chain_id = 1, + .tx_context = TxContext{ .is_fee_payment_tx = false, + .is_rebate_payment_tx = false, + .is_contract_deployment_tx = is_constructor, + .contract_deployment_data = contract_deployment_data, + .chain_id = 1 }, }; auto const signed_tx_request = SignedTxRequest{ diff --git a/circuits/cpp/src/aztec3/circuits/rollup/base/.test.cpp b/circuits/cpp/src/aztec3/circuits/rollup/base/.test.cpp index 03a77d81183..aa0fc152ab4 100644 --- a/circuits/cpp/src/aztec3/circuits/rollup/base/.test.cpp +++ b/circuits/cpp/src/aztec3/circuits/rollup/base/.test.cpp @@ -151,6 +151,64 @@ TEST_F(base_rollup_tests, native_no_new_contract_leafs) run_cbind(emptyInputs, outputs); } +TEST_F(base_rollup_tests, native_invalid_chainid) +{ + DummyComposer composer = DummyComposer("base_rollup_tests__native_invalid_chainid"); + BaseRollupInputs emptyInputs = base_rollup_inputs_from_kernels({ get_empty_kernel(), get_empty_kernel() }); + + // Setting chain id to 1 instead of 0 (which is the default) + emptyInputs.constants.global_variables.chain_id = 1; + + auto empty_contract_tree = native_base_rollup::MerkleTree(CONTRACT_TREE_HEIGHT); + + BaseOrMergeRollupPublicInputs outputs = + aztec3::circuits::rollup::native_base_rollup::base_rollup_circuit(composer, emptyInputs); + + AppendOnlyTreeSnapshot const expectedStartContractTreeSnapshot = { + .root = empty_contract_tree.root(), + .next_available_leaf_index = 0, + }; + AppendOnlyTreeSnapshot const expectedEndContractTreeSnapshot = { + .root = empty_contract_tree.root(), + .next_available_leaf_index = 2, + }; + ASSERT_EQ(outputs.start_contract_tree_snapshot, expectedStartContractTreeSnapshot); + ASSERT_EQ(outputs.end_contract_tree_snapshot, expectedEndContractTreeSnapshot); + ASSERT_EQ(outputs.start_contract_tree_snapshot, emptyInputs.start_contract_tree_snapshot); + ASSERT_TRUE(composer.failed()); + ASSERT_EQ(composer.get_first_failure().message, + format("Chain id in tx context does not match ", fr(0), " ", fr(1))); +} + + +TEST_F(base_rollup_tests, native_invalid_version) +{ + DummyComposer composer = DummyComposer("base_rollup_tests__native_invalid_version"); + BaseRollupInputs emptyInputs = base_rollup_inputs_from_kernels({ get_empty_kernel(), get_empty_kernel() }); + + // Setting version to 1 instead of 0 (which is the default) + emptyInputs.constants.global_variables.version = 1; + + auto empty_contract_tree = native_base_rollup::MerkleTree(CONTRACT_TREE_HEIGHT); + + BaseOrMergeRollupPublicInputs outputs = + aztec3::circuits::rollup::native_base_rollup::base_rollup_circuit(composer, emptyInputs); + + AppendOnlyTreeSnapshot const expectedStartContractTreeSnapshot = { + .root = empty_contract_tree.root(), + .next_available_leaf_index = 0, + }; + AppendOnlyTreeSnapshot const expectedEndContractTreeSnapshot = { + .root = empty_contract_tree.root(), + .next_available_leaf_index = 2, + }; + ASSERT_EQ(outputs.start_contract_tree_snapshot, expectedStartContractTreeSnapshot); + ASSERT_EQ(outputs.end_contract_tree_snapshot, expectedEndContractTreeSnapshot); + ASSERT_EQ(outputs.start_contract_tree_snapshot, emptyInputs.start_contract_tree_snapshot); + ASSERT_TRUE(composer.failed()); + ASSERT_EQ(composer.get_first_failure().message, format("Version in tx context does not match ", fr(0), " ", fr(1))); +} + TEST_F(base_rollup_tests, native_contract_leaf_inserted) { DummyComposer composer = DummyComposer("base_rollup_tests__native_contract_leaf_inserted"); diff --git a/circuits/cpp/src/aztec3/circuits/rollup/base/native_base_rollup_circuit.cpp b/circuits/cpp/src/aztec3/circuits/rollup/base/native_base_rollup_circuit.cpp index 399441563c4..2d7accd5e1d 100644 --- a/circuits/cpp/src/aztec3/circuits/rollup/base/native_base_rollup_circuit.cpp +++ b/circuits/cpp/src/aztec3/circuits/rollup/base/native_base_rollup_circuit.cpp @@ -453,6 +453,23 @@ fr validate_and_process_public_state(DummyComposer& composer, BaseRollupInputs c return end_public_data_tree_root; } +void perform_chain_checks(DummyComposer& composer, BaseRollupInputs const& baseRollupInputs) +{ + // Check that the chain id and version for both kernels match the constants + auto global_variables = baseRollupInputs.constants.global_variables; + for (size_t i = 0; i < 2; i++) { + auto tx_context = baseRollupInputs.kernel_data[i].public_inputs.constants.tx_context; + composer.do_assert( + tx_context.chain_id == global_variables.chain_id, + format("Chain id in tx context does not match ", tx_context.chain_id, " ", global_variables.chain_id), + CircuitErrorCode::BASE__INVALID_CHAIN_ID); + composer.do_assert( + tx_context.version == global_variables.version, + format("Version in tx context does not match ", tx_context.version, " ", global_variables.version), + CircuitErrorCode::BASE__INVALID_VERSION); + } +} + BaseOrMergeRollupPublicInputs base_rollup_circuit(DummyComposer& composer, BaseRollupInputs const& baseRollupInputs) { // Verify the previous kernel proofs @@ -463,6 +480,9 @@ BaseOrMergeRollupPublicInputs base_rollup_circuit(DummyComposer& composer, BaseR CircuitErrorCode::BASE__KERNEL_PROOF_VERIFICATION_FAILED); } + // Check that the chain id and version for both kernels match the constants + perform_chain_checks(composer, baseRollupInputs); + // First we compute the contract tree leaves std::vector const contract_leaves = calculate_contract_leaves(baseRollupInputs); diff --git a/circuits/cpp/src/aztec3/circuits/rollup/merge/.test.cpp b/circuits/cpp/src/aztec3/circuits/rollup/merge/.test.cpp index 3b4904bbb35..c07ea3f63c6 100644 --- a/circuits/cpp/src/aztec3/circuits/rollup/merge/.test.cpp +++ b/circuits/cpp/src/aztec3/circuits/rollup/merge/.test.cpp @@ -102,8 +102,8 @@ TEST_F(merge_rollup_tests, native_constants_different_failure) get_empty_kernel(), get_empty_kernel(), get_empty_kernel(), get_empty_kernel() }; MergeRollupInputs inputs = get_merge_rollup_inputs(composer, kernels); - inputs.previous_rollup_data[0].base_or_merge_rollup_public_inputs.constants.public_kernel_vk_tree_root = fr(1); - inputs.previous_rollup_data[1].base_or_merge_rollup_public_inputs.constants.public_kernel_vk_tree_root = fr(0); + inputs.previous_rollup_data[0].base_or_merge_rollup_public_inputs.constants.global_variables.chain_id = fr(1); + inputs.previous_rollup_data[1].base_or_merge_rollup_public_inputs.constants.global_variables.chain_id = fr(0); merge_rollup_circuit(composer, inputs); ASSERT_TRUE(composer.failed()); ASSERT_EQ(composer.get_first_failure().message, "input proofs have different constants"); diff --git a/circuits/cpp/src/aztec3/utils/circuit_errors.hpp b/circuits/cpp/src/aztec3/utils/circuit_errors.hpp index aaa68054fb9..607d8ed00f2 100644 --- a/circuits/cpp/src/aztec3/utils/circuit_errors.hpp +++ b/circuits/cpp/src/aztec3/utils/circuit_errors.hpp @@ -66,6 +66,8 @@ enum CircuitErrorCode : uint16_t { BASE__INVALID_NULLIFIER_RANGE = 4004, BASE__INVALID_PUBLIC_DATA_READS = 4005, BASE__INVALID_PUBLIC_DATA_UPDATE_REQUESTS = 4006, + BASE__INVALID_CHAIN_ID = 4007, + BASE__INVALID_VERSION = 4008, MERGE_CIRCUIT_FAILED = 6000, diff --git a/yarn-project/circuits.js/src/structs/rollup/base_rollup.ts b/yarn-project/circuits.js/src/structs/rollup/base_rollup.ts index c6229857bdb..f6040acdb8b 100644 --- a/yarn-project/circuits.js/src/structs/rollup/base_rollup.ts +++ b/yarn-project/circuits.js/src/structs/rollup/base_rollup.ts @@ -84,6 +84,8 @@ export class ConstantBaseRollupData { * Hash of the merge rollup circuit verification key. */ public mergeRollupVkHash: Fr, + + // @todo @LHerskind Need to extend with the global variables ) {} static from(fields: FieldsOf): ConstantBaseRollupData { diff --git a/yarn-project/circuits.js/src/structs/rollup/root_rollup.ts b/yarn-project/circuits.js/src/structs/rollup/root_rollup.ts index cf70aec2ec8..80ac3053df2 100644 --- a/yarn-project/circuits.js/src/structs/rollup/root_rollup.ts +++ b/yarn-project/circuits.js/src/structs/rollup/root_rollup.ts @@ -93,7 +93,8 @@ export class RootRollupPublicInputs { * Native aggregation state at the end of the rollup. */ public endAggregationObject: AggregationObject, - + + // @todo @LHerskind: the global variables from constants should be included here. // constants: ConstantRollupData // TODO maybe don't include this /** diff --git a/yarn-project/circuits.js/src/structs/tx_context.ts b/yarn-project/circuits.js/src/structs/tx_context.ts index 64abd44687e..5e3a2b8c9e7 100644 --- a/yarn-project/circuits.js/src/structs/tx_context.ts +++ b/yarn-project/circuits.js/src/structs/tx_context.ts @@ -97,6 +97,8 @@ export class TxContext { * Contract deployment data. */ public contractDeploymentData: ContractDeploymentData, + + // @todo @LHerskind Add chain_id and version. ) {} /** From 000cc86ac8b46797620bd406a330d5550faa095f Mon Sep 17 00:00:00 2001 From: LHerskind Date: Thu, 15 Jun 2023 16:22:50 +0000 Subject: [PATCH 2/3] fix: test setting chain_id wrong place --- .../cpp/src/aztec3/circuits/abis/c_bind.test.cpp | 12 ++++++++---- .../cpp/src/aztec3/circuits/kernel/public/.test.cpp | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/circuits/cpp/src/aztec3/circuits/abis/c_bind.test.cpp b/circuits/cpp/src/aztec3/circuits/abis/c_bind.test.cpp index c220d1d5d47..c3d1591a92d 100644 --- a/circuits/cpp/src/aztec3/circuits/abis/c_bind.test.cpp +++ b/circuits/cpp/src/aztec3/circuits/abis/c_bind.test.cpp @@ -1,5 +1,4 @@ #include "c_bind.h" - #include "function_leaf_preimage.hpp" #include "tx_request.hpp" @@ -66,8 +65,14 @@ TEST(abi_tests, hash_tx_request) .function_data = FunctionData(), .args_hash = NT::fr::random_element(), .nonce = NT::fr::random_element(), - .tx_context = TxContext(), - .chain_id = NT::fr::random_element(), + .tx_context = { + .is_fee_payment_tx = static_cast(engine.get_random_uint8() & 1), + .is_rebate_payment_tx = static_cast(engine.get_random_uint8() & 1), + .is_contract_deployment_tx = false, + .contract_deployment_data = ContractDeploymentData(), + .chain_id = NT::fr::random_element(), + .version = NT::fr::random_element(), + }, }; // Write the tx request to a buffer and @@ -325,7 +330,6 @@ TEST(abi_tests, compute_transaction_hash) .args_hash = NT::fr::random_element(), .nonce = NT::fr::random_element(), .tx_context = TxContext(), - .chain_id = NT::fr::random_element(), }; std::array const r{ diff --git a/circuits/cpp/src/aztec3/circuits/kernel/public/.test.cpp b/circuits/cpp/src/aztec3/circuits/kernel/public/.test.cpp index 8e0b078db5b..626fcd96c08 100644 --- a/circuits/cpp/src/aztec3/circuits/kernel/public/.test.cpp +++ b/circuits/cpp/src/aztec3/circuits/kernel/public/.test.cpp @@ -209,8 +209,8 @@ PublicKernelInputsNoPreviousKernel get_kernel_inputs_no_previous_kernel() .is_rebate_payment_tx = false, .is_contract_deployment_tx = false, .contract_deployment_data = {}, + .chain_id = 1, }, - .chain_id = 1, }; auto const signed_tx_request = SignedTxRequest{ From 2d969100c5aad1ea6a1f644838d8eb7b045ce0c4 Mon Sep 17 00:00:00 2001 From: LHerskind Date: Thu, 15 Jun 2023 16:30:55 +0000 Subject: [PATCH 3/3] fix: tidy --- circuits/cpp/src/aztec3/circuits/rollup/base/.test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circuits/cpp/src/aztec3/circuits/rollup/base/.test.cpp b/circuits/cpp/src/aztec3/circuits/rollup/base/.test.cpp index aa0fc152ab4..62930608140 100644 --- a/circuits/cpp/src/aztec3/circuits/rollup/base/.test.cpp +++ b/circuits/cpp/src/aztec3/circuits/rollup/base/.test.cpp @@ -161,7 +161,7 @@ TEST_F(base_rollup_tests, native_invalid_chainid) auto empty_contract_tree = native_base_rollup::MerkleTree(CONTRACT_TREE_HEIGHT); - BaseOrMergeRollupPublicInputs outputs = + BaseOrMergeRollupPublicInputs const outputs = aztec3::circuits::rollup::native_base_rollup::base_rollup_circuit(composer, emptyInputs); AppendOnlyTreeSnapshot const expectedStartContractTreeSnapshot = { @@ -191,7 +191,7 @@ TEST_F(base_rollup_tests, native_invalid_version) auto empty_contract_tree = native_base_rollup::MerkleTree(CONTRACT_TREE_HEIGHT); - BaseOrMergeRollupPublicInputs outputs = + BaseOrMergeRollupPublicInputs const outputs = aztec3::circuits::rollup::native_base_rollup::base_rollup_circuit(composer, emptyInputs); AppendOnlyTreeSnapshot const expectedStartContractTreeSnapshot = {