Skip to content

Commit

Permalink
Updating book and Cargo.toml to point to 0.0.16 proofman
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerTaule committed Dec 4, 2024
1 parent 9d89546 commit f88f3e3
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 29 deletions.
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ opt-level = 3
opt-level = 3

[workspace.dependencies]
proofman-common = { git = "https://github.com/0xPolygonHermez/pil2-proofman.git", rev = "0.0.14" }
proofman-macros = { git = "https://github.com/0xPolygonHermez/pil2-proofman.git", rev = "0.0.14" }
proofman-util = { git = "https://github.com/0xPolygonHermez/pil2-proofman.git", rev = "0.0.14" }
proofman = { git = "https://github.com/0xPolygonHermez/pil2-proofman.git", rev = "0.0.14" }
pil-std-lib = { git = "https://github.com/0xPolygonHermez/pil2-proofman.git", rev = "0.0.14" }
stark = { git = "https://github.com/0xPolygonHermez/pil2-proofman.git", rev = "0.0.14" }
proofman-common = { git = "https://github.com/0xPolygonHermez/pil2-proofman.git", rev = "0.0.16" }
proofman-macros = { git = "https://github.com/0xPolygonHermez/pil2-proofman.git", rev = "0.0.16" }
proofman-util = { git = "https://github.com/0xPolygonHermez/pil2-proofman.git", rev = "0.0.16" }
proofman = { git = "https://github.com/0xPolygonHermez/pil2-proofman.git", rev = "0.0.16" }
pil-std-lib = { git = "https://github.com/0xPolygonHermez/pil2-proofman.git", rev = "0.0.16" }
stark = { git = "https://github.com/0xPolygonHermez/pil2-proofman.git", rev = "0.0.16" }
#Local development
# proofman-common = { path = "../pil2-proofman/common" }
# proofman-macros = { path = "../pil2-proofman/macros" }
Expand Down
10 changes: 4 additions & 6 deletions book/getting_started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,8 @@ ziskup
```bash
git clone https://github.com/0xPolygonHermez/zisk
git clone -b develop https://github.com/0xPolygonHermez/pil2-compiler.git
git clone -b 0.0.13 https://github.com/0xPolygonHermez/pil2-proofman.git
git clone -b 0.0.13 https://github.com/0xPolygonHermez/pil2-proofman-js
git clone -b 0.0.13 https://github.com/0xPolygonHermez/pil2-stark-js
git clone -b 0.0.16 https://github.com/0xPolygonHermez/pil2-proofman.git
git clone -b 0.0.16 https://github.com/0xPolygonHermez/pil2-proofman-js
```

All following commands should be executed in the `zisk` folder.
Expand Down Expand Up @@ -157,11 +156,10 @@ cargo build --release
To generate the proof, the following command needs to be run.

```bash
(cd ../pil2-proofman; cargo run --release --bin proofman-cli prove --witness-lib ../zisk/target/release/libzisk_witness.so --rom ../hello_world/target/riscv64ima-polygon-ziskos-elf/release/sha_hasher -i ../hello_world/build/input.bin --proving-key ../zisk/build/provingKey --output-dir ../zisk/proofs -d -v -a)
(cd ../pil2-proofman; cargo run --release --bin proofman-cli prove --witness-lib ../zisk/target/release/libzisk_witness.so --rom ../hello_world/target/riscv64ima-polygon-ziskos-elf/release/sha_hasher -i ../hello_world/build/input.bin --proving-key ../zisk/build/provingKey --output-dir ../zisk/proofs -v -a)
```

### Verify the Proof
```bash
(cd ../pil2-stark-js && npm i)
node ../pil2-stark-js/src/main_verifier.js -v build/provingKey/zisk/final/final.verkey.json -s build/provingKey/zisk/final/final.starkinfo.json -i build/provingKey/zisk/final/final.verifierinfo.json -o proofs/proofs/final_proof.json -b proofs/publics.json
node ../pil2-proofman-js/src/main_verify -k build/provingKey/ -p proofs -t vadcop_final
```
13 changes: 6 additions & 7 deletions book/getting_started/quickstart_dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ Run the following commands to clone the necessary repositories:
```bash
git clone -b develop https://github.com/0xPolygonHermez/pil2-compiler.git
git clone -b develop https://github.com/0xPolygonHermez/zisk.git
git clone -b 0.0.13 https://github.com/0xPolygonHermez/pil2-proofman.git
git clone -b 0.0.13 https://github.com/0xPolygonHermez/pil2-stark-js.git
git clone -b 0.0.13 https://github.com/0xPolygonHermez/pil2-proofman-js
git clone -b 0.0.16 https://github.com/0xPolygonHermez/pil2-proofman.git
git clone -b 0.0.16 https://github.com/0xPolygonHermez/pil2-proofman-js
```

## Compile a Verifiable Rust Program
Expand Down Expand Up @@ -166,13 +165,13 @@ To generate the aggregated proofs, add `-a`

```bash
// Using input_one_segment.bin
(cargo build --release && cd ../pil2-proofman; cargo run --release --bin proofman-cli prove --witness-lib ../zisk/target/release/libzisk_witness.so --rom ../zisk/emulator/benches/data/my.elf -i ../zisk/emulator/benches/data/input_one_segment.bin --proving-key ../zisk/build/provingKey --output-dir ../zisk/proofs -d -a -v)
(cargo build --release && cd ../pil2-proofman; cargo run --release --bin proofman-cli prove --witness-lib ../zisk/target/release/libzisk_witness.so --rom ../zisk/emulator/benches/data/my.elf -i ../zisk/emulator/benches/data/input_one_segment.bin --proving-key ../zisk/build/provingKey --output-dir ../zisk/proofs -a -v)

// Using input_two_segments.bin
(cargo build --release && cd ../pil2-proofman; cargo run --release --bin proofman-cli prove --witness-lib ../zisk/target/release/libzisk_witness.so --rom ../zisk/emulator/benches/data/my.elf -i ../zisk/emulator/benches/data/input_two_segments.bin --proving-key ../zisk/build/provingKey --output-dir ../zisk/proofs -d -a -v)
(cargo build --release && cd ../pil2-proofman; cargo run --release --bin proofman-cli prove --witness-lib ../zisk/target/release/libzisk_witness.so --rom ../zisk/emulator/benches/data/my.elf -i ../zisk/emulator/benches/data/input_two_segments.bin --proving-key ../zisk/build/provingKey --output-dir ../zisk/proofs -a -v)

// Using input.bin
(cargo build --release && cd ../pil2-proofman; cargo run --release --bin proofman-cli prove --witness-lib ../zisk/target/release/libzisk_witness.so --rom ../zisk/emulator/benches/data/my.elf -i ../zisk/emulator/benches/data/input.bin --proving-key ../zisk/build/provingKey --output-dir ../zisk/proofs -a -v -f)
(cargo build --release && cd ../pil2-proofman; cargo run --release --bin proofman-cli prove --witness-lib ../zisk/target/release/libzisk_witness.so --rom ../zisk/emulator/benches/data/my.elf -i ../zisk/emulator/benches/data/input.bin --proving-key ../zisk/build/provingKey --output-dir ../zisk/proofs -a -v)
```

### Verify the Proof
Expand All @@ -184,5 +183,5 @@ node ../pil2-proofman-js/src/main_verify -k ./build/provingKey -p ./proofs
If the aggregation proofs are being generated, can be verified with the following command:

```bash
node ../pil2-stark-js/src/main_verifier.js -v build/provingKey/zisk/final/final.verkey.json -s build/provingKey/zisk/final/final.starkinfo.json -i build/provingKey/zisk/final/final.verifierinfo.json -o proofs/proofs/final_proof.json -b proofs/publics.json
node ../pil2-proofman-js/src/main_verify -k ./build/provingKey/ -p ./proofs -t vadcop_final
```

0 comments on commit f88f3e3

Please sign in to comment.