Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
xander42280 committed Dec 13, 2024
1 parent 5c4ce79 commit 17021b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ If successfully, it will generate the binary files in `target/release`/{`sha2-ru
> [!NOTE]
> You can run the guest program without generating a proof by setting the environmental variable `EXECUTE_ONLY` to "true".https://github.com/zkMIPS/zkm/issues/152
> You can set the `ZKM_SKIP_PROGRAM_BUILD` environment variable to `true` to skip building the guest program when use `zkm_build::build_program`.
### 3. Generate groth16 proof and verifier contract

> [!NOTE]
Expand Down
2 changes: 2 additions & 0 deletions guest-program/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ cargo build --target=mips-unknown-linux-musl --release

The compiled mips ELF is in the zkm-project-template/guest-program/{sha2-rust,mem-alloc-vec,revme}/target/mips-unknown-linux-musl/release/ .

You can also integrate `zkm_build::build_program` into the compilation process of the host program.

## Remarks

If the guest program need outputing some messages , it must use the runtime::commit(). Then, the messages can be catched in the host program: [`fn print_guest_execution_output() or print_guest_execution_output_struct()`](../sdk/src/lib.rs)
4 changes: 2 additions & 2 deletions host-program/run-proving.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export LD_LIBRARY_PATH=$BASEDIR/../sdk/src/local/libsnark:$LD_LIBRARY_PATH ##Mo
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/elf-compilation/mips-unknown-linux-musl/release/$program
export JSON_PATH=${BASEDIR}/test-vectors/test.json
export PROOF_RESULTS_PATH=${BASEDIR}/../contracts
export EXECUTE_ONLY=false
Expand All @@ -29,8 +29,8 @@ if [[ "$program" =~ .*go$ ]];then
cd $BASEDIR/../guest-program/$program
GOOS=linux GOARCH=mips GOMIPS=softfloat go build -o $program
export ELF_PATH=${BASEDIR}/../guest-program/$program/$program
cd -
fi
cd -

if [ "$program" == "sha2-rust" ];then
export SEG_SIZE=65536
Expand Down

0 comments on commit 17021b5

Please sign in to comment.