sikoba / isekai

Isekai verifiable computation project
MIT License
46 stars 8 forks source link

can't pass "make test" #11

Closed kskhasegawa closed 5 years ago

kskhasegawa commented 5 years ago

Hello I'm interested in the library, but I can't pass "make test". following message appears.

crystal spec (enter) Call to r1cs_ppzksnark_generator [ ] (1554782986.1363s x0.00 from start) (enter) Call to r1cs_constraint_system::swap_AB_if_beneficial [ ] (1554782986.1373s x0.00 from start) (enter) Estimate densities [ ] (1554782986.1382s x0.00 from start)

What should I do?

guipublic commented 5 years ago

Hello,

The unit test is using some sample input files that were not commit. I have just added them so if you update the project the error should be gone now.

kskhasegawa commented 5 years ago

Thank you for the quick response!

By the way, is there any tutorial or some sample C file to generate .arith file?

guipublic commented 5 years ago

No we don't have more documentation. I plan to work on a tutorial to show how to prove and verify C programs with isekai but I won't have time this week.

You can generate with this command: ./isekai --arith=arith_file.arith my_sample.c give the name you want for the circuit in the --arith option. my_sample.c is your input C program. Note that only a few features of C are supported and we already have known issues (with loops for instance) that we are working on.

kskhasegawa commented 5 years ago

OK, I'll try to create a C program that works the command correctly, and be waiting for your work :) Thank you.

guipublic commented 5 years ago

The C program must have a specific signature (same as Pinocchio): void outsource(struct Input input, struct Output ) You define input and output as needed (we only support int), and can add another struct as argumrnt for zero knowledge

guipublic commented 5 years ago

I am closing this issue because I have completed the usage section which should explain how to generate and verify proofs. Please note that most programs will fail because we do not support (yet) all features of C. For instance function calls and arrays are not supported (but is on the top of our list!).