ZoKrates
ZoKrates copied to clipboard
Cannot execute Trusted Setup procedure for a sample program from documentation
Description
Cannot execute Trusted Setup
procedure for a sample program by using the documentation taken from here.
Steps to Reproduce
- Init zokrates container:
docker run -u 0 -ti zokrates/zokrates /bin/bash
- Create
sample.zok
file with the following code:
def main(private field a, private field b) -> field {
return a * b;
}
- Compile the program:
zokrates compile -i circuit.zok -o circuit
- Grab a file which contains the parameters for our circuit with depth 2:
wget https://download.z.cash/downloads/powersoftau/phase1radix2m2
- Initialize a phase 2 ceremony:
zokrates mpc init -i circuit -o mpc.params -r ./phase1radix2m2
- Receive an error:
Failed to initialize: I/O error: y coordinate decoding error: 0xfde8fc25335eb5ec859c2818b2610b2e19ab445dac720bb1f2b0cd3336f7a1ac is not an element of the field
I'm quite a newbie here so will be grateful for advices if I'm doing something wrong.
Hi @ruslangm, zcash powersoftau (in your case phase1radix2m2
) uses the bls12-381
curve, you need to specify this curve in the compilation step:
zokrates compile -i circuit.zok -o circuit -c bls12-381
Hey @dark64, thanks for your reply.