25 auto P1 = point::random_element();
26 auto P2 = point::random_element();
27 auto z = scalar::random_element();
31 op_queue->no_op_ultra_only();
32 op_queue->random_op_ultra_only();
33 op_queue->random_op_ultra_only();
34 op_queue->random_op_ultra_only();
35 op_queue->add_accumulate(P1);
36 op_queue->mul_accumulate(P2, z);
37 op_queue->eq_and_reset();
40 op_queue->add_accumulate(P1);
41 op_queue->mul_accumulate(P2, z);
42 op_queue->add_accumulate(P1);
43 op_queue->mul_accumulate(P2, z);
44 op_queue->eq_and_reset();
46 op_queue->random_op_ultra_only();
47 op_queue->random_op_ultra_only();
50 Fq op_accumulator = 0;
51 Fq p_x_accumulator = 0;
52 Fq p_y_accumulator = 0;
53 Fq z_1_accumulator = 0;
54 Fq z_2_accumulator = 0;
64 const auto& ultra_ops = op_queue->get_ultra_ops();
65 for (
const auto& ultra_op : ultra_ops) {
67 if (ultra_op.op_code.is_random_op || ultra_op.op_code.value() == 0) {
70 op_accumulator = op_accumulator * x_inv + ultra_op.op_code.value();
71 const auto [x_u256, y_u256] = ultra_op.get_base_point_standard_form();
72 p_x_accumulator = p_x_accumulator * x_inv + x_u256;
73 p_y_accumulator = p_y_accumulator * x_inv + y_u256;
74 z_1_accumulator = z_1_accumulator * x_inv +
uint256_t(ultra_op.z_1);
75 z_2_accumulator = z_2_accumulator * x_inv +
uint256_t(ultra_op.z_2);
80 Fq result = ((((z_2_accumulator * batching_challenge + z_1_accumulator) * batching_challenge + p_y_accumulator) *