diff --git a/contracts/verifier/snark_proof_with_public_inputs.json b/contracts/verifier/snark_proof_with_public_inputs.json index cc3f7263..d1b01449 100644 --- a/contracts/verifier/snark_proof_with_public_inputs.json +++ b/contracts/verifier/snark_proof_with_public_inputs.json @@ -1 +1 @@ -{"Proof":{"Ar":{"X":"20986100223742189794428594083244953701408789026843989908435048719917632304610","Y":"13312112978838104297936765092731357265583798633367270419949950449739950262299"},"Krs":{"X":"21414385011717857401350318474624945713895831525422758574143367432063095862610","Y":"16423991045129868936811412810791234200886558293119184537442651275319977235533"},"Bs":{"X":{"A0":"11334377274679574919826609438981352168291239642667203135465250445892409261829","A1":"502135620489275023389952763328439911399553648581965110109386553942302300788"},"Y":{"A0":"17625733828018823879938709981005705770193800659886938923296199657306934864258","A1":"4260326572269494480125515901189030920228567526305403135494458666071296191877"}},"Commitments":[{"X":"17273959889587427045931700521956542100389478452246646316053540421122551664021","Y":"18318673986437913163676530971051070041062128124589353307942427661936033278456"}],"CommitmentPok":{"X":"5949616844048677802101960585122116163044527517837594064636603012726545439747","Y":"4465071354076921449919725370557406791935776422229056588281381686837540526870"}},"PublicWitness":["3","176","196","66","152","252","28","20","154","251","244","200","153","111","185","36","39","174","65","228","100","155","147","76","164","149","153","27","120","82","184","85","3","176","196","66","152","252","28","20","154","251","244","200","153","111","185","36","39","174","65","228","100","155","147","76","164","149","153","27","120","82","184","85","5009287862160307920686587520880862879519265129424853749905862185648451074148"]} \ No newline at end of file +{"Proof":{"Ar":{"X":"20986100223742189794428594083244953701408789026843989908435048719917632304610","Y":"13312112978838104297936765092731357265583798633367270419949950449739950262299"},"Krs":{"X":"21414385011717857401350318474624945713895831525422758574143367432063095862610","Y":"16423991045129868936811412810791234200886558293119184537442651275319977235533"},"Bs":{"X":{"A0":"11334377274679574919826609438981352168291239642667203135465250445892409261829","A1":"502135620489275023389952763328439911399553648581965110109386553942302300788"},"Y":{"A0":"17625733828018823879938709981005705770193800659886938923296199657306934864258","A1":"4260326572269494480125515901189030920228567526305403135494458666071296191877"}},"Commitments":[{"X":"17273959889587427045931700521956542100389478452246646316053540421122551664021","Y":"18318673986437913163676530971051070041062128124589353307942427661936033278456"}],"CommitmentPok":{"X":"5949616844048677802101960585122116163044527517837594064636603012726545439747","Y":"4465071354076921449919725370557406791935776422229056588281381686837540526870"}},"PublicWitness":["3","176","196","66","152","252","28","20","154","251","244","200","153","111","185","36","39","174","65","228","100","155","147","76","164","149","153","27","120","82","184","85","3","176","196","66","152","252","28","20","154","251","244","200","153","111","185","36","39","174","65","228","100","155","147","76","164","149","153","27","120","82","184","85","5009287862160307920686587520880862879519265129424853749905862185648451074148"]} diff --git a/guest-program/mem-alloc-vec/Cargo.toml b/guest-program/mem-alloc-vec/Cargo.toml index 0e6aca27..09ad034b 100644 --- a/guest-program/mem-alloc-vec/Cargo.toml +++ b/guest-program/mem-alloc-vec/Cargo.toml @@ -1,6 +1,6 @@ [workspace] [package] -name = "zkm-mips-elf-mem-alloc-vec" +name = "mem-alloc-vec" version = "0.1.0" edition = "2021" diff --git a/guest-program/sha2-rust/Cargo.toml b/guest-program/sha2-rust/Cargo.toml index fd451087..e5f8f2de 100644 --- a/guest-program/sha2-rust/Cargo.toml +++ b/guest-program/sha2-rust/Cargo.toml @@ -1,6 +1,6 @@ [workspace] [package] -name = "zkm-mips-elf-sha2-rust" +name = "sha2-rust" version = "0.1.0" edition = "2021" diff --git a/host-program/run-local-proving.sh b/host-program/run-local-proving.sh index 1c0ca8b6..b144d038 100755 --- a/host-program/run-local-proving.sh +++ b/host-program/run-local-proving.sh @@ -1,3 +1,4 @@ +set -e program=$1 BASEDIR=$(cd $(dirname $0); pwd) export LD_LIBRARY_PATH=$BASEDIR/../sdk/src/local/libsnark:$LD_LIBRARY_PATH ##Modify it according your template @@ -5,10 +6,17 @@ export ZKM_PROVER=local export RUST_LOG=info export SEG_SIZE=262144 export ARGS="711e9609339e92b03ddc0a211827dba421f38f9ed8b9d806e1ffdd8c15ffa03d world!" -#export ELF_PATH=${BASEDIR}/../guest-program/$program/target/mips-unknown-linux-musl/release/$program +export ELF_PATH=${BASEDIR}/../guest-program/$program/target/mips-unknown-linux-musl/release/$program + +echo "Compile guest-program ${program}" +cd $BASEDIR/../guest-program/$program +cargo build -r --target=mips-unknown-linux-musl +cd - + +echo "Setup input for guest-program ${program}" #export PUBLIC_INPUT_PATH=host-program/test-vectors/244.json #export OUTPUT_DIR=/tmp/$program echo "BASEDIR:$BASEDIR" nohup ../target/release/zkm-prove $program >./$program-local-proving.log 2>&1 & -echo 'check out the log by tail -f $program-local-proving.log' +echo 'Check out the log by tail -f $program-local-proving.log' diff --git a/host-program/src/bin/zkm-prove.rs b/host-program/src/bin/zkm-prove.rs index c1b5ea0e..5dc954d7 100644 --- a/host-program/src/bin/zkm-prove.rs +++ b/host-program/src/bin/zkm-prove.rs @@ -217,8 +217,7 @@ fn set_sha2_go_intput(seg_size_u: u32, execute_only_b: bool) -> anyhow::Result
anyhow::Result