zkonduit / ezkl

ezkl is an engine for doing inference for deep learning models and other computational graphs in a zk-snark (ZKML). Use it from Python, Javascript, or the command line.

Home Page:https://docs.ezkl.xyz/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docs: non-existing parameters and typo

Neurone opened this issue · comments

Summary

Note: Instructions say I can open a PR, but I didn't find the documentation in this repo so I'm just opening an issue here.

In both the "Commands" and "Verifying On-Chain" page:

  1. settings-path seems not a valid parameter anymore for many commands, but it is still present in examples and in documentation. In particular, setup, gen-witness, and prove uses that parameter in the examples, but you get an error: unexpected argument '--settings-path' found error if you try to use it. I removed that parameter and I was able to continue without errors.

In the "Verifying On-Chain" page:

  1. The scripts use a couple of times the compile-model command and the compiled-model parameter, but they don't not exist. I used the compile-circuit command and compiled-circuit parameter instead.

  2. The transcript parameter does not exist for the prove command [unexpected argument '--transcript' found](error: unexpected argument '--transcript' found). I removed that parameter and I was able to continue without errors.

  3. I experienced problems with the suggested command in the documentation to install Anvil:

cargo install --git https://github.com/foundry-rs/foundry --profile local --locked foundry-cli anvil

The best way to install Anvil is probably using foundryup (details here).

curl -L https://foundry.paradigm.xyz | bash
  1. For the command

ezkl verify-evm --proof-path model.pf --addr=*paste address in addr.txt here* --rpc-url=http://127.0.0.1:3030

I suggest using <paste address in addr.txt here> , so <...> instead of *...*.

Or, to make user's life easier avoiding cut&paste, my preferred style for Linux/MacOS based terminals is:

ezkl verify-evm --proof-path model.pf --addr=$(cat addr.txt) --rpc-url=http://127.0.0.1:3030

A complete fixed command list for the first example in the "Verifying On-Chain" page that works for me is the following:

cp ~/ezkl/examples/onnx/4l_relu_conv_fc/network.onnx .
cp ~/ezkl/examples/onnx/4l_relu_conv_fc/input.json .
ezkl gen-settings -M network.onnx
ezkl calibrate-settings -M network.onnx -D input.json --target resources
ezkl get-srs -S settings.json
ezkl compile-circuit -M network.onnx -S settings.json --compiled-circuit network.ezkl
ezkl setup -M network.ezkl --srs-path=kzg.srs
ezkl create-evm-verifier --srs-path=kzg.srs --vk-path vk.key --sol-code-path verif.sol --settings-path=settings.json
ezkl gen-witness -D input.json -M network.ezkl
ezkl prove --witness witness.json -M network.ezkl --proof-path model.pf --pk-path pk.key --srs-path=kzg.srs
# install anvil if you haven't already
curl -L https://foundry.paradigm.xyz | bash
# spin up a local EVM through anvil 
anvil -p 3030
# deploy evm verifier
ezkl deploy-evm-verifier --addr-path=addr.txt --rpc-url=http://127.0.0.1:3030 --sol-code-path verif.sol
# verify (EVM), make sure to copy the address stored in addr.txt and paste it into the addr param
ezkl verify-evm --proof-path model.pf --addr=$(cat addr.txt) --rpc-url=http://127.0.0.1:3030

Link Section of the Documentation

commented

<3 thank you. @jasonmorton or @JSeam2 do you mind updating these