Add alt_bn128 to QAP and Merkle tree gadget tests
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
* @copyright MIT license (see LICENSE file)
|
* @copyright MIT license (see LICENSE file)
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#include "algebra/curves/alt_bn128/alt_bn128_pp.hpp"
|
||||||
#ifdef CURVE_BN128
|
#ifdef CURVE_BN128
|
||||||
#include "algebra/curves/bn128/bn128_pp.hpp"
|
#include "algebra/curves/bn128/bn128_pp.hpp"
|
||||||
#endif
|
#endif
|
||||||
@@ -29,6 +30,9 @@ TEST(gadgetlib1, merkle_tree)
|
|||||||
{
|
{
|
||||||
start_profiling();
|
start_profiling();
|
||||||
|
|
||||||
|
alt_bn128_pp::init_public_params();
|
||||||
|
test_all_merkle_tree_gadgets<alt_bn128_pp>();
|
||||||
|
|
||||||
#ifdef CURVE_BN128 // BN128 has fancy dependencies so it may be disabled
|
#ifdef CURVE_BN128 // BN128 has fancy dependencies so it may be disabled
|
||||||
bn128_pp::init_public_params();
|
bn128_pp::init_public_params();
|
||||||
test_all_merkle_tree_gadgets<bn128_pp>();
|
test_all_merkle_tree_gadgets<bn128_pp>();
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "algebra/curves/alt_bn128/alt_bn128_pp.hpp"
|
||||||
#include "algebra/fields/field_utils.hpp"
|
#include "algebra/fields/field_utils.hpp"
|
||||||
#include "common/profiling.hpp"
|
#include "common/profiling.hpp"
|
||||||
#include "common/utils.hpp"
|
#include "common/utils.hpp"
|
||||||
@@ -91,9 +92,13 @@ TEST(relations, qap)
|
|||||||
|
|
||||||
enter_block("Test QAP with binary input");
|
enter_block("Test QAP with binary input");
|
||||||
|
|
||||||
|
test_qap<Fr<alt_bn128_pp> >(1ul << 21, num_inputs, true);
|
||||||
|
|
||||||
leave_block("Test QAP with binary input");
|
leave_block("Test QAP with binary input");
|
||||||
|
|
||||||
enter_block("Test QAP with field input");
|
enter_block("Test QAP with field input");
|
||||||
|
|
||||||
|
test_qap<Fr<alt_bn128_pp> >(1ul << 21, num_inputs, false);
|
||||||
|
|
||||||
leave_block("Test QAP with field input");
|
leave_block("Test QAP with field input");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user