Coder Social home page Coder Social logo

Comments (2)

Aleksao998 avatar Aleksao998 commented on July 20, 2024

[UPDATE]

Even after adding elliptic curve type in the transpiler commands:

    transpiler \
          -m gen-gate-argument \
          -i ../src/public-input.json \
          -t ../template.tbl \
          -c ../template.crct \
          -o template \
          -e pallas \
          --optimize-gates
        check_file_exists "$REPO_ROOT/build/template/gate_argument.sol"
        check_file_exists "$REPO_ROOT/build/template/linked_libs_list.json"
        check_file_exists "$REPO_ROOT/build/template/public_input.json"

        transpiler \
          -m gen-circuit-params \
          -i ../src/public-input.json \
          -t ../template.tbl \
          -c ../template.crct \
          -e pallas \
          -o template
        check_file_exists "$REPO_ROOT/build/template/circuit_params.json"

i still had an issue where running gen-circuit-params returned:
Preprocessing public data...

scripts/run.sh: line 136: 1215386 Segmentation fault      (core dumped) transpiler -m gen-circuit-params -i ../src/public-input.json -t ../template.tbl -c ../template.crct -e pallas -o template

I changed the function to execute:

build_circuit_params() {
   echo;
   echo Building circuit params:
   if [ "$USE_DOCKER" = true ] ; then
       cd "$REPO_ROOT"
       $DOCKER run $DOCKER_OPTS \
         --rm \
         --platform=linux/amd64 \
         --user $(id -u ${USER}):$(id -g ${USER}) \
         --volume $(pwd):/opt/zkllvm-template \
         ghcr.io/nilfoundation/toolchain:${TOOLCHAIN_VERSION} \
         sh -c "bash ./scripts/run.sh build_circuit_params"
       cd -
   else
       cd "$REPO_ROOT/build"

       rm -rf ./template

       # generate/verify proof
       transpiler \
         -m gen-test-proof \
         -c ../template.crct \
         -t ../template.tbl \
         -o template \
         -e pallas

       # generate evm verifier
       transpiler \
         -m gen-evm-verifier \
         -c ../template.crct \
         -t ../template.tbl \
         -o template \
         -e pallas \
         --optimize-gates

       # copy public-inputs
       cp ../src/public-input.json template/public-input.json
       cd -
   fi
 }

and i was able to generate and verify everything.

from zkllvm-template.

Aleksao998 avatar Aleksao998 commented on July 20, 2024

Also even with this fix, the inputs are not valid for evm_placeholder_verifier and if i copy generated folder to evm_placeholder_verifier and try to validate on-chain i have this error:

Verify proofs of all circuits
Verify : ../contracts/zkllvm/template/proof.bin
Wrong public input format!

from zkllvm-template.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.