diff --git a/cpp/src/barretenberg/stdlib/recursion/verification_key/verification_key.hpp b/cpp/src/barretenberg/stdlib/recursion/verification_key/verification_key.hpp index 915f63e5a3..0c91945554 100644 --- a/cpp/src/barretenberg/stdlib/recursion/verification_key/verification_key.hpp +++ b/cpp/src/barretenberg/stdlib/recursion/verification_key/verification_key.hpp @@ -339,7 +339,8 @@ template struct verification_key { return compressed_key; } - static barretenberg::fr compress_native(const std::shared_ptr& key, const size_t = 0) + static barretenberg::fr compress_native(const std::shared_ptr& key, + const size_t hash_index = 0) { std::vector preimage_data; @@ -365,10 +366,10 @@ template struct verification_key { barretenberg::fr compressed_key; if constexpr (Composer::type == ComposerType::PLOOKUP) { - compressed_key = - from_buffer(crypto::pedersen_commitment::lookup::compress_native(preimage_data)); + compressed_key = from_buffer( + crypto::pedersen_commitment::lookup::compress_native(preimage_data, hash_index)); } else { - compressed_key = crypto::pedersen_commitment::compress_native(preimage_data); + compressed_key = crypto::pedersen_commitment::compress_native(preimage_data, hash_index); } return compressed_key; } diff --git a/cpp/src/barretenberg/stdlib/recursion/verification_key/verification_key.test.cpp b/cpp/src/barretenberg/stdlib/recursion/verification_key/verification_key.test.cpp index b9cb01e079..755d751ff2 100644 --- a/cpp/src/barretenberg/stdlib/recursion/verification_key/verification_key.test.cpp +++ b/cpp/src/barretenberg/stdlib/recursion/verification_key/verification_key.test.cpp @@ -64,7 +64,7 @@ TYPED_TEST(VerificationKeyFixture, vk_data_vs_recursion_compress_native) EXPECT_EQ(vk_data.compress_native(0), RecursVk::compress_native(native_vk, 0)); // EXPECT_EQ(vk_data.compress_native(15), RecursVk::compress_native(native_vk, 15)); - // ne hash indeces still lead to ne compressions + // // ne hash indeces still lead to ne compressions // EXPECT_NE(vk_data.compress_native(0), RecursVk::compress_native(native_vk, 15)); // EXPECT_NE(vk_data.compress_native(14), RecursVk::compress_native(native_vk, 15)); } @@ -84,7 +84,7 @@ TYPED_TEST(VerificationKeyFixture, compress_vs_compress_native) EXPECT_EQ(recurs_vk->compress(0).get_value(), RecursVk::compress_native(native_vk, 0)); // EXPECT_EQ(recurs_vk->compress(15).get_value(), RecursVk::compress_native(native_vk, 15)); - // ne hash indeces still lead to ne compressions + // // ne hash indeces still lead to ne compressions // EXPECT_NE(recurs_vk->compress(0).get_value(), RecursVk::compress_native(native_vk, 15)); // EXPECT_NE(recurs_vk->compress(14).get_value(), RecursVk::compress_native(native_vk, 15)); }