Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
array.test.cpp
Go to the documentation of this file.
1#include "array.hpp"
2#include "../bool/bool.hpp"
6#include "field.hpp"
7#include <gtest/gtest.h>
8#include <utility>
9
10using namespace bb;
11
12namespace {
14}
15
16template <class T> void ignore_unused(T&) {} // use to ignore unused variables in lambdas
17
18template <typename Builder> class stdlib_array : public testing::Test {
23
24 public:
25 static void test_array_length()
26 {
28
29 constexpr size_t ARRAY_LEN = 10;
32
33 constexpr size_t filled = 6;
34 for (size_t i = 0; i < filled; i++) {
35 values[i] = fr::random_element();
36 values_ct[i] = witness_ct(&builder, values[i]);
37 }
38 auto filled_len = array_length<Builder>(values_ct);
39 EXPECT_EQ(filled_len.get_value(), filled);
40
41 info("num gates = ", builder.get_estimated_num_finalized_gates());
42 bool proof_result = CircuitChecker::check(builder);
43 EXPECT_EQ(proof_result, true);
44 }
45
47 {
49
51 auto filled_len = array_length<Builder>(values_ct);
52 EXPECT_EQ(filled_len.get_value(), 0);
53 EXPECT_TRUE(filled_len.is_constant());
54
55 info("num gates = ", builder.get_estimated_num_finalized_gates());
56 bool proof_result = CircuitChecker::check(builder);
57 EXPECT_EQ(proof_result, true);
58 }
59
61 {
63
64 constexpr size_t ARRAY_LEN = 10;
67
68 constexpr size_t filled = 6;
69 for (size_t i = 0; i < filled; i++) {
70 values[i] = fr::random_element();
71 values_ct[i] = witness_ct(&builder, values[i]);
72 }
73
74 // Put a zero in the middle of the array, so that the array_length function complains that all zeros thereafter
75 // should be zero.
76 values_ct[4] = 0;
77
78 array_length<Builder>(values_ct);
79
80 EXPECT_EQ(builder.failed(), true);
81 EXPECT_EQ(builder.err(), "Once we've hit the first zero, there must only be zeros thereafter!");
82 }
83
84 static void test_array_pop()
85 {
87
88 constexpr size_t ARRAY_LEN = 10;
91
92 constexpr size_t filled = 6;
93 for (size_t i = 0; i < filled; i++) {
94 values[i] = fr::random_element();
95 values_ct[i] = witness_ct(&builder, values[i]);
96 }
97 auto popped = array_pop<Builder>(values_ct);
98 EXPECT_EQ(popped.get_value(), values[filled - 1]);
99
100 info("num gates = ", builder.get_estimated_num_finalized_gates());
101 bool proof_result = CircuitChecker::check(builder);
102 EXPECT_EQ(proof_result, true);
103 };
104
106 {
108
109 constexpr size_t ARRAY_LEN = 10;
112
113 constexpr size_t filled = 0;
114 for (size_t i = 0; i < filled; i++) {
115 values[i] = fr::random_element();
116 values_ct[i] = witness_ct(&builder, values[i]);
117 }
118 for (size_t i = filled; i < ARRAY_LEN; i++) {
119 values[i] = 0;
120 values_ct[i] = witness_ct(&builder, values[i]);
121 }
122
123 auto popped = array_pop<Builder>(values_ct);
124 EXPECT_EQ(popped.get_value(), 0);
125
126 EXPECT_EQ(builder.failed(), true);
127 EXPECT_EQ(builder.err(), "array_pop cannot pop from an empty array");
128 };
129
130 static void test_array_push()
131 {
133
134 constexpr size_t ARRAY_LEN = 10;
137
138 constexpr size_t filled = 6;
139 for (size_t i = 0; i < filled; i++) {
140 values[i] = fr::random_element();
141 values_ct[i] = witness_ct(&builder, values[i]);
142 }
143 for (size_t i = filled; i < ARRAY_LEN; i++) {
144 values[i] = 0;
145 values_ct[i] = witness_ct(&builder, values[i]);
146 }
147
148 auto value_ct = field_ct(&builder, fr::random_element());
149 array_push<Builder>(values_ct, value_ct);
150 EXPECT_EQ(value_ct.get_value(), values_ct[filled].get_value());
151
152 info("num gates = ", builder.get_estimated_num_finalized_gates());
153 bool proof_result = CircuitChecker::check(builder);
154 EXPECT_EQ(proof_result, true);
155 }
156
158 {
160
161 constexpr size_t ARRAY_LEN = 10;
162 std::array<std::optional<fr>, ARRAY_LEN> values;
163 std::array<std::optional<field_ct>, ARRAY_LEN> values_ct;
164
165 // Fill the array with some values
166 for (size_t i = 0; i < ARRAY_LEN; i++) {
167 values[i] = std::nullopt;
168 values_ct[i] = std::nullopt;
169 }
170
171 // Push some values into the array
172 size_t num_pushes = 0;
173 for (size_t i = 0; i < ARRAY_LEN; i++) {
175 size_t idx = array_push<Builder>(values_ct, value);
176 EXPECT_TRUE(values_ct[idx].has_value());
177 EXPECT_EQ(values_ct[idx].value().get_value(), value.get_value());
178 num_pushes++;
179 }
180
181 // Make sure the array is full now
182 try {
184 array_push<Builder>(values_ct, value);
185 FAIL() << "array_push should have thrown an exception when trying to push to a full array";
186 } catch (std::runtime_error& e) {
187 EXPECT_EQ(e.what(), std::string("array_push cannot push to a full array"));
188 }
189
190 EXPECT_EQ(num_pushes, ARRAY_LEN);
191
192 info("num gates = ", builder.get_estimated_num_finalized_gates());
193 bool proof_result = CircuitChecker::check(builder);
194 EXPECT_EQ(proof_result, true);
195 }
196
198 {
199 constexpr size_t ARRAY_LEN = 5;
200 std::array<std::shared_ptr<int>, ARRAY_LEN> arr;
201 for (size_t i = 0; i < arr.size(); ++i) {
202 arr[i] = nullptr;
203 }
204
205 // Fill the array up to capacity
206 for (size_t i = 0; i < arr.size(); ++i) {
207 arr[i] = std::make_shared<int>(i);
208 }
209
210 // Attempt to push a value to the array
212 EXPECT_THROW(array_push<Builder>(arr, new_value), std::runtime_error);
213
214 // Ensure that the array was not modified
215 for (size_t i = 0; i < arr.size(); ++i) {
216 EXPECT_NE(arr[i], new_value);
217 }
218 }
219
221 {
223
224 constexpr size_t ARRAY_LEN = 10;
227
228 // Test non-empty array
229 constexpr size_t filled = 3;
230 for (size_t i = 0; i < filled; i++) {
231 values[i] = fr::random_element();
232 values_ct[i] = witness_ct(&builder, values[i]);
233 }
234 for (size_t i = filled; i < ARRAY_LEN; i++) {
235 values[i] = 0;
236 values_ct[i] = witness_ct(&builder, values[i]);
237 }
238 auto is_empty = is_array_empty<Builder>(values_ct);
239 EXPECT_EQ(is_empty.get_value(), false);
240
241 // Test empty array
242 for (size_t i = 0; i < ARRAY_LEN; i++) {
243 values[i] = 0;
244 values_ct[i] = witness_ct(&builder, values[i]);
245 }
246 is_empty = is_array_empty<Builder>(values_ct);
247 EXPECT_EQ(is_empty.get_value(), true);
248
249 info("num gates = ", builder.get_estimated_num_finalized_gates());
250 bool proof_result = CircuitChecker::check(builder);
251 EXPECT_EQ(proof_result, true);
252 };
253
254 template <size_t size_1, size_t size_2>
256 std::array<fr, size_1> const& source,
257 std::array<fr, size_2> const& target,
258 std::array<fr, size_2> const& expected_target,
259 bool const expect_fail = false)
260 {
263 for (size_t i = 0; i < source.size(); i++) {
264 source_ct[i] = witness_ct(&builder, source[i]);
265 }
266 for (size_t i = 0; i < target.size(); i++) {
267 target_ct[i] = witness_ct(&builder, target[i]);
268 }
269
270 push_array_to_array<Builder>(source_ct, target_ct);
271
272 // Check that the source array has been inserted into the first available index of the target array.
273 if (!expect_fail) {
274 for (size_t i = 0; i < target.size(); i++) {
275 EXPECT_EQ(target_ct[i].get_value(), expected_target[i]);
276 }
277 }
278
279 bool proof_result = false;
280 if (!builder.failed()) {
281 info("num gates = ", builder.get_estimated_num_finalized_gates());
282 proof_result = CircuitChecker::check(builder);
283 }
284
285 return std::make_pair(proof_result, builder.err());
286 }
287
289 {
290 // Benchmark
292
293 std::array<fr, 64> source;
294 std::array<fr, 128> target = { 0 };
295 std::array<fr, 128> expected_target;
296 for (size_t i = 0; i < source.max_size(); ++i) {
297 source[i] = i + 1;
298 target[i] = i + 1;
299 expected_target[i] = i + 1;
300 expected_target[i + source.max_size()] = i + 1;
301 };
302 bool proof_result;
303 std::string error;
304 std::tie(proof_result, error) = test_push_array_to_array_helper(builder, source, target, expected_target);
305
306 EXPECT_TRUE(proof_result);
307 }
308
310 {
312
313 std::array<fr, 4> source = { 1, 0, 0, 0 };
314 std::array<fr, 4> target = { 3, 0, 0, 0 };
315 std::array<fr, 4> expected_target = { 3, 1, 0, 0 };
316 bool proof_result;
317 std::string error;
318 std::tie(proof_result, error) = test_push_array_to_array_helper(builder, source, target, expected_target);
319
320 EXPECT_TRUE(proof_result);
321 }
322
324 {
326
327 std::array<fr, 4> source = { 3, 4, 0, 0 };
328 std::array<fr, 4> target = { 1, 2, 0, 0 };
329 std::array<fr, 4> expected_target = { 1, 2, 3, 4 };
330 bool proof_result;
331 std::string error;
332 std::tie(proof_result, error) = test_push_array_to_array_helper(builder, source, target, expected_target);
333
334 EXPECT_TRUE(proof_result);
335 }
336
338 {
340
341 std::array<fr, 4> source = { 1, 2, 3, 0 };
342 std::array<fr, 4> target = { 0, 0, 0, 0 };
343 std::array<fr, 4> expected_target = { 1, 2, 3, 0 };
344 bool proof_result;
345 std::string error;
346 std::tie(proof_result, error) = test_push_array_to_array_helper(builder, source, target, expected_target);
347
348 EXPECT_TRUE(proof_result);
349 }
350
352 {
354
355 std::array<fr, 3> source = { 1, 2, 3 };
356 std::array<fr, 6> target = { 4, 5, 6, 0, 0, 0 };
357 std::array<fr, 6> expected_target = { 4, 5, 6, 1, 2, 3 };
358 bool proof_result;
359 std::string error;
360 std::tie(proof_result, error) = test_push_array_to_array_helper(builder, source, target, expected_target);
361
362 EXPECT_TRUE(proof_result);
363 }
364
366 {
367 // null means array size is 0
369
370 std::array<fr, 0> source;
371 std::array<fr, 4> target = { 1, 2, 0, 0 };
372 std::array<fr, 4> expected_target = { 1, 2, 0, 0 };
373 bool proof_result;
374 std::string error;
375 std::tie(proof_result, error) = test_push_array_to_array_helper(builder, source, target, expected_target);
376
377 EXPECT_TRUE(proof_result);
378 }
379
381 {
383
384 std::array<fr, 4> source = { 1, 2, 0, 0 };
385 std::array<fr, 0> target;
386 std::array<fr, 0> expected_target;
387 bool proof_result;
388 std::string error;
389 std::tie(proof_result, error) = test_push_array_to_array_helper(builder, source, target, expected_target);
390
391 EXPECT_FALSE(proof_result);
392 EXPECT_EQ(error, "push_array_to_array target array capacity exceeded");
393 }
394
396 {
398
399 std::array<fr, 1> source = { 1 };
400 std::array<fr, 1> target = { 0 };
401 std::array<fr, 1> expected_target = { 1 };
402 bool proof_result;
403 std::string error;
404 std::tie(proof_result, error) = test_push_array_to_array_helper(builder, source, target, expected_target);
405
406 EXPECT_TRUE(proof_result);
407 }
408
410 {
412
413 std::array<fr, 1> source = { 0 };
414 std::array<fr, 1> target = { 1 };
415 std::array<fr, 1> expected_target = { 1 };
416 bool proof_result;
417 std::string error;
418 std::tie(proof_result, error) = test_push_array_to_array_helper(builder, source, target, expected_target);
419
420 EXPECT_TRUE(proof_result);
421 }
422
424 {
426
427 std::array<fr, 1> source = { 2 };
428 std::array<fr, 1> target = { 1 };
429 std::array<fr, 1> expected_target = { 1 };
430 bool proof_result;
431 std::string error;
432 std::tie(proof_result, error) = test_push_array_to_array_helper(builder, source, target, expected_target);
433
434 EXPECT_FALSE(proof_result);
435 EXPECT_EQ(error, "push_array_to_array target array capacity exceeded");
436 }
437
439 {
441
442 std::array<fr, 5> source = { 1, 2, 3, 4, 5 };
443 std::array<fr, 5> target = { 5, 6, 7, 8, 9 };
444 std::array<fr, 5> expected_target = { 5, 6, 7, 8, 9 };
445 bool proof_result;
446 std::string error;
447 bool expect_fail = true;
448 std::tie(proof_result, error) =
449 test_push_array_to_array_helper(builder, source, target, expected_target, expect_fail);
450
451 EXPECT_FALSE(proof_result);
452 EXPECT_EQ(error, "push_array_to_array target array capacity exceeded");
453 }
454
456 {
458
459 std::array<fr, 4> source = { 1, 0, 2, 3 };
460 std::array<fr, 6> target = { 4, 5, 6, 7, 8, 0 };
461 std::array<fr, 6> expected_target = { 4, 5, 6, 7, 8, 0 };
462 bool proof_result;
463 std::string error;
464 bool expect_fail = true;
465 std::tie(proof_result, error) =
466 test_push_array_to_array_helper(builder, source, target, expected_target, expect_fail);
467
468 EXPECT_FALSE(proof_result);
469 EXPECT_EQ(error, "Once we've hit the first source zero, there must only be zeros thereafter!");
470 }
471
473 {
475
476 std::array<fr, 3> source = { 1, 0, 3 };
477 std::array<fr, 6> target = { 4, 5, 2, 0, 0, 0 };
478 std::array<fr, 6> expected_target = { 4, 5, 2, 1, 0, 3 };
479 bool proof_result;
480 std::string error;
481 bool expect_fail = true;
482 std::tie(proof_result, error) =
483 test_push_array_to_array_helper(builder, source, target, expected_target, expect_fail);
484
485 EXPECT_FALSE(proof_result);
486 EXPECT_EQ(error, "Once we've hit the first source zero, there must only be zeros thereafter!");
487 }
488
490 {
492
493 std::array<fr, 3> source = { 1, 2, 3 };
494 std::array<fr, 6> target = { 4, 5, 0, 6, 7, 8 };
495 std::array<fr, 6> expected_target = { 4, 5, 0, 6, 7, 8 };
496 bool proof_result;
497 std::string error;
498 bool expect_fail = true;
499 std::tie(proof_result, error) =
500 test_push_array_to_array_helper(builder, source, target, expected_target, expect_fail);
501
502 EXPECT_FALSE(proof_result);
503 EXPECT_EQ(error, "Once we've hit the first zero, there must only be zeros thereafter!");
504 }
505
507 {
509
510 std::array<fr, 3> source = { 1, 0, 3 };
511 std::array<fr, 6> target = { 4, 5, 0, 6, 7, 8 };
512 std::array<fr, 6> expected_target = { 4, 5, 0, 6, 7, 8 };
513 bool proof_result;
514 std::string error;
515 bool expect_fail = true;
516 std::tie(proof_result, error) =
517 test_push_array_to_array_helper(builder, source, target, expected_target, expect_fail);
518
519 EXPECT_FALSE(proof_result);
520 // TODO(https://github.com/AztecProtocol/barretenberg/issues/666):
521 EXPECT_EQ(error, "Once we've hit the first zero, there must only be zeros thereafter!");
522 }
523
524 class MockClass {
525 public:
527 : m_a(field_ct(0))
528 , m_b(field_ct(0))
529 {}
531 : m_a(a)
532 , m_b(b)
533 {}
534
535 bool_ct is_empty() const { return m_a == 0 && m_b == 0; }
536
538
539 void conditional_select(bool_ct const& condition, MockClass const& other)
540 {
541 m_a = field_ct::conditional_assign(condition, other.m_a, m_a);
542 m_b = field_ct::conditional_assign(condition, other.m_b, m_b);
543 }
544
545 private:
548 };
549
551 {
553
554 constexpr size_t SIZE = 5;
556
557 // Push values into the array
558 stdlib::array_push<Builder>(arr, MockClass(witness_ct(&builder, 1), witness_ct(&builder, 10)));
559 stdlib::array_push<Builder>(arr, MockClass(witness_ct(&builder, 2), witness_ct(&builder, 20)));
560 stdlib::array_push<Builder>(arr, MockClass(witness_ct(&builder, 3), witness_ct(&builder, 30)));
561
562 // Check the values in the array
563 EXPECT_EQ(arr[0].get_values().first.get_value(), 1);
564 EXPECT_EQ(arr[0].get_values().second.get_value(), 10);
565 EXPECT_EQ(arr[1].get_values().first.get_value(), 2);
566 EXPECT_EQ(arr[1].get_values().second.get_value(), 20);
567 EXPECT_EQ(arr[2].get_values().first.get_value(), 3);
568 EXPECT_EQ(arr[2].get_values().second.get_value(), 30);
569
570 info("num gates = ", builder.get_estimated_num_finalized_gates());
571 bool proof_result = CircuitChecker::check(builder);
572 EXPECT_EQ(proof_result, true);
573 }
574
576 {
578
579 constexpr size_t SIZE = 5;
581
582 // Push values into the array
583 stdlib::array_push<Builder>(arr, MockClass(witness_ct(&builder, 1), witness_ct(&builder, 10)));
584 stdlib::array_push<Builder>(arr, MockClass(witness_ct(&builder, 2), witness_ct(&builder, 20)));
585 stdlib::array_push<Builder>(arr, MockClass(witness_ct(&builder, 3), witness_ct(&builder, 30)));
586 stdlib::array_push<Builder>(arr, MockClass(witness_ct(&builder, 4), witness_ct(&builder, 40)));
587 stdlib::array_push<Builder>(arr, MockClass(witness_ct(&builder, 5), witness_ct(&builder, 50)));
588
589 // Try to push into a full array
590 stdlib::array_push<Builder>(arr, MockClass(witness_ct(&builder, 6), witness_ct(&builder, 60)));
591
592 EXPECT_EQ(builder.failed(), true);
593 EXPECT_EQ(builder.err(), "array_push cannot push to a full array");
594 }
595};
596
597typedef testing::Types<bb::UltraCircuitBuilder> CircuitTypes;
598
600
601TYPED_TEST(stdlib_array, test_array_length)
602{
603 TestFixture::test_array_length();
604}
605TYPED_TEST(stdlib_array, test_array_length_null)
606{
607 TestFixture::test_array_length_null();
608}
609TYPED_TEST(stdlib_array, test_array_length_fails)
610{
611 TestFixture::test_array_length_fails();
612}
613TYPED_TEST(stdlib_array, test_array_pop)
614{
615 TestFixture::test_array_pop();
616}
617TYPED_TEST(stdlib_array, test_array_pop_from_empty)
618{
619 TestFixture::test_array_pop_from_empty();
620}
621TYPED_TEST(stdlib_array, test_array_push)
622{
623 TestFixture::test_array_push();
624}
625TYPED_TEST(stdlib_array, test_array_push_optional)
626{
627 TestFixture::test_array_push_optional();
628}
629TYPED_TEST(stdlib_array, test_array_push_generic)
630{
631 TestFixture::test_array_push_generic();
632}
633TYPED_TEST(stdlib_array, test_array_push_generic_full)
634{
635 TestFixture::test_array_push_generic_full();
636}
637// push array to array (pata) tests
638TYPED_TEST(stdlib_array, test_pata_large_bench)
639{
640 TestFixture::test_pata_large_bench();
641}
642TYPED_TEST(stdlib_array, test_pata_same_size_not_full_to_not_full)
643{
644 TestFixture::test_pata_same_size_not_full_to_not_full();
645}
646TYPED_TEST(stdlib_array, test_pata_same_size_not_full_to_not_full_2)
647{
648 TestFixture::test_pata_same_size_not_full_to_not_full_2();
649}
650TYPED_TEST(stdlib_array, test_pata_same_size_not_full_to_empty)
651{
652 TestFixture::test_pata_same_size_not_full_to_empty();
653}
654TYPED_TEST(stdlib_array, test_pata_smaller_source_full_to_not_full)
655{
656 TestFixture::test_pata_smaller_source_full_to_not_full();
657}
658TYPED_TEST(stdlib_array, test_pata_null_source)
659{
660 TestFixture::test_pata_null_source();
661}
662TYPED_TEST(stdlib_array, test_pata_null_target_fails)
663{
664 TestFixture::test_pata_null_target_fails();
665}
666TYPED_TEST(stdlib_array, test_pata_singletons_full_to_not_full)
667{
668 TestFixture::test_pata_singletons_full_to_not_full();
669}
670TYPED_TEST(stdlib_array, test_pata_singletons_not_full_to_full)
671{
672 TestFixture::test_pata_singletons_not_full_to_full();
673}
674TYPED_TEST(stdlib_array, test_pata_singletons_full_to_full)
675{
676 TestFixture::test_pata_singletons_full_to_full();
677}
678TYPED_TEST(stdlib_array, test_pata_same_size_full_to_full_fails)
679{
680 TestFixture::test_pata_same_size_full_to_full_fails();
681}
682TYPED_TEST(stdlib_array, test_pata_nonzero_after_zero_source_fails)
683{
684 TestFixture::test_pata_nonzero_after_zero_source_fails();
685}
686TYPED_TEST(stdlib_array, test_pata_nonzero_after_zero_source_fails_2)
687{
688 TestFixture::test_pata_nonzero_after_zero_source_fails_2();
689}
690TYPED_TEST(stdlib_array, test_pata_nonzero_after_zero_target_fails)
691{
692 TestFixture::test_pata_nonzero_after_zero_target_fails();
693}
694TYPED_TEST(stdlib_array, test_pata_nonzero_after_zero_target_fails_2)
695{
696 TestFixture::test_pata_nonzero_after_zero_target_fails_2();
697}
testing::Types< bb::UltraCircuitBuilder > CircuitTypes
void ignore_unused(T &)
static bool check(const Builder &circuit)
Check the witness satisifies the circuit.
Implements boolean logic in-circuit.
Definition bool.hpp:59
static field_t conditional_assign(const bool_t< Builder > &predicate, const field_t &lhs, const field_t &rhs)
If predicate == true then return lhs, else return rhs.
Definition field.cpp:884
bool_ct is_empty() const
MockClass(field_ct a, field_ct b)
std::pair< field_ct, field_ct > get_values()
void conditional_select(bool_ct const &condition, MockClass const &other)
static void test_pata_same_size_not_full_to_not_full_2()
stdlib::field_t< Builder > field_ct
static void test_pata_null_target_fails()
static void test_pata_nonzero_after_zero_source_fails_2()
stdlib::witness_t< Builder > witness_ct
static void test_pata_smaller_source_full_to_not_full()
static void test_pata_null_source()
static void test_array_length_null()
static void test_is_array_empty()
static auto test_push_array_to_array_helper(Builder &builder, std::array< fr, size_1 > const &source, std::array< fr, size_2 > const &target, std::array< fr, size_2 > const &expected_target, bool const expect_fail=false)
static void test_pata_same_size_not_full_to_empty()
static void test_pata_large_bench()
static void test_pata_nonzero_after_zero_source_fails()
void test_array_push_generic_full()
static void test_array_pop_from_empty()
static void test_array_length()
void test_array_push_generic()
static void test_array_push()
static void test_pata_same_size_not_full_to_not_full()
static void test_pata_singletons_full_to_not_full()
static void test_pata_singletons_not_full_to_full()
static void test_pata_singletons_full_to_full()
static void test_array_length_fails()
static void test_array_push_shared_ptr()
static void test_pata_same_size_full_to_full_fails()
static void test_pata_nonzero_after_zero_target_fails()
static void test_array_pop()
static void test_array_push_optional()
static void test_pata_nonzero_after_zero_target_fails_2()
void info(Args... args)
Definition log.hpp:70
AluTraceBuilder builder
Definition alu.test.cpp:123
FF a
FF b
ECCVMCircuitBuilder Builder
numeric::RNG & engine
RNG & get_debug_randomness(bool reset, std::uint_fast64_t seed)
Definition engine.cpp:190
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
Definition tuple.hpp:13
testing::Types< bb::UltraCircuitBuilder > CircuitTypes
static field random_element(numeric::RNG *engine=nullptr) noexcept