diff --git a/cpp/src/barretenberg/stdlib/hash/poseidon2/sponge/sponge.hpp b/cpp/src/barretenberg/stdlib/hash/poseidon2/sponge/sponge.hpp index 6d79834aa..a812ec781 100644 --- a/cpp/src/barretenberg/stdlib/hash/poseidon2/sponge/sponge.hpp +++ b/cpp/src/barretenberg/stdlib/hash/poseidon2/sponge/sponge.hpp @@ -53,16 +53,16 @@ template (builder, 0); + state[i] = witness_t::create_constant_witness(builder, 0); } - state[rate] = witness_t(builder, domain_iv.get_value()); + state[rate] = witness_t::create_constant_witness(builder, domain_iv.get_value()); } std::array perform_duplex() { // zero-pad the cache for (size_t i = cache_size; i < rate; ++i) { - cache[i] = witness_t(builder, 0); + cache[i] = witness_t::create_constant_witness(builder, 0); } // add the cache into sponge state for (size_t i = 0; i < rate; ++i) { @@ -122,7 +122,7 @@ template (builder, 0); + cache[cache_size] = witness_t::create_constant_witness(builder, 0); return result; }