From 370159a668a099a7dfeb8cba0f667bb9aa7bf544 Mon Sep 17 00:00:00 2001 From: RogerTaule Date: Wed, 4 Dec 2024 07:42:11 +0000 Subject: [PATCH] Updating book and Cargo.toml to point to 0.0.16 proofman --- Cargo.lock | 20 ++++++++++---------- Cargo.toml | 12 ++++++------ book/getting_started/quickstart.md | 10 ++++------ book/getting_started/quickstart_dev.md | 13 ++++++------- 4 files changed, 26 insertions(+), 29 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7369ccb9..84d55e9f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1461,7 +1461,7 @@ dependencies = [ [[package]] name = "pil-std-lib" version = "0.1.0" -source = "git+https://github.com/0xPolygonHermez/pil2-proofman.git?rev=0.0.14#7d9bf98f0eaf3230399d22ad1e06b67fe864d16b" +source = "git+https://github.com/0xPolygonHermez/pil2-proofman.git?rev=0.0.16#5c47437feffccb16d95e120e8336ab8a168314e7" dependencies = [ "log", "num-bigint", @@ -1479,7 +1479,7 @@ dependencies = [ [[package]] name = "pilout" version = "0.1.0" -source = "git+https://github.com/0xPolygonHermez/pil2-proofman.git?rev=0.0.14#7d9bf98f0eaf3230399d22ad1e06b67fe864d16b" +source = "git+https://github.com/0xPolygonHermez/pil2-proofman.git?rev=0.0.16#5c47437feffccb16d95e120e8336ab8a168314e7" dependencies = [ "bytes", "log", @@ -1599,7 +1599,7 @@ dependencies = [ [[package]] name = "proofman" version = "0.1.0" -source = "git+https://github.com/0xPolygonHermez/pil2-proofman.git?rev=0.0.14#7d9bf98f0eaf3230399d22ad1e06b67fe864d16b" +source = "git+https://github.com/0xPolygonHermez/pil2-proofman.git?rev=0.0.16#5c47437feffccb16d95e120e8336ab8a168314e7" dependencies = [ "colored", "env_logger", @@ -1620,7 +1620,7 @@ dependencies = [ [[package]] name = "proofman-common" version = "0.1.0" -source = "git+https://github.com/0xPolygonHermez/pil2-proofman.git?rev=0.0.14#7d9bf98f0eaf3230399d22ad1e06b67fe864d16b" +source = "git+https://github.com/0xPolygonHermez/pil2-proofman.git?rev=0.0.16#5c47437feffccb16d95e120e8336ab8a168314e7" dependencies = [ "env_logger", "log", @@ -1639,7 +1639,7 @@ dependencies = [ [[package]] name = "proofman-hints" version = "0.1.0" -source = "git+https://github.com/0xPolygonHermez/pil2-proofman.git?rev=0.0.14#7d9bf98f0eaf3230399d22ad1e06b67fe864d16b" +source = "git+https://github.com/0xPolygonHermez/pil2-proofman.git?rev=0.0.16#5c47437feffccb16d95e120e8336ab8a168314e7" dependencies = [ "p3-field", "proofman-common", @@ -1649,7 +1649,7 @@ dependencies = [ [[package]] name = "proofman-macros" version = "0.1.0" -source = "git+https://github.com/0xPolygonHermez/pil2-proofman.git?rev=0.0.14#7d9bf98f0eaf3230399d22ad1e06b67fe864d16b" +source = "git+https://github.com/0xPolygonHermez/pil2-proofman.git?rev=0.0.16#5c47437feffccb16d95e120e8336ab8a168314e7" dependencies = [ "proc-macro2", "quote", @@ -1659,7 +1659,7 @@ dependencies = [ [[package]] name = "proofman-starks-lib-c" version = "0.1.0" -source = "git+https://github.com/0xPolygonHermez/pil2-proofman.git?rev=0.0.14#7d9bf98f0eaf3230399d22ad1e06b67fe864d16b" +source = "git+https://github.com/0xPolygonHermez/pil2-proofman.git?rev=0.0.16#5c47437feffccb16d95e120e8336ab8a168314e7" dependencies = [ "log", ] @@ -1667,7 +1667,7 @@ dependencies = [ [[package]] name = "proofman-util" version = "0.1.0" -source = "git+https://github.com/0xPolygonHermez/pil2-proofman.git?rev=0.0.14#7d9bf98f0eaf3230399d22ad1e06b67fe864d16b" +source = "git+https://github.com/0xPolygonHermez/pil2-proofman.git?rev=0.0.16#5c47437feffccb16d95e120e8336ab8a168314e7" dependencies = [ "colored", "sysinfo 0.31.4", @@ -2312,7 +2312,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "stark" version = "0.1.0" -source = "git+https://github.com/0xPolygonHermez/pil2-proofman.git?rev=0.0.14#7d9bf98f0eaf3230399d22ad1e06b67fe864d16b" +source = "git+https://github.com/0xPolygonHermez/pil2-proofman.git?rev=0.0.16#5c47437feffccb16d95e120e8336ab8a168314e7" dependencies = [ "log", "p3-field", @@ -2662,7 +2662,7 @@ dependencies = [ [[package]] name = "transcript" version = "0.1.0" -source = "git+https://github.com/0xPolygonHermez/pil2-proofman.git?rev=0.0.14#7d9bf98f0eaf3230399d22ad1e06b67fe864d16b" +source = "git+https://github.com/0xPolygonHermez/pil2-proofman.git?rev=0.0.16#5c47437feffccb16d95e120e8336ab8a168314e7" dependencies = [ "proofman-starks-lib-c", ] diff --git a/Cargo.toml b/Cargo.toml index eadb5b99..9f456214 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" } diff --git a/book/getting_started/quickstart.md b/book/getting_started/quickstart.md index 72e9b7dd..0710b3b5 100644 --- a/book/getting_started/quickstart.md +++ b/book/getting_started/quickstart.md @@ -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. @@ -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 ``` diff --git a/book/getting_started/quickstart_dev.md b/book/getting_started/quickstart_dev.md index 6ad219dc..f3965d23 100644 --- a/book/getting_started/quickstart_dev.md +++ b/book/getting_started/quickstart_dev.md @@ -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 @@ -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 @@ -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 ``` \ No newline at end of file