File tree Expand file tree Collapse file tree 4 files changed +36
-15
lines changed Expand file tree Collapse file tree 4 files changed +36
-15
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ clean-guest:
3232build-guest :
3333 sh build-guest.sh
3434
35+ build-guest-local :
36+ cargo run --release -p scroll-zkvm-build-guest
37+
3538clean-build-guest : clean-guest build-guest
3639
3740clean-test-cache :
Original file line number Diff line number Diff line change @@ -242,9 +242,12 @@ impl Prover {
242242 pub fn gen_proof_stark ( & self , stdin : StdIn ) -> Result < StarkProof , Error > {
243243 // Here we always do an execution of the guest program to get the cycle count.
244244 // and do precheck before proving like ensure PI != 0
245+ let t = std:: time:: Instant :: now ( ) ;
245246 let total_cycles = self . execute_and_check ( & stdin) ?;
247+ let execution_time_mills = t. elapsed ( ) . as_millis ( ) as u64 ;
246248
247249 let sdk = Sdk :: new ( ) ;
250+ let t = std:: time:: Instant :: now ( ) ;
248251 let proof = sdk
249252 . generate_e2e_stark_proof (
250253 self . app_pk . clone ( ) ,
@@ -253,12 +256,18 @@ impl Prover {
253256 stdin,
254257 )
255258 . map_err ( |e| Error :: GenProof ( e. to_string ( ) ) ) ?;
259+ let proving_time_mills = t. elapsed ( ) . as_millis ( ) as u64 ;
260+ let stat = StarkProofStat {
261+ total_cycles,
262+ proving_time_mills,
263+ execution_time_mills,
264+ } ;
256265 let proof = StarkProof {
257266 proofs : vec ! [ proof. proof] ,
258267 public_values : proof. user_public_values ,
259268 //exe_commitment: comm.exe,
260269 //vm_commitment: comm.vm,
261- stat : StarkProofStat { total_cycles } ,
270+ stat,
262271 } ;
263272 tracing:: info!( "verifing stark proof" ) ;
264273 UniversalVerifier :: verify_stark_proof ( & proof, & self . get_app_vk ( ) )
Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ pub struct EvmProof {
3939pub struct StarkProofStat {
4040 /// total cycles
4141 pub total_cycles : u64 ,
42+ /// exec time
43+ pub execution_time_mills : u64 ,
44+ /// proving time
45+ pub proving_time_mills : u64 ,
4246}
4347
4448/// Helper to modify serde implementations on the remote [`RootProof`] type.
Original file line number Diff line number Diff line change 11#! /bin/bash
2+ set -xeu
23
34# release version
45SCROLL_ZKVM_VERSION=0.5.2
@@ -7,19 +8,23 @@ if [ -z "${SCROLL_ZKVM_VERSION}" ]; then
78 exit 1
89fi
910
10- # chunk-circuit exe
11- wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION /chunk/app.vmexe -O crates/circuits/chunk-circuit/openvm/app.vmexe
11+ function download_by_s3() {
12+ aws --profile default s3 cp s3://circuit-release/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION releases/$SCROLL_ZKVM_VERSION --recursive
13+ }
1214
13- # batch-circuit exe
14- wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION /batch/app.vmexe -O crates/circuits/batch-circuit/openvm/app.vmexe
15+ function download_by_http() {
16+ for f in chunk/app.vmexe \
17+ chunk/openvm.toml \
18+ verifier/openVmVk.json \
19+ verifier/verifier.bin \
20+ bundle/digest_1.hex \
21+ bundle/app.vmexe \
22+ bundle/digest_2.hex \
23+ bundle/openvm.toml \
24+ batch/app.vmexe \
25+ batch/openvm.toml; do
26+ wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION /$f -O releases/$SCROLL_ZKVM_VERSION /$f
27+ done
28+ }
1529
16- # bundle-circuit exe
17- wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION /bundle/app.vmexe -O crates/circuits/bundle-circuit/openvm/app.vmexe
18-
19- # bundle-circuit exe, legacy version, may not exist
20- wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION /bundle/app_euclidv1.vmexe -O crates/circuits/bundle-circuit/openvm/app_euclidv1.vmexe || echo " legacy app not exist for $SCROLL_ZKVM_VERSION "
21-
22- # assets for verifier-only mode
23- wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION /verifier/root-verifier-vm-config -O crates/verifier/testdata/root-verifier-vm-config
24- wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION /verifier/root-verifier-committed-exe -O crates/verifier/testdata/root-verifier-committed-exe
25- wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION /verifier/verifier.bin -O crates/verifier/testdata/verifier.bin
30+ download_by_http $SCROLL_ZKVM_VERSION
You can’t perform that action at this time.
0 commit comments