Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organization refactor #177

Merged
merged 21 commits into from
Apr 1, 2020
Merged

Organization refactor #177

merged 21 commits into from
Apr 1, 2020

Conversation

AntoineRondelet
Copy link
Contributor

@AntoineRondelet AntoineRondelet commented Mar 26, 2020

This PR:

  1. Re-arranges the content of the repository
  2. Packages the different targets into:
    • libzeth
    • prover_server
    • mpc_tools
      • pot-process
      • phase 2 binaries
  3. Provides a small refactor of the CMakeFiles according to the point above and removed use of environment variables
  4. Fixes inconsistencies in include directives
  5. Renames the mpc commands to mpc-<role>-phase2, where <role> is either coord (for coordinator) or client
  6. Removes the coinstore, trusted_setup and keystore directories which are now ignored from the git flow but are created locally via the setup script

Not addressed in this ticket, but "to do":

CMakeLists.txt Show resolved Hide resolved
libzeth/circuits/blake2s/blake2s_comp.hpp Outdated Show resolved Hide resolved
setup_env.sh Outdated Show resolved Hide resolved
@dtebbs
Copy link
Contributor

dtebbs commented Mar 27, 2020

Rename pyClient to py_client to stick to the snake case naming convention
(For later ...) Perhaps we can rename to just client instead now that the js version has been removed.

@AntoineRondelet
Copy link
Contributor Author

Rename pyClient to py_client to stick to the snake case naming convention
(For later ...) Perhaps we can rename to just client instead now that the js version has been removed.

Sure client works well

@dtebbs
Copy link
Contributor

dtebbs commented Apr 1, 2020

Some inconsistent local includes still remaining:

$ git grep 'include <libzeth'
libzeth/circuits/circuits-utils.cpp:#include <libzeth/circuits/circuits-utils.hpp>
libzeth/circuits/commitments/commitment.hpp:#include <libzeth/circuits/commitments/commitment.tcc>
libzeth/circuits/merkle_tree/merkle_path_selector.hpp:#include <libzeth/circuits/merkle_tree/merkle_path_selector.tcc>
libzeth/circuits/notes/note.tcc:#include <libzeth/circuits/notes/note.hpp>
libzeth/circuits/safe_arithmetic.cpp:#include <libzeth/circuits/safe_arithmetic.hpp>
libzeth/circuits/sha256/sha256_ethereum.hpp:#include <libzeth/circuits/sha256/sha256_ethereum.tcc>
libzeth/circuits/sha256/sha256_ethereum.tcc:#include <libzeth/circuits/circuits-utils.hpp>
libzeth/libsnark_helpers/debug_helpers.hpp:#include <libzeth/libsnark_helpers/debug_helpers.tcc>
libzeth/libsnark_helpers/extended_proof.tcc:#include <libzeth/snarks_core_imports.hpp>
libzeth/snarks/groth16/core/computation.tcc:#include <libzeth/snarks/groth16/core/computation.hpp>
libzeth/snarks/groth16/mpc/chacha_rng.cpp:#include <libzeth/snarks/groth16/mpc/chacha_rng.hpp>
libzeth/snarks/groth16/mpc/multi_exp.tcc:#include <libzeth/snarks/groth16/mpc/multi_exp.hpp>
libzeth/snarks/groth16/mpc/phase2.cpp:#include <libzeth/snarks/groth16/mpc/phase2.hpp>
libzeth/snarks/groth16/mpc/powersoftau_utils.cpp:#include <libzeth/snarks/groth16/mpc/powersoftau_utils.hpp>
libzeth/test/mimc_mp_test.cpp:#include <libzeth/circuits/mimc/mimc_mp.hpp>
libzeth/test/simple_test.hpp:#include <libzeth/include_libsnark.hpp>
libzeth/types/bits.cpp:#include <libzeth/types/bits.hpp>
libzeth/types/bits.tcc:#include <libzeth/types/bits.hpp>
libzeth/types/merkle_tree_field.hpp:#include <libzeth/types/merkle_tree_field.tcc>
libzeth/types/merkle_tree_field.tcc:#include <libzeth/circuits/mimc/mimc_mp.hpp>
libzeth/types/note.hpp:#include <libzeth/types/bits.hpp>
libzeth/util.tcc:#include <libzeth/util.hpp>
libzeth/util_api.cpp:#include <libzeth/util_api.hpp>
libzeth/util_api.tcc:#include <libzeth/util_api.hpp>
mpc_tools/mpc_phase2/cli/mpc_common.hpp:#include <libzeth/circuit_types.hpp>
mpc_tools/mpc_phase2/cli/mpc_phase2_contribute.cpp:#include <libzeth/snarks/groth16/mpc/phase2.hpp>
mpc_tools/mpc_phase2/cli/mpc_phase2_verify_contribution.cpp:#include <libzeth/snarks/groth16/mpc/phase2.hpp>
mpc_tools/mpc_phase2/cli/mpc_phase2_verify_transcript.cpp:#include <libzeth/snarks/groth16/mpc/phase2.hpp>
mpc_tools/mpc_phase2/mpc_client.cpp:#include <libzeth/circuit_wrapper.hpp>
mpc_tools/mpc_phase2/mpc_coord.cpp:#include <libzeth/circuit_wrapper.hpp>
mpc_tools/mpc_phase2/test/mpc_test_cli.cpp:#include <libzeth/test/simple_test.hpp>

@AntoineRondelet
Copy link
Contributor Author

Thanks @dtebbs ...
I ran a "find and replace" script with a regex to capture the content of <libzeth/(.*)> in a group and use the group to replace with "libzeth/...". I must have done something wrong here, let's me have another look and replace all headers

@AntoineRondelet AntoineRondelet merged commit 0c37751 into develop Apr 1, 2020
@AntoineRondelet AntoineRondelet deleted the organization-refactor branch April 7, 2020 11:36
AntoineRondelet added a commit that referenced this pull request May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants