69 auto P1 = point::random_element();
70 auto P2 = point::random_element();
71 auto z = scalar::random_element();
75 op_queue->construct_zk_columns();
76 op_queue->add_accumulate(P1);
77 op_queue->mul_accumulate(P2, z);
78 op_queue->eq_and_reset();
81 op_queue->add_accumulate(P1);
82 op_queue->mul_accumulate(P2, z);
83 op_queue->add_accumulate(P1);
84 op_queue->mul_accumulate(P2, z);
85 op_queue->eq_and_reset();
88 op_queue->random_op_ultra_only();
89 op_queue->random_op_ultra_only();
90 op_queue->merge_fixed_append(op_queue->get_append_offset());
130 auto P1 = point::random_element();
131 auto P2 = point::random_element();
134 op_queue->construct_zk_columns();
135 op_queue->add_accumulate(P1);
136 op_queue->add_accumulate(P2);
137 op_queue->add_accumulate(P1);
138 op_queue->eq_and_reset();
140 op_queue->random_op_ultra_only();
141 op_queue->random_op_ultra_only();
142 op_queue->merge_fixed_append(op_queue->get_append_offset());
162 auto P = point::random_element();
163 auto z1 = scalar::random_element();
164 auto z2 = scalar::random_element();
167 op_queue->construct_zk_columns();
168 op_queue->mul_accumulate(P, z1);
169 op_queue->mul_accumulate(P, z2);
170 op_queue->eq_and_reset();
172 op_queue->random_op_ultra_only();
173 op_queue->random_op_ultra_only();
174 op_queue->merge_fixed_append(op_queue->get_append_offset());
193 auto P = point::random_element();
196 op_queue->construct_zk_columns();
197 op_queue->add_accumulate(P);
198 op_queue->add_accumulate(P);
199 op_queue->eq_and_reset();
201 op_queue->random_op_ultra_only();
202 op_queue->random_op_ultra_only();
203 op_queue->merge_fixed_append(op_queue->get_append_offset());
222 auto P_infinity = point::infinity();
225 op_queue->construct_zk_columns();
226 op_queue->add_accumulate(P_infinity);
227 op_queue->eq_and_reset();
229 op_queue->random_op_ultra_only();
230 op_queue->random_op_ultra_only();
231 op_queue->merge_fixed_append(op_queue->get_append_offset());
251 auto P = point::random_element();
252 auto zero = scalar::zero();
255 op_queue->construct_zk_columns();
256 op_queue->mul_accumulate(P, zero);
257 op_queue->eq_and_reset();
259 op_queue->random_op_ultra_only();
260 op_queue->random_op_ultra_only();
261 op_queue->merge_fixed_append(op_queue->get_append_offset());
282 op_queue->construct_zk_columns();
285 for (
size_t i = 0; i < 20; ++i) {
286 auto P = point::random_element();
287 auto z = scalar::random_element();
288 op_queue->add_accumulate(P);
289 op_queue->mul_accumulate(P, z);
292 op_queue->eq_and_reset();
294 op_queue->random_op_ultra_only();
295 op_queue->random_op_ultra_only();
296 op_queue->merge_fixed_append(op_queue->get_append_offset());
316 auto P = point::random_element();
317 auto z = scalar::random_element();
323 op_queue1->construct_zk_columns();
324 op_queue1->add_accumulate(P);
325 op_queue1->mul_accumulate(P, z);
326 op_queue1->eq_and_reset();
328 op_queue1->random_op_ultra_only();
329 op_queue1->random_op_ultra_only();
330 op_queue1->merge_fixed_append(op_queue1->get_append_offset());
337 op_queue2->construct_zk_columns();
338 op_queue2->add_accumulate(P);
339 op_queue2->mul_accumulate(P, z);
340 op_queue2->eq_and_reset();
342 op_queue2->random_op_ultra_only();
343 op_queue2->random_op_ultra_only();
344 op_queue2->merge_fixed_append(op_queue2->get_append_offset());
350 Fq op_queue_1_with_randomness = compute_expected_result(op_queue1, batching_challenge, x,
true);
351 Fq op_queue_2_with_randomness = compute_expected_result(op_queue2, batching_challenge, x,
true);
352 Fq op_queue_1_without_randomness = compute_expected_result(op_queue1, batching_challenge, x,
false);
353 Fq op_queue_2_without_randomness = compute_expected_result(op_queue2, batching_challenge, x,
false);
354 Fq op_queue_1_randomness =
356 Fq op_queue_2_randomness =
359 EXPECT_EQ(result1 - result2, op_queue_1_randomness - op_queue_2_randomness);