46 auto out = pedersen_commitment::commit({ left, right });
48 info(
"num gates = ",
builder.get_estimated_num_finalized_gates());
51 EXPECT_EQ(result,
true);
55 EXPECT_EQ(out.x.get_value(), commit_native.x);
56 EXPECT_EQ(out.y.get_value(), commit_native.y);
63 std::vector<fr> inputs;
66 for (
size_t i = 0; i < 8; ++i) {
76 auto result = pedersen_commitment::commit(witness_inputs);
78 EXPECT_EQ(result.x.get_value(), expected.x);
79 EXPECT_EQ(result.y.get_value(), expected.y);
89 TestFixture::test_pedersen();
94 TestFixture::test_hash_constants();
typename stdlib::pedersen_commitment< Builder > pedersen_commitment
typename _curve::witness_ct witness_ct
static void test_hash_constants()
typename _curve::ScalarField fr_ct
typename _curve::public_witness_ct public_witness_ct
static void test_pedersen()
static bool check(const Builder &circuit)
Check the witness satisifies the circuit.
static AffineElement commit_native(const std::vector< Fq > &inputs, GeneratorContext context={})
Given a vector of fields, generate a pedersen commitment using the indexed generators.
bb::fr get_value() const
Given a := *this, compute its value given by a.v * a.mul + a.add.
RNG & get_debug_randomness(bool reset, std::uint_fast64_t seed)
Entry point for Barretenberg command-line interface.
TYPED_TEST_SUITE(ShpleminiTest, TestSettings)
TYPED_TEST(ShpleminiTest, CorrectnessOfMultivariateClaimBatching)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
testing::Types< bb::UltraCircuitBuilder > CircuitTypes
static constexpr field one()
static field random_element(numeric::RNG *engine=nullptr) noexcept
BB_INLINE constexpr field from_montgomery_form() const noexcept
field_t< CircuitBuilder > ScalarField
public_witness_t< CircuitBuilder > public_witness_ct
witness_t< CircuitBuilder > witness_ct