ZoKrates icon indicating copy to clipboard operation
ZoKrates copied to clipboard

Can not reproduce nova experiment

Open ferjcast opened this issue 1 year ago • 3 comments

Description

Can not reproduce nova experiment from https://zokrates.github.io/toolbox/experimental.html

Environment

  • Compiler version: 0.8.7
  • Operating system: $ sw_vers ProductName: macOS ProductVersion: 13.5.1 BuildVersion: 22G90

Steps to Reproduce

Option 1 :

zokrates compile -i sum.zok --curve pallas 
echo "\"0\"" > init.json
echo "[\"1\", \"7\", \"42\"]" > steps.json
zokrates nova prove

Gives:

Could not open nova.params: No such file or directory (os error 2)

Option 2:

zokrates compile -i sum.zok --curve vesta -o nova.params
echo "\"0\"" > init.json
echo "[\"1\", \"7\", \"42\"]" > steps.json
zokrates nova prove

Gives:

Could not deserialize nova.params: EOF while parsing a value at offset 624

sum.zok:

def main(public field sum, private field element) -> field {
    return sum + element;
}

ferjcast avatar Aug 31 '23 13:08 ferjcast

Hi @ferjcast

It seems you are missing the setup part. You get nova.params by running zokrates nova setup after compilation in option 1. This should be mentioned in the docs as well so good catch!

dark64 avatar Aug 31 '23 19:08 dark64

Thank you. It worked.

ferjcast avatar Sep 01 '23 08:09 ferjcast

Hi,

In regards with the experiment, I'm failing in how to read the final output returned in the proof (the compression and the verification work). How would I be able to get the answers from the proof.json file? In the example would be 50 for the first run and 100 for the second. Thank you.

ferjcast avatar Sep 21 '23 10:09 ferjcast