You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/getting_started/quickstart.md
+8-3
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,6 @@ Ubuntu 22.04 or higher is required.
10
10
11
11
> **Note:** macOS is not yet supported, but we are actively working on adding support.
12
12
13
-
1. Make sure you have [Rust](https://www.rust-lang.org/tools/install) installed.
14
13
1. Make sure you have [Rust](https://www.rust-lang.org/tools/install) installed.
15
14
16
15
2. Install all required dependencies with:
@@ -101,15 +100,21 @@ cargo-zisk run --release -i build/input.bin
101
100
102
101
## Prove
103
102
104
-
You can generate and verify a proof using the `cargo-zisk prove` command by providing the ELF file (with the `-e` or `--elf` flag) and the input file (with the `-i` or `--input-data` flag).
103
+
Before generating a proof, you need to generate the program setup files. Execute:
Once the program setup is complete, you can generate and verify a proof using the `cargo-zisk prove` command by providing the ELF file (with the `-e` or `--elf` flag) and the input file (with the `-i` or `--input` flag).
105
110
106
111
To generate and verify a proof for the previously built ELF and input files, execute:
107
112
108
113
```bash
109
114
cargo-zisk prove -e target/riscv64ima-polygon-ziskos-elf/release/sha_hasher -i build/input.bin -o proof -a -y
110
115
```
111
116
112
-
This command generates the proof in the `./proof directory`. If everything goes well, you will see a message similar to:
117
+
This command generates the proof in the `./proof` directory. If everything goes well, you will see a message similar to:
Copy file name to clipboardExpand all lines: book/getting_started/writing_programs.md
+25-3
Original file line number
Diff line number
Diff line change
@@ -224,12 +224,33 @@ bd13089b
224
224
225
225
## Prove
226
226
227
+
### Program Setup
228
+
229
+
Before generating a proof (or verifying the constraints), you need to generate the program setup files. This must be done the first time after building the program ELF file, or any time it changes:
*`-i` (`--input`) specifies the input file location.
252
+
*`-w` (`--witness`) specifies the location of the witness library. This is optional and defaults to `$HOME/.zisk/bin/libzisk_witness.so`.
253
+
*`-k` (`--proving-key`) specifies the directory containing the proving key. This is optional and defaults to `$HOME/.zisk/provingKey`.
233
254
234
255
If everything is correct, you will see an output similar to:
235
256
@@ -249,8 +270,9 @@ cargo-zisk prove -e target/riscv64ima-polygon-ziskos-elf/release/sha_hasher -i b
249
270
In this command:
250
271
251
272
*`-e` (`--elf`) specifies the ELF file localtion.
252
-
*`-i` (`--inputs`) specifies the input file location.
253
-
*`-w` (`--witness`) and `-k` (`--proving-key`) are used to specify the location of the witness library and proving key files required for proof generation; they are optional, set by default to the paths found in the `$HOME/.zisk` installation folder.
273
+
*`-i` (`--input`) specifies the input file location.
274
+
*`-w` (`--witness`) specifies the location of the witness library. This is optional and defaults to `$HOME/.zisk/bin/libzisk_witness.so`.
275
+
*`-k` (`--proving-key`) specifies the directory containing the proving key. This is optional and defaults to `$HOME/.zisk/provingKey`.
254
276
*`-o` (`--output`) determines the output directory (in this example `proof`).
255
277
*`-a` (`--aggregation`) indicates that a final aggregated proof (containing all generated sub-proofs) should be produced.
256
278
*`-y` (`--verify-proofs`) instructs the tool to verify the proof immediately after it is generated (verification can also be performed later using the `cargo-zisk verify` command).
0 commit comments