pepper-project / pepper

A system for verifying outsourced computations. This repo always contains the latest release of the Pepper system.
Other
60 stars 16 forks source link

error in mm_pure_arith #3

Closed fattaneh88 closed 5 years ago

fattaneh88 commented 5 years ago

When I run "mm_pure_arith" and other examples in apps_sfdl, the following error happens:

./run/run_pepper.sh mm_pure_arith LOG: Building executables

compile:

BUILD SUCCESSFUL Total time: 0 seconds make[1]: Leaving directory `/home/fara/pepper-master/compiler/frontend' WARNING: --cstdarithtruncate is disabled, so type errors will warn and arithmetic is not ANSI C compliant Compiling mm_pure_arith.c Expanding circuit to file mm_pure_arith.c.ZAATAR.circuit Writing constant values to mm_pure_arith.c.ZAATAR.spec.cons metric_compile_1_utime mm_pure_arith 1.46 metric_compile_1_stime mm_pure_arith 0.29

metric_compile_1_wires mm_pure_arith 2306 metric_compile_tac2_utime mm_pure_arith 0.00 metric_compile_tac2_stime mm_pure_arith 0.00

WARNING: --cstdarithtruncate is disabled, so type errors will warn and arithmetic is not ANSI C compliant metric_compile_p2_utime mm_pure_arith 0.52 metric_compile_p2_stime mm_pure_arith 0.02

metric_compile_untac2_utime mm_pure_arith 0.00 metric_compile_untac2_stime mm_pure_arith 0.00

WARNING: --cstdarithtruncate is disabled, so type errors will warn and arithmetic is not ANSI C compliant Optimizing previously compiled circuit mm_pure_arith.c.ZAATAR.circuit2 Using variable dependencies from profile mm_pure_arith.c.ZAATAR.circuit2.profile (Complete.) Expanding circuit to file mm_pure_arith.c.ZAATAR.circuit Writing constraints to mm_pure_arith.c.ZAATAR.spec_tmp metric_num_occurrences_exo_compute 0 metric_num_occurrences_hashget 0 metric_num_occurrences_hashput 0 metric_num_occurrences_ramget 0 metric_num_occurrences_ramget_fast 0 metric_num_occurrences_ramput 0 metric_num_occurrences_ramput_fast 0 Cleaning up constraints, result will appear in mm_pure_arith.c.ZAATAR.spec metric_compile_2_utime mm_pure_arith 2.25 metric_compile_2_stime mm_pure_arith 0.02

metric_compile_2_wires mm_pure_arith 1201 Expanding database operations in ../mm_pure_arith.c.ZAATAR.spec Creating prover worksheet, result will appear at bin/mm_pure_arith.pws Writing QAP matrices to ../../pepper/bin/mm_pure_arith.qap metric_num_constraints_for_storage_ops mm_pure_arith 0 metric_num_constraints_for_split_ops mm_pure_arith 0 metric_num_constraints_for_other_ops mm_pure_arith 1001 metric_num_constraints_before_round mm_pure_arith 1001 metric_num_constraints_after_round mm_pure_arith 1023 metric_num_constraints_nonpot mm_pure_arith 1001 Merging QAP matrices, will re-write to ../../pepper/bin/mm_pure_arith.qap

metric_num_constraints mm_pure_arith 1023 metric_num_input_vars mm_pure_arith 200 metric_num_output_vars mm_pure_arith 101 metric_num_intermediate_vars mm_pure_arith 900 metric_num_Nz(A) mm_pure_arith 1000 metric_num_Nz(B) mm_pure_arith 1000 metric_num_Nz(C) mm_pure_arith 1901

metric_compile_backend_utime mm_pure_arith 0.16 metric_compile_backend_stime mm_pure_arith 0.01

Any help appreciated. Fattaneh

maxhowald commented 5 years ago

Were you able to follow all the steps in this file:

https://github.com/pepper-project/pepper/blob/master/INSTALLING.md

including running the install_pepper_deps.sh script successfully?

If not, can you post the output of running that command? Also, can you say what OS you're using?

In the mean time, you may want to try this release: https://github.com/pepper-project/pequin

which is a bit easier to install and is better maintained. The Pequin release has most of the same high-level functionality as this release, but only supports 1 back-end (libsnark) for probabilistic proofs.

fattaneh88 commented 5 years ago

Thanks for your advice, I could resolve it and run "mm_pure_arith". I am using Ubuntu 14.04. I am aware of the new release of Pequin, but because I am working with float numbers, Pequin people advised me to use this version. As I mentioned I work with float number, so I should write a code with SFDL, but when I tried to run some of SFDL examples where provided in apps_sfdl, the following error happens: ./run/run_pepper.sh f_w_apsp LOG: Building executables

compile:

BUILD SUCCESSFUL Total time: 0 seconds make[1]: Leaving directory `/home/fara/pepper/compiler/frontend' WARNING: --cstdarithtruncate is disabled, so type errors will warn and arithmetic is not ANSI C compliant Compiling ../pepper/apps_sfdl/f_w_apsp.sfdl Expanding circuit to file f_w_apsp.sfdl.ZAATAR.circuit Writing constant values to f_w_apsp.sfdl.ZAATAR.spec.cons metric_compile_1_utime f_w_apsp 7.48 metric_compile_1_stime f_w_apsp 2.22

metric_compile_1_wires f_w_apsp 534800 metric_compile_tac2_utime f_w_apsp 0.04 metric_compile_tac2_stime f_w_apsp 0.01

WARNING: --cstdarithtruncate is disabled, so type errors will warn and arithmetic is not ANSI C compliant metric_compile_p2_utime f_w_apsp 5.71 metric_compile_p2_stime f_w_apsp 0.18

metric_compile_untac2_utime f_w_apsp 0.00 metric_compile_untac2_stime f_w_apsp 0.00

WARNING: --cstdarithtruncate is disabled, so type errors will warn and arithmetic is not ANSI C compliant Optimizing previously compiled circuit f_w_apsp.sfdl.ZAATAR.circuit2 Using variable dependencies from profile f_w_apsp.sfdl.ZAATAR.circuit2.profile (Complete.) Expanding circuit to file f_w_apsp.sfdl.ZAATAR.circuit Writing constraints to f_w_apsp.sfdl.ZAATAR.spec_tmp metric_num_occurrences_exo_compute 0 metric_num_occurrences_hashget 0 metric_num_occurrences_hashput 0 metric_num_occurrences_ramget 0 metric_num_occurrences_ramget_fast 0 metric_num_occurrences_ramput 0 metric_num_occurrences_ramput_fast 0 Cleaning up constraints, result will appear in f_w_apsp.sfdl.ZAATAR.spec metric_compile_2_utime f_w_apsp 16.01 metric_compile_2_stime f_w_apsp 0.98

metric_compile_2_wires f_w_apsp 110024 Expanding database operations in ../f_w_apsp.sfdl.ZAATAR.spec Creating prover worksheet, result will appear at bin/f_w_apsp.pws Writing QAP matrices to ../../pepper/bin/f_w_apsp.qap metric_num_constraints_for_storage_ops f_w_apsp 0 metric_num_constraints_for_split_ops f_w_apsp 0 metric_num_constraints_for_other_ops f_w_apsp 1843774 metric_num_constraints_before_round f_w_apsp 1843774 metric_num_constraints_after_round f_w_apsp 2097151 metric_num_constraints_nonpot f_w_apsp 1843774 Merging QAP matrices, will re-write to ../../pepper/bin/f_w_apsp.qap

metric_num_constraints f_w_apsp 2097151 metric_num_input_vars f_w_apsp 625 metric_num_output_vars f_w_apsp 625 metric_num_intermediate_vars f_w_apsp 1765024 metric_num_Nz(A) f_w_apsp 1750000 metric_num_Nz(B) f_w_apsp 3484375 metric_num_Nz(C) f_w_apsp 2453148

metric_compile_backend_utime f_w_apsp 134.39 metric_compile_backend_stime f_w_apsp 0.58

Thanks, Fattaneh

maxhowald commented 5 years ago

Looks like there were just a few missing targets in the Makefile. Should be fixed now. Please let us know if you encounter any other issues!

fattaneh88 commented 5 years ago

Thank you very much for solving the issue. Everything works well now. I have a question about implementation, in SFDL compiler division operation is defined by "/" and I noticed in SNARK the division operation is defined by "%". I used both for dividing two float numbers, but none of them works. I appreciate if you can advise me on that.

Best regards, Fattaneh

On Wed, Dec 19, 2018 at 4:00 PM Max Howald notifications@github.com wrote:

Looks like there were just a few missing targets in the Makefile. Should be fixed now. Please let us know if you encounter any other issues!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pepper-project/pepper/issues/3#issuecomment-448796890, or mute the thread https://github.com/notifications/unsubscribe-auth/AHfWZRnykxXcwL6sUejE-OTf7YeA_Wsvks5u6tMqgaJpZM4ZXlRY .

-- F.B

maxhowald commented 5 years ago

I don't think the floating point type in pepper ever supported a division operation. This paper discusses the design and implementation of the type in detail, by the way.

It would be very interesting if someone can extend this type to support division! I'm not sure if any further research on this topic has already been done, or what kind of implementation work would be required to support it in pepper, if so.