diff --git a/cpp/src/aztec3/circuits/abis/rollup/merge/merge_rollup_public_inputs.hpp b/cpp/src/aztec3/circuits/abis/rollup/merge/merge_rollup_public_inputs.hpp index 9a53e11d..4feb14a1 100644 --- a/cpp/src/aztec3/circuits/abis/rollup/merge/merge_rollup_public_inputs.hpp +++ b/cpp/src/aztec3/circuits/abis/rollup/merge/merge_rollup_public_inputs.hpp @@ -51,7 +51,7 @@ template void read(uint8_t const*& it, MergeRollupPublicInputs void write(std::vector& buf, MergeRollupPublicI write(buf, obj.start_private_data_tree_snapshot); write(buf, obj.end_private_data_tree_snapshot); write(buf, obj.start_nullifier_tree_snapshot); - write(buf, obj.end_nullifier_tree_snapshots); + write(buf, obj.end_nullifier_tree_snapshot); write(buf, obj.start_contract_tree_snapshot); write(buf, obj.end_contract_tree_snapshot); write(buf, obj.calldata_hash); @@ -91,8 +91,8 @@ template std::ostream& operator<<(std::ostream& os, MergeRollupPu "start_nullifier_tree_snapshot:\n" << obj.start_nullifier_tree_snapshot << "\n" - "end_nullifier_tree_snapshots:\n" - << obj.end_nullifier_tree_snapshots + "end_nullifier_tree_snapshot:\n" + << obj.end_nullifier_tree_snapshot << "\n" "start_contract_tree_snapshot:\n" << obj.start_contract_tree_snapshot diff --git a/cpp/src/aztec3/circuits/rollup/merge/native_merge_rollup_circuit.cpp b/cpp/src/aztec3/circuits/rollup/merge/native_merge_rollup_circuit.cpp index cf8ed251..7f826f33 100644 --- a/cpp/src/aztec3/circuits/rollup/merge/native_merge_rollup_circuit.cpp +++ b/cpp/src/aztec3/circuits/rollup/merge/native_merge_rollup_circuit.cpp @@ -35,20 +35,14 @@ void assert_both_input_proofs_of_same_rollup_type(MergeRollupInputs mergeRollupI { assert(mergeRollupInputs.previous_rollup_data[0].merge_rollup_public_inputs.rollup_type == mergeRollupInputs.previous_rollup_data[1].merge_rollup_public_inputs.rollup_type); + (void)mergeRollupInputs; } void assert_equal_constants(ConstantRollupData left, ConstantRollupData right) { - assert(left.base_rollup_vk_hash == right.base_rollup_vk_hash); - assert(left.merge_rollup_vk_hash == right.merge_rollup_vk_hash); - assert(left.private_kernel_vk_tree_root == right.private_kernel_vk_tree_root); - assert(left.public_kernel_vk_tree_root == right.public_kernel_vk_tree_root); - assert(left.start_tree_of_historic_private_data_tree_roots_snapshot == - right.start_tree_of_historic_private_data_tree_roots_snapshot); - assert(left.start_tree_of_historic_contract_tree_roots_snapshot == - right.start_tree_of_historic_contract_tree_roots_snapshot); - assert(left.tree_of_historic_l1_to_l2_msg_tree_roots_snapshot == - right.tree_of_historic_l1_to_l2_msg_tree_roots_snapshot); + assert(left == right); + (void)left; + (void)right; } // function that does sha256 hash of the calldata from each previous rollup data @@ -109,6 +103,13 @@ void ensure_prev_rollups_follow_on_from_each_other(MergeRollupInputs mergeRollup assert(privateDataEndSnapshot0 == privateDataStartSnapshot1 && nullifierEndSnapshot0 == nullifierStartSnapshot1 && contractEndSnapshot0 == contractStartSnapshot1); + // void variables since despite using in assert, it says, "unused variable" + (void)privateDataEndSnapshot0; + (void)privateDataStartSnapshot1; + (void)nullifierEndSnapshot0; + (void)nullifierStartSnapshot1; + (void)contractEndSnapshot0; + (void)contractStartSnapshot1; } MergeRollupPublicInputs merge_rollup_circuit(MergeRollupInputs mergeRollupInputs) diff --git a/cpp/src/aztec3/circuits/rollup/merge/utils.cpp b/cpp/src/aztec3/circuits/rollup/merge/utils.cpp index 15415aed..49669e9b 100644 --- a/cpp/src/aztec3/circuits/rollup/merge/utils.cpp +++ b/cpp/src/aztec3/circuits/rollup/merge/utils.cpp @@ -1,7 +1,6 @@ #include "aztec3/circuits/abis/rollup/base/base_rollup_public_inputs.hpp" #include "aztec3/circuits/abis/rollup/merge/merge_rollup_inputs.hpp" #include "aztec3/circuits/abis/rollup/merge/merge_rollup_public_inputs.hpp" -#include "aztec3/circuits/rollup/merge/utils.hpp" #include "aztec3/constants.hpp" #include "barretenberg/proof_system/verification_key/verification_key.hpp" #include "index.hpp" @@ -31,7 +30,7 @@ using aztec3::circuits::kernel::private_kernel::utils::dummy_previous_kernel_wit using plonk::TurboComposer; } // namespace -namespace aztec3::circuits::rollup::base::utils { +namespace aztec3::circuits::rollup::merge::utils { // Helper method since MergeRollupInputs.PreviousRollupData can only take the type of `MergeRollupPublicInputs` // So we convert the output of base to look like output of merge and add the `rollup_type` field. @@ -57,7 +56,7 @@ PreviousRollupData dummy_previous_rollup_with_vk_proof() { // MergeInput requires base_rollup_public_inputs. So create a dummy BaseRollupInput object and pass it through the // base rollup circuit. - auto emptyInputs = dummy_base_rollup_inputs_with_vk_proof(); + auto emptyInputs = base::utils::dummy_base_rollup_inputs_with_vk_proof(); BaseRollupPublicInputs dummy_base_public_inputs = aztec3::circuits::rollup::native_base_rollup::base_rollup_circuit(emptyInputs); @@ -82,4 +81,4 @@ MergeRollupInputs dummy_merge_rollup_inputs_with_vk_proof() dummy_previous_rollup_with_vk_proof() } }; return merge_rollup_inputs; } -} // namespace aztec3::circuits::rollup::base::utils \ No newline at end of file +} // namespace aztec3::circuits::rollup::merge::utils \ No newline at end of file diff --git a/cpp/src/aztec3/circuits/rollup/merge/utils.hpp b/cpp/src/aztec3/circuits/rollup/merge/utils.hpp index eb86ed87..1a574060 100644 --- a/cpp/src/aztec3/circuits/rollup/merge/utils.hpp +++ b/cpp/src/aztec3/circuits/rollup/merge/utils.hpp @@ -13,7 +13,8 @@ using aztec3::circuits::abis::MergeRollupPublicInputs; using aztec3::circuits::abis::PreviousRollupData; } // namespace -MergeRollupPublicInputs convert_base_public_inputs_to_merge_public_inputs(BaseRollupPublicInputs); +MergeRollupPublicInputs convert_base_public_inputs_to_merge_public_inputs( + BaseRollupPublicInputs baseRollupPublicInputs); MergeRollupInputs dummy_merge_rollup_inputs_with_vk_proof(); PreviousRollupData dummy_previous_rollup_with_vk_proof(); diff --git a/cpp/src/aztec3/circuits/rollup/root/native_root_rollup_circuit.cpp b/cpp/src/aztec3/circuits/rollup/root/native_root_rollup_circuit.cpp index 765c92ab..456b8874 100644 --- a/cpp/src/aztec3/circuits/rollup/root/native_root_rollup_circuit.cpp +++ b/cpp/src/aztec3/circuits/rollup/root/native_root_rollup_circuit.cpp @@ -42,6 +42,7 @@ void assert_both_input_proofs_of_same_rollup_type(RootRollupInputs rootRollupInp { assert(rootRollupInputs.previous_rollup_data[0].merge_rollup_public_inputs.rollup_type == rootRollupInputs.previous_rollup_data[1].merge_rollup_public_inputs.rollup_type); + (void)rootRollupInputs; } bool is_constants_equal(ConstantRollupData left, ConstantRollupData right)