From bc9f7d198fedfc5f9000280861687af5b6447583 Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 5 Mar 2024 19:58:24 +0000 Subject: [PATCH 1/2] chore: address warnings in test suite --- .../crates/public-kernel-lib/src/common.nr | 2 +- .../crates/public-kernel-lib/src/public_kernel_setup.nr | 4 ++-- .../crates/rollup-lib/src/base/base_rollup_inputs.nr | 2 ++ .../crates/types/src/tests/merkle_tree_utils.nr | 2 ++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/common.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/common.nr index bd27c381283..359d7cc495c 100644 --- a/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/common.nr +++ b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/common.nr @@ -363,7 +363,7 @@ fn propagate_new_nullifiers( fn propagate_new_l2_to_l1_messages(public_call: PublicCallData, public_inputs: &mut PublicKernelCircuitPublicInputsBuilder) { // new l2 to l1 messages let public_call_public_inputs = public_call.call_stack_item.public_inputs; - let portal_contract_address = public_call.portal_contract_address; + // let portal_contract_address = public_call.portal_contract_address; let storage_contract_address = public_call_public_inputs.call_context.storage_contract_address; let new_l2_to_l1_msgs = public_call_public_inputs.new_l2_to_l1_msgs; diff --git a/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_setup.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_setup.nr index 7e0df945db1..e61e109ed35 100644 --- a/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_setup.nr +++ b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/public_kernel_setup.nr @@ -412,11 +412,11 @@ mod tests { builder.public_call.append_update_requests(2); let storage = builder.get_current_public_data_update_requests(); - let update_requests = [storage[0], storage[1]]; + let _update_requests = [storage[0], storage[1]]; builder.public_call.append_public_data_read_requests(3); let storage = builder.get_current_public_data_reads(); - let read_requests = [storage[0], storage[1], storage[2]]; + let _read_requests = [storage[0], storage[1], storage[2]]; // Push the public call on top of the teardown call. let setup_call = builder.public_call.finish(); diff --git a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/base_rollup_inputs.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/base_rollup_inputs.nr index bb669298d4e..7d54f42a8df 100644 --- a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/base_rollup_inputs.nr +++ b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/base_rollup_inputs.nr @@ -152,6 +152,8 @@ impl BaseRollupInputs { // Cpp code says calculate_contract_subtree, so I'm leaving it as is for now fn calculate_contract_subtree_root(self, leaves: [Field; MAX_NEW_CONTRACTS_PER_TX]) -> Field { + // Silence warning for unused self, pending proper fix. + let _ = self; assert_eq(leaves.len(), 1); leaves[0] } diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/tests/merkle_tree_utils.nr b/noir-projects/noir-protocol-circuits/crates/types/src/tests/merkle_tree_utils.nr index b2edc7ee736..c5fdd279524 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/tests/merkle_tree_utils.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/tests/merkle_tree_utils.nr @@ -154,6 +154,8 @@ impl NonEmptyMerkl } pub fn get_next_available_index(self) -> Field { + // Silence warning for unused self, pending proper fix. + let _ = self; SUBTREE_ITEMS } } From d09ec203268ce2617a8fd4d8f7a32facf8285188 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Wed, 6 Mar 2024 14:01:52 +0000 Subject: [PATCH 2/2] Update noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/common.nr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Nicolás Venturo --- .../crates/public-kernel-lib/src/common.nr | 1 - 1 file changed, 1 deletion(-) diff --git a/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/common.nr b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/common.nr index 359d7cc495c..5c4acf0b469 100644 --- a/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/common.nr +++ b/noir-projects/noir-protocol-circuits/crates/public-kernel-lib/src/common.nr @@ -363,7 +363,6 @@ fn propagate_new_nullifiers( fn propagate_new_l2_to_l1_messages(public_call: PublicCallData, public_inputs: &mut PublicKernelCircuitPublicInputsBuilder) { // new l2 to l1 messages let public_call_public_inputs = public_call.call_stack_item.public_inputs; - // let portal_contract_address = public_call.portal_contract_address; let storage_contract_address = public_call_public_inputs.call_context.storage_contract_address; let new_l2_to_l1_msgs = public_call_public_inputs.new_l2_to_l1_msgs;