20 if (!parsing_result.has_value()) {
23 auto [batching_challenge, x, op_queue] = parsing_result.value();
28 auto op_accumulator =
Fq(0);
29 auto p_x_accumulator =
Fq(0);
30 auto p_y_accumulator =
Fq(0);
31 auto z_1_accumulator =
Fq(0);
32 auto z_2_accumulator =
Fq(0);
34 const auto& eccvm_ops = op_queue->get_eccvm_ops();
35 for (
const auto& ecc_op : eccvm_ops) {
36 op_accumulator = op_accumulator * x_inv + ecc_op.op_code.value();
37 p_x_accumulator = p_x_accumulator * x_inv + ecc_op.base_point.x;
38 p_y_accumulator = p_y_accumulator * x_inv + ecc_op.base_point.y;
39 z_1_accumulator = z_1_accumulator * x_inv + ecc_op.z1;
40 z_2_accumulator = z_2_accumulator * x_inv + ecc_op.z2;
42 Fq x_pow = x.
pow(eccvm_ops.size() - 1);
45 [[maybe_unused]]
Fq result =
46 ((((z_2_accumulator * batching_challenge + z_1_accumulator) * batching_challenge + p_y_accumulator) *
std::optional< std::tuple< Fq, Fq, std::shared_ptr< ECCOpQueue > > > parse_and_construct_opqueue(const unsigned char *data, size_t size)
Try to parse out the batching and evaluating challenges and then the ECCOpQueue from the data.
int LLVMFuzzerTestOneInput(const unsigned char *data, size_t size)
A very primitive fuzzing harness, no interesting mutations, just parse and throw at the circuit build...