From dd012a07e6ffd0b3e2cbba1f7d4726b6b90d0730 Mon Sep 17 00:00:00 2001 From: Iluvmagick Date: Wed, 17 Jan 2024 00:30:31 +0400 Subject: [PATCH] Changed the default/testing mask to match intent. --- .../zk/commitments/detail/polynomial/proof_of_work.hpp | 2 +- test/commitment/proof_of_work.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/nil/crypto3/zk/commitments/detail/polynomial/proof_of_work.hpp b/include/nil/crypto3/zk/commitments/detail/polynomial/proof_of_work.hpp index c58f61f9c..be1f8e819 100644 --- a/include/nil/crypto3/zk/commitments/detail/polynomial/proof_of_work.hpp +++ b/include/nil/crypto3/zk/commitments/detail/polynomial/proof_of_work.hpp @@ -87,7 +87,7 @@ namespace nil { } }; - template + template class field_proof_of_work { public: using transcript_hash_type = TranscriptHashType; diff --git a/test/commitment/proof_of_work.cpp b/test/commitment/proof_of_work.cpp index 706c616f0..7f3f768f3 100644 --- a/test/commitment/proof_of_work.cpp +++ b/test/commitment/proof_of_work.cpp @@ -49,7 +49,7 @@ BOOST_AUTO_TEST_CASE(pow_poseidon_basic_test) { using integral_type = typename field_type::integral_type; using policy = nil::crypto3::hashes::detail::mina_poseidon_policy; using poseidon = nil::crypto3::hashes::poseidon; - const std::uint64_t mask = 0x1F; + const std::uint64_t mask = 0xFF00000000000000; using pow_type = nil::crypto3::zk::commitments::field_proof_of_work; nil::crypto3::zk::transcript::fiat_shamir_heuristic_sequential transcript; @@ -64,7 +64,7 @@ BOOST_AUTO_TEST_CASE(pow_poseidon_basic_test) { integral_type int_mask = integral_type(mask) << (field_type::modulus_bits - 64); BOOST_ASSERT((integral_type(chal.data) & int_mask) == 0); - using hard_pow_type = nil::crypto3::zk::commitments::field_proof_of_work; + using hard_pow_type = nil::crypto3::zk::commitments::field_proof_of_work; // check that random stuff doesn't pass verify BOOST_ASSERT(!hard_pow_type::verify(old_transcript_1, result)); }