21TEST(PublicInputComponentTest, GoblinBigGroup)
27 using AffineElementNative = Curve::GroupNative::affine_element;
28 using FrNative = Curve::ScalarFieldNative;
32 AffineElementNative point_value = AffineElementNative::random_element();
36 PublicPoint::Key public_point_key;
43 builder.add_public_variable(FrNative::random_element());
44 builder.add_public_variable(FrNative::random_element());
47 G1 point = G1::from_witness(&
builder, point_value);
50 public_point_key = PublicPoint::set(point);
53 builder.add_public_variable(FrNative::random_element());
56 for (
const auto& idx :
builder.public_inputs()) {
57 public_inputs.push_back(
builder.get_variable(idx));
66 std::vector<Fr> stdlib_public_inputs;
67 stdlib_public_inputs.reserve(public_inputs.size());
68 for (
const auto& val : public_inputs) {
69 stdlib_public_inputs.push_back(Fr::from_witness(&
builder, val));
73 G1 reconstructed_point = PublicPoint::reconstruct(stdlib_public_inputs, public_point_key);
76 EXPECT_EQ(point_value, reconstructed_point.get_value());
82 AffineElementNative reconstructed_point = PublicPointNative::reconstruct(public_inputs, public_point_key);
85 EXPECT_EQ(point_value, reconstructed_point);