Quick Start Example
Minimum Requirements
Cycles Per Segment | RAM |
---|---|
32768 | 13G |
65536 | 19G |
262144 | 27G |
Clone and enter the ZKM Repo
git clone https://github.com/zkMIPS/zkm.git
cd zkm
Set the Default Variables
export RUST_LOG=info
export BASEDIR=$PWD # Replace with your folder location
export SEG_SIZE=65536 # See cycles above for exact value based on your RAM
export ARGS='2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 hello'
export SEG_OUTPUT=/tmp/output
export SEG_FILE_DIR=/tmp/output
Compile the Go Program into a MIPS Executable
GOOS=linux GOARCH=mips GOMIPS=softfloat go build -C prover/examples/sha2-go
This produces an ELF binary in prover/examples/sha2-go/sha2-go
export ELF_PATH=$BASEDIR/prover/examples/sha2-go/sha2-go
Generate the Proof from the ELF
HOST_PROGRAM=sha2_go \
cargo run --release --example zkmips prove_host_program
After generating the proof, you should receive a result: ../verifier/data/test_circuit
with the files:
After this step you will Verify the Proof.