How does
zkMIPS Work?

zkMIPS: A step-by-step overview
1
A program written in Go or Rust is compiled into a MIPS ELF binary file using the MIPS Compiler. The ELF file is the executable format for the MIPS instruction set.
2
The MIPS ELF binary file is loaded into the MIPS VM using the ELF Loader.
3
The MIPS VM runs the program and generates an execution trace for the Prover.
The execution trace is a record of the entire sequence of operations that is executed by a running program.
After each instruction is executed (left side table), we will get a value for each register. After going through all the instructions, we will get the trace table (right side table).
4
The Prover executes the MIPS program and uses the execution trace to generate a proof.
5
After generating the zkMIPS proof, the verifier contract verifies the proof on-chain.
zkMIPS Proving
Architecture
The program and trace are divided into segments.
The program and trace are divided into segments.
The segments are divided into modules. The instructions of each segment are divided into groups of four module tables: arithmetic, logic, memory and control.
STARK – The modules are proven independently and in parallel with FRI. These proofs are FRI-based modular proofs.
LogUp (STARK) – The modular proofs from the previous step are combined into one single proof for each segment using the LogUp lookup protocol.
PLONK – All segment proofs from the previous layer are recursively combined using the continuation protocol into one single continuation proof. This proves the correctness of the entire program trace.
Groth16 – The Groth16 proving paradigm is used to enable on-chain computation by converting the proof to an EVM-friendly format. The continuation proof is converted into an on-chain Groth16 (SNARK-based) proof.
zkMIPS is based on the MIPS32 microarchitecture
Why zkMIPS?
Anything compiles to MIPS and MIPS compiles to anything

Stable Design

MIPS-R3000 instruction set has not changed over time, preventing frequent redesigns of ZKP circuits.

Simple

Streamlined set of opcodes for ZKP circuit efficiency- no frequent opcode changes or custom instructions

Mature Ecosystem

MIPS has been around for the past 4 decades and has a strong industry presence