Skip to content

Commit

Permalink
Fixed forgotten include directives and renamed to circuits_utils for …
Browse files Browse the repository at this point in the history
…consistency
  • Loading branch information
AntoineRondelet committed Apr 1, 2020
1 parent a3eb8d7 commit 4ccf7e0
Show file tree
Hide file tree
Showing 47 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion libzeth/circuits/binary_operation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef __ZETH_CIRCUITS_BINARY_OPERATION_HPP__
#define __ZETH_CIRCUITS_BINARY_OPERATION_HPP__

#include "libzeth/circuits/circuits-utils.hpp"
#include "libzeth/circuits/circuits_utils.hpp"
#include "libzeth/types/bits.hpp"
#include "math.h"

Expand Down
2 changes: 1 addition & 1 deletion libzeth/circuits/binary_operation.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef __ZETH_CIRCUITS_BINARY_OPERATION_TCC__
#define __ZETH_CIRCUITS_BINARY_OPERATION_TCC__

#include "libzeth/circuits/circuits-utils.hpp"
#include "libzeth/circuits/circuits_utils.hpp"
#include "libzeth/types/bits.hpp"

#include <libsnark/gadgetlib1/gadget.hpp>
Expand Down
2 changes: 1 addition & 1 deletion libzeth/circuits/blake2s/blake2s_comp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "libzeth/circuits/binary_operation.hpp"
#include "libzeth/circuits/blake2s/g_primitive.hpp"
#include "libzeth/circuits/circuits-utils.hpp"
#include "libzeth/circuits/circuits_utils.hpp"
#include "libzeth/types/bits.hpp"
#include "libzeth/util.hpp"

Expand Down
2 changes: 1 addition & 1 deletion libzeth/circuits/blake2s/g_primitive.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define __ZETH_CIRCUITS_G_PRIMITIVE_HPP__

#include "libzeth/circuits/binary_operation.hpp"
#include "libzeth/circuits/circuits-utils.hpp"
#include "libzeth/circuits/circuits_utils.hpp"
#include "libzeth/types/bits.hpp"

#include <libsnark/gadgetlib1/gadget.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: LGPL-3.0+

#include <libzeth/circuits/circuits-utils.hpp>
#include "libzeth/circuits/circuits_utils.hpp"

namespace libzeth
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ std::vector<unsigned long> bit_list_to_ints(
std::vector<bool> bit_list, const size_t wordsize);

} // namespace libzeth
#include "libzeth/circuits/circuits-utils.tcc"
#include "libzeth/circuits/circuits_utils.tcc"

#endif // __ZETH_CIRCUITS_CIRCUITS_UTILS_HPP__
File renamed without changes.
2 changes: 1 addition & 1 deletion libzeth/circuits/commitments/commitment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,6 @@ class COMM_cm_gadget : public libsnark::gadget<FieldT>
};

} // namespace libzeth
#include <libzeth/circuits/commitments/commitment.tcc>
#include "libzeth/circuits/commitments/commitment.tcc"

#endif // __ZETH_CIRCUITS_COMMITMENT_HPP__
2 changes: 1 addition & 1 deletion libzeth/circuits/merkle_tree/merkle_path_selector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ class merkle_path_selector : public libsnark::gadget<FieldT>
};

} // namespace libzeth
#include <libzeth/circuits/merkle_tree/merkle_path_selector.tcc>
#include "libzeth/circuits/merkle_tree/merkle_path_selector.tcc"

#endif // __ZETH_CIRCUITS_MERKLE_PATH_SELECTOR_HPP___
2 changes: 1 addition & 1 deletion libzeth/circuits/mimc/mimc_round.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef __ZETH_CIRCUITS_MIMC_ROUND_HPP__
#define __ZETH_CIRCUITS_MIMC_ROUND_HPP__

#include "libzeth/circuits/circuits-utils.hpp"
#include "libzeth/circuits/circuits_utils.hpp"

#include <libsnark/gadgetlib1/gadget.hpp>

Expand Down
2 changes: 1 addition & 1 deletion libzeth/circuits/notes/note.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "libzeth/circuits/commitments/commitment.hpp"
#include "libzeth/circuits/prfs/prf.hpp"
// Get the utils functions
#include "libzeth/circuits/circuits-utils.hpp"
#include "libzeth/circuits/circuits_utils.hpp"

// Get the bits typedefs and associated functions
#include "libzeth/types/bits.hpp"
Expand Down
2 changes: 1 addition & 1 deletion libzeth/circuits/notes/note.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Content Taken and adapted from Zcash
// https://github.com/zcash/zcash/blob/master/src/zcash/circuit/note.tcc

#include <libzeth/circuits/notes/note.hpp>
#include "libzeth/circuits/notes/note.hpp"

namespace libzeth
{
Expand Down
2 changes: 1 addition & 1 deletion libzeth/circuits/prfs/prf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Content Taken and adapted from Zcash
// https://github.com/zcash/zcash/blob/master/src/zcash/circuit/prfs.tcc

#include "libzeth/circuits/circuits-utils.hpp"
#include "libzeth/circuits/circuits_utils.hpp"

#include <libsnark/gadgetlib1/gadget.hpp>

Expand Down
2 changes: 1 addition & 1 deletion libzeth/circuits/safe_arithmetic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: LGPL-3.0+

#include <libzeth/circuits/safe_arithmetic.hpp>
#include "libzeth/circuits/safe_arithmetic.hpp"

namespace libzeth
{
Expand Down
2 changes: 1 addition & 1 deletion libzeth/circuits/sha256/sha256_ethereum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ class sha256_ethereum : public libsnark::gadget<FieldT>
};

} // namespace libzeth
#include <libzeth/circuits/sha256/sha256_ethereum.tcc>
#include "libzeth/circuits/sha256/sha256_ethereum.tcc"

#endif // __ZETH_CIRCUITS_SHA256_ETHEREUM_HPP__
2 changes: 1 addition & 1 deletion libzeth/circuits/sha256/sha256_ethereum.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// https://gist.github.com/kobigurk/24c25e68219df87c348f1a78db51bb52

// Get the from_bits function
#include <libzeth/circuits/circuits-utils.hpp>
#include "libzeth/circuits/circuits_utils.hpp"

// This gadget implements the interface of the HashT template

Expand Down
2 changes: 1 addition & 1 deletion libzeth/libsnark_helpers/debug_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ boost::filesystem::path get_path_to_debug_directory();
bool replace(std::string &str, const std::string &from, const std::string &to);

} // namespace libzeth
#include <libzeth/libsnark_helpers/debug_helpers.tcc>
#include "libzeth/libsnark_helpers/debug_helpers.tcc"

#endif // __ZETH_DEBUG_HELPERS_HPP__
2 changes: 1 addition & 1 deletion libzeth/libsnark_helpers/extended_proof.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

// Snark dependent implementation for generate_trusted_setup() and prove()
// functions
#include <libzeth/snarks_core_imports.hpp>
#include "libzeth/snarks_core_imports.hpp"

namespace libzeth
{
Expand Down
2 changes: 1 addition & 1 deletion libzeth/snarks/groth16/core/computation.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef __ZETH_COMPUTATION_TCC__
#define __ZETH_COMPUTATION_TCC__

#include <libzeth/snarks/groth16/core/computation.hpp>
#include "libzeth/snarks/groth16/core/computation.hpp"

namespace libzeth
{
Expand Down
3 changes: 2 additions & 1 deletion libzeth/snarks/groth16/mpc/chacha_rng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
//
// SPDX-License-Identifier: LGPL-3.0+

#include "libzeth/snarks/groth16/mpc/chacha_rng.hpp"

#include <algorithm>
#include <cstring>
#include <libzeth/snarks/groth16/mpc/chacha_rng.hpp>
#include <sodium/crypto_stream_chacha20.h>

/// RNG based on:
Expand Down
2 changes: 1 addition & 1 deletion libzeth/snarks/groth16/mpc/multi_exp.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef __ZETH_SNARKS_GROTH16_MULTI_EXP_TCC__
#define __ZETH_SNARKS_GROTH16_MULTI_EXP_TCC__

#include <libzeth/snarks/groth16/mpc/multi_exp.hpp>
#include "libzeth/snarks/groth16/mpc/multi_exp.hpp"

namespace libzeth
{
Expand Down
2 changes: 1 addition & 1 deletion libzeth/snarks/groth16/mpc/phase2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: LGPL-3.0+

#include <libzeth/snarks/groth16/mpc/phase2.hpp>
#include "libzeth/snarks/groth16/mpc/phase2.hpp"

namespace libzeth
{
Expand Down
2 changes: 1 addition & 1 deletion libzeth/snarks/groth16/mpc/powersoftau_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: LGPL-3.0+

#include <libzeth/snarks/groth16/mpc/powersoftau_utils.hpp>
#include "libzeth/snarks/groth16/mpc/powersoftau_utils.hpp"

namespace libzeth
{
Expand Down
2 changes: 1 addition & 1 deletion libzeth/test/binary_operation_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <libff/common/default_types/ec_pp.hpp>

// Access the `from_bits` function and other utils
#include "libzeth/circuits/circuits-utils.hpp"
#include "libzeth/circuits/circuits_utils.hpp"
#include "libzeth/util.hpp"

using namespace libzeth;
Expand Down
2 changes: 1 addition & 1 deletion libzeth/test/blake2s_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <libff/common/default_types/ec_pp.hpp>

// Access the `from_bits` function and other utils
#include "libzeth/circuits/circuits-utils.hpp"
#include "libzeth/circuits/circuits_utils.hpp"
#include "libzeth/util.hpp"

using namespace libsnark;
Expand Down
2 changes: 1 addition & 1 deletion libzeth/test/commitments_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "libzeth/circuits/blake2s/blake2s_comp.hpp"

// Access the `from_bits` function and other utils
#include "libzeth/circuits/circuits-utils.hpp"
#include "libzeth/circuits/circuits_utils.hpp"
#include "libzeth/util.hpp"

// Get the gadget to test
Expand Down
3 changes: 2 additions & 1 deletion libzeth/test/mimc_mp_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
//
// SPDX-License-Identifier: LGPL-3.0+

#include "libzeth/circuits/mimc/mimc_mp.hpp"

#include "gtest/gtest.h"
#include <libff/common/default_types/ec_pp.hpp>
#include <libzeth/circuits/mimc/mimc_mp.hpp>

using namespace libzeth;

Expand Down
2 changes: 1 addition & 1 deletion libzeth/test/note_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "libzeth/circuits/blake2s/blake2s_comp.hpp"

// Access the `from_bits` function and other utils
#include "libzeth/circuits/circuits-utils.hpp"
#include "libzeth/circuits/circuits_utils.hpp"
#include "libzeth/util.hpp"

// Access the defined constants
Expand Down
2 changes: 1 addition & 1 deletion libzeth/test/packed_addition_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "libzeth/zeth.h"

// Include the type we need
#include "libzeth/circuits/circuits-utils.hpp"
#include "libzeth/circuits/circuits_utils.hpp"
#include "libzeth/circuits/notes/note.hpp"
#include "libzeth/types/bits.hpp"
#include "libzeth/types/joinsplit.hpp"
Expand Down
2 changes: 1 addition & 1 deletion libzeth/test/prfs_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "libzeth/circuits/blake2s/blake2s_comp.hpp"

// Access the `from_bits` function and other utils
#include "libzeth/circuits/circuits-utils.hpp"
#include "libzeth/circuits/circuits_utils.hpp"
#include "libzeth/util.hpp"

// Gadget to test
Expand Down
2 changes: 1 addition & 1 deletion libzeth/test/sha256_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "circuits/sha256/sha256_ethereum.hpp"

// Access the `from_bits` function and other utils
#include "circuits/circuits-utils.hpp"
#include "circuits/circuits_utils.hpp"
#include "util.hpp"

// Use the bits256 type util functions
Expand Down
2 changes: 1 addition & 1 deletion libzeth/test/simple_test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef __ZETH_TEST_SIMPLE_TEST_HPP__
#define __ZETH_TEST_SIMPLE_TEST_HPP__

#include <libzeth/include_libsnark.hpp>
#include "libzeth/include_libsnark.hpp"

namespace libzeth
{
Expand Down
2 changes: 1 addition & 1 deletion libzeth/types/bits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: LGPL-3.0+

#include <libzeth/types/bits.hpp>
#include "libzeth/types/bits.hpp"

namespace libzeth
{
Expand Down
2 changes: 1 addition & 1 deletion libzeth/types/bits.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef __ZETH_TYPES_BITS_TCC__
#define __ZETH_TYPES_BITS_TCC__

#include <libzeth/types/bits.hpp>
#include "libzeth/types/bits.hpp"

namespace libzeth
{
Expand Down
2 changes: 1 addition & 1 deletion libzeth/types/merkle_tree_field.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ template<typename FieldT, typename HashTreeT> class merkle_tree_field
};

} // namespace libzeth
#include <libzeth/types/merkle_tree_field.tcc>
#include "libzeth/types/merkle_tree_field.tcc"

#endif // __ZETH_TYPES_MERKLE_TREE_FIELD_HPP__
3 changes: 2 additions & 1 deletion libzeth/types/merkle_tree_field.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
#ifndef __ZETH_TYPES_MERKLE_TREE_FIELD_TCC__
#define __ZETH_TYPES_MERKLE_TREE_FIELD_TCC__

#include "libzeth/circuits/mimc/mimc_mp.hpp"

#include <algorithm>
#include <libff/common/profiling.hpp>
#include <libff/common/utils.hpp>
#include <libzeth/circuits/mimc/mimc_mp.hpp>

namespace libzeth
{
Expand Down
3 changes: 2 additions & 1 deletion libzeth/types/note.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
#ifndef __ZETH_TYPES_NOTE_HPP__
#define __ZETH_TYPES_NOTE_HPP__

#include "libzeth/types/bits.hpp"

#include <array>
#include <libzeth/types/bits.hpp>

namespace libzeth
{
Expand Down
2 changes: 1 addition & 1 deletion libzeth/util.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef __ZETH_UTIL_TCC__
#define __ZETH_UTIL_TCC__

#include <libzeth/util.hpp>
#include "libzeth/util.hpp"

namespace libzeth
{
Expand Down
2 changes: 1 addition & 1 deletion libzeth/util_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: LGPL-3.0+

#include <libzeth/util_api.hpp>
#include "libzeth/util_api.hpp"

// Message formatting and parsing utility

Expand Down
2 changes: 1 addition & 1 deletion libzeth/util_api.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef __ZETH_UTIL_API_TCC__
#define __ZETH_UTIL_API_TCC__

#include <libzeth/util_api.hpp>
#include "libzeth/util_api.hpp"

namespace libzeth
{
Expand Down
3 changes: 2 additions & 1 deletion mpc_tools/mpc_phase2/cli/mpc_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
#ifndef __ZETH_MPC_CLI_COMMON_HPP__
#define __ZETH_MPC_CLI_COMMON_HPP__

#include "libzeth/circuit_types.hpp"

#include <boost/program_options.hpp>
#include <fstream>
#include <libzeth/circuit_types.hpp>
#include <map>
#include <string>
#include <vector>
Expand Down
3 changes: 1 addition & 2 deletions mpc_tools/mpc_phase2/cli/mpc_phase2_contribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
//
// SPDX-License-Identifier: LGPL-3.0+

#include "libzeth/snarks/groth16/mpc/phase2.hpp"
#include "mpc_common.hpp"

#include <libzeth/snarks/groth16/mpc/phase2.hpp>

using namespace libzeth;
namespace po = boost::program_options;

Expand Down
3 changes: 1 addition & 2 deletions mpc_tools/mpc_phase2/cli/mpc_phase2_verify_contribution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
//
// SPDX-License-Identifier: LGPL-3.0+

#include "libzeth/snarks/groth16/mpc/phase2.hpp"
#include "mpc_common.hpp"

#include <libzeth/snarks/groth16/mpc/phase2.hpp>

using namespace libzeth;
namespace po = boost::program_options;

Expand Down
Loading

0 comments on commit 4ccf7e0

Please sign in to comment.