From 470d046fe54c8b4e76d20ca3dbe8e128355b384f Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Tue, 16 Jan 2024 18:45:42 +0000 Subject: [PATCH] fix: fix various warnings in `noir-protocol-circuits` (#4048) --- barretenberg/cpp/_deps/benchmark-src | 1 + barretenberg/cpp/_deps/gtest-src | 1 + .../src/crates/rollup-lib/src/base/base_rollup_inputs.nr | 4 ++-- .../src/crates/rollup-lib/src/components.nr | 2 +- .../src/crates/rollup-lib/src/merkle_tree.nr | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) create mode 160000 barretenberg/cpp/_deps/benchmark-src create mode 160000 barretenberg/cpp/_deps/gtest-src diff --git a/barretenberg/cpp/_deps/benchmark-src b/barretenberg/cpp/_deps/benchmark-src new file mode 160000 index 00000000000..d572f477734 --- /dev/null +++ b/barretenberg/cpp/_deps/benchmark-src @@ -0,0 +1 @@ +Subproject commit d572f4777349d43653b21d6c2fc63020ab326db2 diff --git a/barretenberg/cpp/_deps/gtest-src b/barretenberg/cpp/_deps/gtest-src new file mode 160000 index 00000000000..703bd9caab5 --- /dev/null +++ b/barretenberg/cpp/_deps/gtest-src @@ -0,0 +1 @@ +Subproject commit 703bd9caab50b139428cea1aaff9974ebee5742e diff --git a/yarn-project/noir-protocol-circuits/src/crates/rollup-lib/src/base/base_rollup_inputs.nr b/yarn-project/noir-protocol-circuits/src/crates/rollup-lib/src/base/base_rollup_inputs.nr index 9699f07a24b..f65a0fd5d86 100644 --- a/yarn-project/noir-protocol-circuits/src/crates/rollup-lib/src/base/base_rollup_inputs.nr +++ b/yarn-project/noir-protocol-circuits/src/crates/rollup-lib/src/base/base_rollup_inputs.nr @@ -204,7 +204,7 @@ impl BaseRollupInputs { ) } - fn create_nullifier_subtree(self, leaves: [NullifierLeafPreimage; N]) -> Field { + fn create_nullifier_subtree(leaves: [NullifierLeafPreimage; N]) -> Field { calculate_subtree(leaves.map(|leaf:NullifierLeafPreimage| leaf.hash())) } @@ -359,7 +359,7 @@ impl BaseRollupInputs { } } -fn verify_kernel_proof(proof: Proof) -> bool { +fn verify_kernel_proof(_proof: Proof) -> bool { // TODO: Just return true as we are mocking out the proof verification // and aggregation. // TODO(Kev): It may make sense to move all of these methods into a diff --git a/yarn-project/noir-protocol-circuits/src/crates/rollup-lib/src/components.nr b/yarn-project/noir-protocol-circuits/src/crates/rollup-lib/src/components.nr index e8891679b20..fd8f28e6d06 100644 --- a/yarn-project/noir-protocol-circuits/src/crates/rollup-lib/src/components.nr +++ b/yarn-project/noir-protocol-circuits/src/crates/rollup-lib/src/components.nr @@ -14,7 +14,7 @@ use dep::types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot; */ pub fn aggregate_proofs( left: BaseOrMergeRollupPublicInputs, - right: BaseOrMergeRollupPublicInputs + _right: BaseOrMergeRollupPublicInputs ) -> AggregationObject { // TODO: Similar to cpp code this does not do anything. left.aggregation_object diff --git a/yarn-project/noir-protocol-circuits/src/crates/rollup-lib/src/merkle_tree.nr b/yarn-project/noir-protocol-circuits/src/crates/rollup-lib/src/merkle_tree.nr index e941bbc369a..406a11059c8 100644 --- a/yarn-project/noir-protocol-circuits/src/crates/rollup-lib/src/merkle_tree.nr +++ b/yarn-project/noir-protocol-circuits/src/crates/rollup-lib/src/merkle_tree.nr @@ -4,7 +4,7 @@ struct MerkleTree { } impl MerkleTree { - fn new(leaves: [Field; N]) -> Self { + pub fn new(leaves: [Field; N]) -> Self { let mut nodes = [0; N]; // We need one less node than leaves, but we cannot have computed array lengths