Risc0 Versions Save

RISC Zero is a zero-knowledge verifiable general computing platform based on zk-STARKs and the RISC-V microarchitecture.

v0.18.0

8 months ago

Our 0.18 release upgrades the Bonsai SDK with Groth16 SNARK seals for better on-chain verification, better error handling, and more. In the zkVM, this release separates host and guest build toolchains and also supports reproducibly building the same ImageID for the same zkVM code by using a consistent Docker environment.

Thank you to community members @austinabell and @winor30 for their contributions to this release!

Important and Breaking Changes

  • Separate host and guest build toolchains, allowing the use of different versions of rustc for host and guest code. This has allowed us to move the default host toolchain to the stable channel. The guest toolchain remains on a nightly release of 1.69.
  • Add cargo risczero build command to build zkVM guest programs using a Docker container, which enables ImageIDs to remain consistent across builds. See #799 for details.
  • Bonsai Ethereum contracts now use Forge as a subprocess, so building Bonsai code will now require installing Foundry tools.
  • Bonsai SDK: upload_img and upload_img_file no longer return ImageIdExists errors. Instead they return a boolean, true if the image exists on the server.
  • Bonsai SDK: Bonsai now returns Groth16 SNARK seals as well as the journal and post_state_digest for easy on-chain verification.
  • Expand Prover support to better work with remote provers like Bonsai.
  • Fix bug #820, correcting iterative calls to SHA2
  • Add 128 bits of entropy to the memory state, addressing a potential privacy issue where the SystemState root in the ReceiptMetadata was not guaranteed to be a hiding commitment.

What's Changed

New Contributors

Full Changelog: https://github.com/risc0/risc0/compare/v0.17.0...v0.18.0

v0.17.0

9 months ago

With our 0.17 release, we have expanded our Bonsai content and updated the installation process. The latter change means existing users will have to install again when upgrading, by running cargo install cargo-risczero and cargo risczero install. See the Getting Started section of our README for prerequisites and more details. We've also added a developer mode for more rapid development and continued to streamline the proof and receipt APIs, among other changes.

Thank you to community members @criadoperez, @austinabell, and @roseiliend for their contributions to this release! ​

Important and Breaking Changes

  • Added a cargo risczero install tool for setting up the RISC Zero toolchain. Fixes in this release require a "risc0" rustup toolchain; the cargo risczero install command will install this toolchain and do other RISC Zero setup. All users, new and old, will need to run this command to install the RISC Zero zkVM. Full details are available in the Getting Started section of our README.
  • Added a Developer Mode enabling more rapid development by skipping proving and validation steps. No proof is generated or verified while in developer mode, and in particular running verification in developer mode provides no security whatsoever. The RISC0_DEV_MODE environment variable controls whether developer mode is enabled, and this feature can be fully disabled at build time, regardless of environment, by using the disable-dev-mode feature flag on the risc0-zkvm crate.
  • Streamlined the Receipt, Executor, and Prover APIs. A basic high-level usage now looks like let receipt = default_prover().prove_elf(env, SOME_ELF).unwrap();. Receipt implementation details are encapsulated in an InnerReceipt object which most users will not need to interact with. The Prover now has additional high level methods, included prove and prove_elf. See the Executor, Receipt, and Prover sections of our docs for the current API, and this PR for details about the changes.
  • Moved binary format functionality into a separate risc0-binfmt crate. See its docs for details.
  • Prevented guest from writing to memory that will crash the prover if tampered with. See this PR for details.
  • Fixed large I/O and prevent splitting to a new segment when no instructions have been run. See this PR for details.
  • Updated circuit as well in the previous PR as well as this PR.
  • Pinned the cc crate to a specific version as a workaround to build problems when using its latest version.
  • Adjusted the Bonsai Ethereum Relay in several ways, including websockets, Solidity CI, SNARK seal support, and verify interface ​

What's Changed

New Contributors

v0.16.1

10 months ago

What's Changed

Full Changelog: https://github.com/risc0/risc0/compare/v0.16.0...v0.16.1

v0.16.0

10 months ago

The 0.16 release contains slight modifications to the zkVM API with the goal of allowing the zkVM to generate proofs either locally or remotely using Bonsai. Most changes are internal and only a few breaking changes are present, though they will require updates for most programs.

Breaking changes

We've made significant changes to the Executor. The executor was previously created and run using the following code:

let exec = Executor::from_elf(env, METHOD_ID);
let session = exec.run().unwrap();

As of 0.16, you will need to replace

use risc0_zkvm::Executor;

with

use risc0_zkvm::default_executor_from_elf;

and

let exec = Executor::from_elf(env, METHOD_ID);

with

let exec = default_executor_from_elf(env, METHOD_ID);

Note that the default executor used depends on whether you have (correctly) set environment variables BONSAI_API_URL and BONSAI_API_KEY. If these are present and valid, you'll be working remotely using Bonsai; otherwise, you'll be running locally.

Usage Highlights

https://github.com/risc0/risc0/pull/559 When using std on the guest, note that you no longer need to include #![no_main] or risc0_zkvm::entry!(...); just a standard pub fn main will do. (Note: the risc0 zkvm crate must still be included with use risc0_zkvm as _ if nothing else from it is used.)

Change Log

Examples

Bonsai SDK

Build / CI

Dependencies

zkVM

New Contributors

Full Changelog: https://github.com/risc0/risc0/compare/v0.15.0...v0.16.0

v0.15.3

11 months ago

What's Changed

Full Changelog: https://github.com/risc0/risc0/compare/v0.15.2...v0.15.3

v0.15.2

11 months ago

This release primarily fixes a bug (#597) where the prover would sometimes generate invalid receipts (which would therefore not verify). See the changelog below for the full list of what has changed since v0.15.1.

For more details on how this release differs from v0.14, see the v0.15.0 release notes.

What's Changed

  • Fix for #594 (where an invalid receipt would sometimes be generated, and thus fail verification) by @flaub (#597)
  • Enable feature-gated programmatic access to methods.rs contents by @hashcashier (#585)

Full Changelog: https://github.com/risc0/risc0/compare/v0.15.1...v0.15.2

v0.15.1

1 year ago

This is a bugfix and documentation release for v0.15. In particular, this fixes a problem installing cargo risczero as described in https://github.com/risc0/risc0/issues/579.

For more details on how this release differs from v0.14, see the v0.15.0 release notes.

What's Changed

Full Changelog: https://github.com/risc0/risc0/compare/v0.15.0...v0.15.1

v0.15.0

1 year ago

This release includes continuations, a mechanism for splitting a large program into several smaller segments that can be computed and proven independently. We’re excited about the benefits continuations provide in terms of features (such as adding the ability to pause & resume a guest), in terms of performance (such as capping the memory requirements for long-running guests), and in terms of functionality (such as the elimination of the cycle count limit on guest programs — you can now run a guest for as long as you are willing to wait).

Along with continuations 0.15 is bringing substantial changes to the zkVM API. We have done our best to highlight key breaking changes in the “Breaking Changes” section below, and we’ve put together a Migration Guide to help developers upgrade from 0.14 to 0.15. If you run into problems while upgrading, we invite you to reach out to us on Discord or open an issue!

Breaking Changes

Because this release includes many breaking API changes, we have also published a migration guide for updating 0.14 code to 0.15.

  • 0.15 depends on a different version of Rust than previous versions.
    • Please update rust-toolchain to channel = "nightly-2023-03-06" from channel = "nightly-2022-10-28"
  • Generation of proofs has been split into two phases: execution & proving.
    • This has many ramifications in the API, and we will discuss major ones below. For full details of the current API, please see the zkVM documentation.
  • risc0_zkvm::Prover has been replaced with risc0_zkvm::Executor
  • risc0_zkvm::ProverOpts has been replaced with risc0_zkvm::ExecutorEnv
  • The API for host-guest communication has been changed on the host side
    • Replace Prover::add_input_u8_slice and Prover::add_input_u32_slice with ExecutorEnvBuilder::add_input
    • If you previously relied on ProverOpts::with_send_recv_callback, consider ExecutorEnvBuilder::io_callback. For some cases, you may instead want to consider ExecutorEnvBuilder::stdin and ExecutorEnvBuilder::stdout. There are other options as well, see the ExecutorEnvBuilder documentation.
    • See the 0.15 Migration Guide for detailed instructions and other cases
  • risc0_zkvm::Receipt is replaced with risc0_zkvm::SessionReceipt which contains a Vec<risc0_zkvm::SegmentReceipt>
  • risc0_zkvm::serde replaces the functionality of risc0-zeroio and so the latter has been removed.

What's Changed

Full Changelog: https://github.com/risc0/risc0/compare/v0.14.0...v0.15.0

v0.14.0

1 year ago

As with all our pre-1.0 versions, our codebase and APIs remain under heavy development. Take a look at the "Breaking Changes" section below for the changes we think are likely to affect your projects. That said, we've probably missed some things. If you run into problems, we invite you to open an issue or reach out to us on Discord.

We've created a cargo risczero tool for creating, managing, and testing RISC Zero projects. Check out cargo risczero new the next time you start a new project!

Thanks to community members @kubaplas, @KaiGeffen, and @justinFrevert for their contributions to this release!

Breaking Changes

  • risc0_zkvm::Prover no longer takes an image_id parameter. The Image ID is instead calculated from the supplied ELF binary.
  • We have moved the examples and starter template into our main repository. You can now find the examples in the examples directory. You can generate a starter project from our template using our cargo risczero tool. The standalone risc0-rust-examples and risc0-rust-starter repositories are deprecated.
  • The backend for host-guest communication has been updated. There have been some corresponding changes to the API for host-guest communication, including some breaking changes, although the most commonly used functions like env::read will generally still work without adjustment. Check out the new env::stderr, env::stdin, and env::stdout! See the guest::env documentation and the prove::io documentation for more details.
  • Replaced risc0_zkvm::MemoryImage::root with risc0_zkvm::MemoryImage::get_root().
  • Dropped VerificationError::SealJournalLengthMismatch and renamed VerificationError::JournalSealRootMismatch to VerificationError::JournalDigestMismatch.

Changelog

New Contributors

Full Changelog: https://github.com/risc0/risc0/compare/v0.13.0...v0.14.0

v0.13.0

1 year ago

We have some breaking changes in v0.13. If you are migrating code from v0.12, please see the Breaking Changes section below for updates you will need to make to your code. We expect our APIs to continue to undergo substantial changes prior to the v1.0 release.

Thanks to community member @austinabell for their contributions to this release!

Breaking Changes

  • Receipt verification now takes a Digest reference, not a Digest.
    • Now use receipt.verify(&IMAGE_ID) where you would previously have used receipt.verify(IMAGE_ID). (Where receipt is a risc0_zkvm::receipt::Receipt.)
  • We have updated our SHA accelerator interface
    • Now use risc0_zkvm::sha::Impl instead of risc0_zkvm::sha::sha. For example, where you would previously have called risc0_zkvm::sha::sha().hash_bytes(&bytes) in v0.12, now you instead call risc0_zkvm::sha::Impl::hash_bytes(&bytes) in v0.13.
    • There are various other SHA changes, please see our reference documentation for the risc0_zkvm::sha and risc0_zkvm::guest::sha modules for details.

Changelog

New Contributors

Full Changelog: https://github.com/risc0/risc0/compare/v0.12.0...v0.13.0