zkMIPS V0.2.0: Major Updates to Enhance Developer Experience
Share on

ZKM has released zkMIPS v0.2.0, featuring three major updates designed to simplify and enhance the developer experience for building ZK applications:

  1. zkMIPS Rust Toolchain
  2. zkMIPS Project Template
  3. Upgradeable Precompiles

zkMIPS Rust Toolchain

The new zkMIPS Rust Toolchain introduces a native Rust development environment to zkMIPS, streamlining the development process. A new target, mips-zkm-zkvm-elf, has been added to the Rust compiler, enabling developers to seamlessly compile Rust programs into MIPS32R2 ELF files. This can be achieved with a simple command-line installation:

Key benefits include:

  • Platform Independence: Compile Rust programs into zkMIPS-compatible binaries on any platform supported by the native Rust compiler. The compiler binary had been released in zkMIPS/toolchain, supporting both ARM and x86 architectures.
  • Minimal-Invasive Integration: Easily integrate the toolchain into existing workflows by adding the installation directory to the beginning of your PATH.

zkMIPS Project Template

The zkMIPS Project Template simplifies the process of creating and deploying end-to-end zkMIPS projects, including generating proofs and creating on-chain Solidity verifiers. Developers can quickly spin up a zkMIPS project using the provided template, which supports both local and network provers:

  • Local Prover: Generate proofs directly on your machine, suitable for smaller programs or resource-constrained environments.
  • Network Prover: Use the zkMIPS proof network to generate proofs via a RESTful API. This is ideal for complex programs, as the network uses a cloud-based GPU cluster for parallel proof generation.
Figure 1: the workflow of Project Template


The workflow (illustrated in Figure 1) involves:

  1. Clone the project template repository.
  2. Implement your guest program (the zkVM program you want to prove).
  3. Reuse provided host program samples for proof generation.
  4. Use the local prover or network prover to generate a proof for your guest program.
  5. Generate a Solidity verifier and verify your proof on-chain.

Upgradeable Precompiles

Upgradeable Precompiles enable proof verification within zkMIPS programs, allowing developers to:

  • Verify previously generated proofs (e.g. proofs of assets on Ethereum) without recomputation. For example, an existing proof that proves asset state on Ethereum can be used in a zkVM program on Solana, without requiring re-proving of the previous program. Users can generate proofs for any on-chain activity, combine any number of proofs into a proof, and verify results on any chain.
  • Combine multiple proofs into a single proof for efficient batch verification.
  • Build modular applications with reusable proofs across multiple programs.

Applications include:

  • Privacy Protection: Protecting privacy and data ownership by splitting programs into multiple parts, with proofs generated privately by parties holding sensitive data.
  • Proof Aggregation: Batch multiple proofs for streamlined on-chain verification.
  • Modular Client Programs: Create a single receipt for workflows with multiple operations or modules, improving verification efficiency.

Through the zkMIPS precompile, it's also possible to flexibly combine proofs from various Rust zkVM programs into more complex applications.

Compared to other implementations (like SP1), zkMIPS precompiles are upgradeable, meaning they support verification of any proof types without requiring modifications to existing on-chain verifiers. Figure 2 outlines the simplified workflow.

Figure 2: The simplified workflow of zkMIPS Precompiles

How to use zkMIPS Precompile

A precompiles sample is provided in the zkMIPS codebase, which works as below.

1.Through the normal proving process, using the utils::prove_segments interface to prove the precompile guest program (which is a regular ELF program containing specific inputs) and obtain its receipt. Here's an example:

2.During execution, the host guest program verifies the precompile program through zkm_runtime::io::verify (the arguments include the precompile program's image id and public input)

The system call zkm_runtime::io::verify uses the function find_assumption to check if there is a corresponding assumption in the proof system's assumptions list. If it's not present, it returns an error; if it is present, it is added to the assumptions_used list (this list will be merged into the final Compositereceipt)

3.The main host program takes the precompile program's receipt as input, and also uses the utils::prove_segments to prove the main guest program with the precompile program's receipt , and returns Compositereceipt which contains the list of receipts utilized by the host guest program.

When verifying the Compositereceipt (proof of the main host program), it is not only necessary to verify the proof of the main host program itself, but also to verify each of the receipts in the assumptions_used list.

Get Started

Explore the new features in zkMIPS v0.2.0 by visiting our GitHub repository. Whether you're building ZK applications, deploying proofs on-chain, or experimenting with modular proof systems, zkMIPS is here to simplify and accelerate your journey.

More articles
ZKM’s Proving Service: Breaking Down the Barriers for Proof Generation
ZKM is pleased to announce the release of its exclusive Proving Service, providing developers with access to high-performance servers that are equipped to efficiently handle the intensive computational requirements for generating zero-knowledge proofs. The service is optimized specifically for zkMIPS, ZKM's specialist zkVM software for facilitating integration of ZKP capabilities into various applications.
Science of Blockchain Conference 2023: A Formal Review
The Science of Blockchain Conference (SBC 2023) is held annually at Stanford University. The local ZKM team attended, and of the attending team Chief Research Advisor Jeroen van der Graaf shares his experience and gives his insight of the events and the seminars with commentary:
zkMIPS V0.2.0: Major Updates to Enhance Developer Experience

ZKM has released zkMIPS v0.2.0, featuring three major updates designed to simplify and enhance the developer experience for building ZK applications:

  1. zkMIPS Rust Toolchain
  2. zkMIPS Project Template
  3. Upgradeable Precompiles

zkMIPS Rust Toolchain

The new zkMIPS Rust Toolchain introduces a native Rust development environment to zkMIPS, streamlining the development process. A new target, mips-zkm-zkvm-elf, has been added to the Rust compiler, enabling developers to seamlessly compile Rust programs into MIPS32R2 ELF files. This can be achieved with a simple command-line installation:

Key benefits include:

  • Platform Independence: Compile Rust programs into zkMIPS-compatible binaries on any platform supported by the native Rust compiler. The compiler binary had been released in zkMIPS/toolchain, supporting both ARM and x86 architectures.
  • Minimal-Invasive Integration: Easily integrate the toolchain into existing workflows by adding the installation directory to the beginning of your PATH.

zkMIPS Project Template

The zkMIPS Project Template simplifies the process of creating and deploying end-to-end zkMIPS projects, including generating proofs and creating on-chain Solidity verifiers. Developers can quickly spin up a zkMIPS project using the provided template, which supports both local and network provers:

  • Local Prover: Generate proofs directly on your machine, suitable for smaller programs or resource-constrained environments.
  • Network Prover: Use the zkMIPS proof network to generate proofs via a RESTful API. This is ideal for complex programs, as the network uses a cloud-based GPU cluster for parallel proof generation.
Figure 1: the workflow of Project Template


The workflow (illustrated in Figure 1) involves:

  1. Clone the project template repository.
  2. Implement your guest program (the zkVM program you want to prove).
  3. Reuse provided host program samples for proof generation.
  4. Use the local prover or network prover to generate a proof for your guest program.
  5. Generate a Solidity verifier and verify your proof on-chain.

Upgradeable Precompiles

Upgradeable Precompiles enable proof verification within zkMIPS programs, allowing developers to:

  • Verify previously generated proofs (e.g. proofs of assets on Ethereum) without recomputation. For example, an existing proof that proves asset state on Ethereum can be used in a zkVM program on Solana, without requiring re-proving of the previous program. Users can generate proofs for any on-chain activity, combine any number of proofs into a proof, and verify results on any chain.
  • Combine multiple proofs into a single proof for efficient batch verification.
  • Build modular applications with reusable proofs across multiple programs.

Applications include:

  • Privacy Protection: Protecting privacy and data ownership by splitting programs into multiple parts, with proofs generated privately by parties holding sensitive data.
  • Proof Aggregation: Batch multiple proofs for streamlined on-chain verification.
  • Modular Client Programs: Create a single receipt for workflows with multiple operations or modules, improving verification efficiency.

Through the zkMIPS precompile, it's also possible to flexibly combine proofs from various Rust zkVM programs into more complex applications.

Compared to other implementations (like SP1), zkMIPS precompiles are upgradeable, meaning they support verification of any proof types without requiring modifications to existing on-chain verifiers. Figure 2 outlines the simplified workflow.

Figure 2: The simplified workflow of zkMIPS Precompiles

How to use zkMIPS Precompile

A precompiles sample is provided in the zkMIPS codebase, which works as below.

1.Through the normal proving process, using the utils::prove_segments interface to prove the precompile guest program (which is a regular ELF program containing specific inputs) and obtain its receipt. Here's an example:

2.During execution, the host guest program verifies the precompile program through zkm_runtime::io::verify (the arguments include the precompile program's image id and public input)

The system call zkm_runtime::io::verify uses the function find_assumption to check if there is a corresponding assumption in the proof system's assumptions list. If it's not present, it returns an error; if it is present, it is added to the assumptions_used list (this list will be merged into the final Compositereceipt)

3.The main host program takes the precompile program's receipt as input, and also uses the utils::prove_segments to prove the main guest program with the precompile program's receipt , and returns Compositereceipt which contains the list of receipts utilized by the host guest program.

When verifying the Compositereceipt (proof of the main host program), it is not only necessary to verify the proof of the main host program itself, but also to verify each of the receipts in the assumptions_used list.

Get Started

Explore the new features in zkMIPS v0.2.0 by visiting our GitHub repository. Whether you're building ZK applications, deploying proofs on-chain, or experimenting with modular proof systems, zkMIPS is here to simplify and accelerate your journey.