Releases: risc0/risc0
v0.17.0
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; thecargo 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 thedisable-dev-mode
feature flag on therisc0-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, includedprove
andprove_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
- Bonsai Governance Showcase and Ethereum smart contract libraries. by @nategraf in #695
- Bonsai relay by @capossele in #696
- Improve Bonsai Relay by @capossele in #699
- Add xtask install by @flaub in #701
- Remove thiserror from risc0-zkp by @flaub in #704
- Fix solc installation by @flaub in #705
- Update Cargo.lock files by @flaub in #711
- chore: remove allow(unused) from guest code, cleanup by @austinabell in #688
- add a hook in Session to support the proof generation progress bar by @roseiliend in #717
- Fix typos in governance demo by @criadoperez in #724
- Add RSA support to sha2 compat by @flaub in #726
- zkVM: split binfmt feature to a new "risc0-binfmt" crate for modularity by @SchmErik in #725
- Emulator: Improve usability by restricting memory region access for guest programs by @SchmErik in #727
- Adjust risc0-binfmt deps by @flaub in #731
- Run examples as separate job by @flaub in #732
- Adjust cache keys by @flaub in #733
- Fix for large I/O by @flaub in #737
- Replace Receipt trait with InnerReceipt enum by @flaub in #703
- Update links for new website by @tzerrell in #728
- Editing pass on starter template readme by @pdg744 in #693
- typo fixes on bonsai governance readme by @pdg744 in #741
- Add default run to ECDSA example to make cargo run just work by @nategraf in #742
- Add test for in-browser verification by @flaub in #716
- Provide a higher-level API for most use-cases by @flaub in #748
- Fixes for clippy and add lint to CI by @flaub in #751
- workspace: patch cc crate by @SchmErik in #757
- update generated code by @SchmErik in #761
- refactor(ethereum-relay): Make websocket connection more reliable by @Cardosaum in #697
- updating bevy readme by @pdg744 in #683
- Support SNARK seals in Bonsai relay and enable CI for Solidity code via Foundry by @nategraf in #712
- Fix typos in IBonsaiRelay by @nategraf in #771
- Add cargo-risczero install by @flaub in #773
- Support CI in cargo-risczero build-toolchain by @flaub in #778
- Added GITHUB_TOKEN explicitly to risczero install by @mothran in #780
- Remove trailing slash from URL in bonsai-sdk by @mothran in #759
- zkvm: add dev mode by @SchmErik in #752
- Convert dev mode unit tests to integration tests by @flaub in #785
- Commented out governance with-zkvm tests by @mothran in #781
- updating chess readme by @pdg744 in #764
- Add new verify overload to IRiscZeroVerifier.sol by @nategraf in #782
- Prepare for release v0.17.0 by @flaub in #786
New Contributors
- @roseiliend made their first contribution in #717
- @Cardosaum made their first contribution in #697
Full Changelog: v0.16.1...v0.17.0
v0.16.1
What's Changed
- Update README by @flaub in #686
- template: add notes on remote proving by @SchmErik in #687
- Align implementations of image ID and system state struct hash by @nategraf in #689
- Fix for #681 by @flaub in #684
- cargo risczero: update README with reference to remote proving by @SchmErik in #690
Full Changelog: v0.16.0...v0.16.1
v0.16.0
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
#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
- Starter template: added pointer to website explainer by @pdg744 in #593
- Update instructions in factors README and comments in starter template by @3lkn in #564
- Rename
examples/evm
toexamples/zkevm-demo
by @flaub in #611 - factors readme: add pointer to factors explainer by @pdg744 in #592
- sha example: add pointer from readme to explanatory video by @pdg744 in #587
- Add ECDSA verification example using bigint acceleration support by @nategraf in #590
- Fix the password checker example README by @criadoperez in #674
- Add ZK financial calculation example by @choongng in #595
- Added Brian's minimal bevy example by @SchmErik in #643
- Remove older bonsai-template by @mothran in #650
- Fix typos in examples by @criadoperez in #667
Bonsai SDK
- Add first draft of bonsai-alpha SDK by @mothran in #606
- Add first version of Bonsai SDK as 'omega' by @Wollac in #630
- Revert "Add first version of Bonsai SDK as 'omega' (#630)" by @flaub in #642
- Update the Bonsai SDK README example code by @mothran in #685
- Add stark2snark routes to Bonsai SDK by @mothran in #665
- Bonsai SDK: migrate from image UUID to imageID by @mothran in #662
- Migrate from BONSAI_ENDPOINT -> multi env var by @mothran in #641
Build / CI
- Release branches are now included in CI by @flaub in #583
- EVM example: added pointer from readme to blog by @pdg744 in #589
- waldo example: added pointer from readme to blog by @pdg744 in #588
- Add Graviton / arm64 + linux runners into CI by @imdaisyadams in #581
- Took down graviton workflow by @imdaisyadams in #631
- Update Cronjob Time by @imdaisyadams in #624
Dependencies
- Update criterion requirement from 0.4 to 0.5 by @dependabot in #586
- Update to latest
revm
and useradium
from git by @intoverflow in #604 - Update
metal
to 0.25 by @flaub in #661 - Update the
num-derive
requirement from 0.3 to 0.4 by @dependabot in #663 - Pin
bstr
to fix build issue by @flaub in #580 - Simplify guest linker configuration by @shkoo in #559
- Remove
bincode
and useserde
crate by @rlukata in #647
zkVM
- Add Rust doc examples to
Executor
andExecutorEnv
by @3lkn in #572 - Add a migration guide for the 0.15 release by @3lkn in #578
- Handle alignment errors in risc0_zkvm::serde::from_slice by @nategraf in #600
- Make
session_limit
optional by @intoverflow in #608 - Fix digest mismatch by @flaub in #597
- Add test and make rust implementation of IOP match cirgen implementation by @jbruestle in #599
- Hash all pages to fix issues with executor by @flaub in #676
- Fix https://github.com/risc0/risc0/pull/676 to only hash dirty pages in the executor by @flaub in #679
- zkVM: added remote proving by Bonsai by @SchmErik in #677
- Expose
SystemState
for mockingReceiptMeta
instances in tests by @hashcashier in #617 - Improve executor performance by @flaub in #651
- Improve CUDA performance by @flaub in #653
- Drop use of unified memory for CUDA by @flaub in #654
- Update recursion predicates by @jbruestle in #657
- Remove
unused Once
type by @austinabell in #660 - Implement
SessionReceipt
trait by @SchmErik in #616 - Unify
SessionReceipt
by @flaub in #666 - README: add required dependencies for Linux by @criadoperez in #675
- Revive the dual HAL by @flaub in #678
- Add test for overflowing session limit specified in executor env parameter by @SchmErik in #575
- Enable feature-gated programmatic access to
methods.rs
contents that enables dynamic lookup of elfs/ids/paths by @hashcashier in #585 - Rebuild CUDA on related environment variables by @mothran in #605
- Publish Recursion Verifier by @SchmErik in #603
- Fix compiler warning in guest by @SchmErik in #614
- Fix typo by @matthiasgoergens in #613
- Improve executor performance by @flaub in #644 and #615
- Clean up recursion structs by @SchmErik in #632
- Update "getting started" link to new docs site by @pdg744 in #649
New Contributors
- @hashcashier made their first contribution in #585
- @imdaisyadams made their first contribution in #581
- @matthiasgoergens made their first contribution in #613
- @Wollac made their first contribution in #630
- @criadoperez made their first contribution in #667
Full Changelog: v0.15.0...v0.16.0
v0.15.3
v0.15.2
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: v0.15.1...v0.15.2
v0.15.1
This is a bugfix and documentation release for v0.15. In particular, this fixes a problem installing cargo risczero
as described in #579.
For more details on how this release differs from v0.14, see the v0.15.0 release notes.
What's Changed
- Add a migration guide for the 0.15 release by @3lkn (#578)
- Pin bstr to fix build issue by @flaub (#580)
- Include release branches for CI by @flaub (#583)
- Add a few Rust doc examples to Executor and ExecutorEnv by @3lkn (#572)
- Update instructions in factors README and comments in starter template by @3lkn (#564)
Full Changelog: v0.15.0...v0.15.1
v0.15.0
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
tochannel = "nightly-2023-03-06"
fromchannel = "nightly-2022-10-28"
- Please update
- 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 withrisc0_zkvm::Executor
risc0_zkvm::ProverOpts
has been replaced withrisc0_zkvm::ExecutorEnv
- The API for host-guest communication has been changed on the host side
- Replace
Prover::add_input_u8_slice
andProver::add_input_u32_slice
withExecutorEnvBuilder::add_input
- If you previously relied on
ProverOpts::with_send_recv_callback
, considerExecutorEnvBuilder::io_callback
. For some cases, you may instead want to considerExecutorEnvBuilder::stdin
andExecutorEnvBuilder::stdout
. There are other options as well, see the ExecutorEnvBuilder documentation. - See the 0.15 Migration Guide for detailed instructions and other cases
- Replace
risc0_zkvm::Receipt
is replaced withrisc0_zkvm::SessionReceipt
which contains aVec<risc0_zkvm::SegmentReceipt>
risc0_zkvm::serde
replaces the functionality ofrisc0-zeroio
and so the latter has been removed.
What's Changed
- Update serial_test requirement from 1.0 to 2.0 by @dependabot in #486
- Removed Snakecase from risczero new proj name by @mothran in #487
- Align example project code with latest starter template by @tzerrell in #488
- Added RISC0_CUDA_OPT and set ptxas opt level to -O1 by @mothran in #492
ExecState::segmentize
creates execution segments against which proofs may be generated by @shkoo in #482- README Getting Started steps have been updated to include new
cargo risczero
tool by @flaub in #490 - Update to latest ethers & revm by @flaub in #494
- Update memory map and drop unused code by @flaub in #491
- Moved tempdir for
risc0-build
intocache_dir
by @mothran in #497 - Fixes
risc0-build
deadlocks on large outputs by @mothran in #498 - Hash function cleanups by @flaub in #493
- Added
RISC0_GUEST_LOGFILE
and fixed clippy warns by @mothran in #499 - Add system initiated splits to support continuations by @flaub in #469
- Use generated layout to determine location of registers in rv32im circuit by @shkoo in #476
- Remove
zeroio
in favor ofrisc0_zkvm::serde
by @shkoo in #502 - Add test and example of using
stdio
throughProverOpts
. by @shkoo in #506 - Move to flashbots RPC for EVM test by @mothran in #508
- Crates.io validation tooling by @mothran in #501
- Add
serde
derives toMemoryImage
by @spaugh in #511 - Delete github-action-benchmark repo directory by @mothran in #512
- Implementation of new API (as described in Breaking Changes), part 1 by @flaub in #503
- Document
Session
andSegment
by @tzerrell in #509 - Add additional sanity checking to the ELF parser by @mothran in #515
- Added
templ_subdir
flag tocargo risczero new
by @mothran in #517 - Implementation of new API, part 2 by @flaub in #514
- Revive profiler, add docs, cleanups by @flaub in #518
- Update the
rust-starter
template to match new API by @mothran in #519 - Replace
default_hal
withdefault_prover
by @flaub in #520 - Support Poseidon 254 by @jbruestle in #524
- Add Clone derive to
Segment
by @spaugh in #523 - Added index to
Segment
/SegmentReceipt
by @mothran in #525 - Move gh-repository location in
bench-trend
workflow by @mothran in #526 - Migrate Getting Started into Factors README by @tzerrell in #516
- Keep CUDA context alive by @flaub in #528
- Fixing nightly crate validator workflows by @mothran in #522
- Make MemoryImage::new() failable + bound check by @mothran in #533
- Added pc to MemoryImage by @mothran in #534
- Rename
risc0/benchmarks
toghpages
by @mothran in #537 - Added running WASM within the zkvm example by @mothran in #539
- Improve executor perf by @flaub in #536
- Add BigInt syscall and accelerator in rv32im circuit by @nategraf in #466
- API adjustment: executor segment callback by @flaub in #540
- Add mdBook stub by @tzerrell in #527
- Change the RISC-V circuit semantics for recursions by @jbruestle in #541
- Update
db-dump
incrate-validator
to fix nightly CI by @mothran in #542 - Fixed evm block off-by-one, added
block_numb
arg by @mothran in #544 - serde: add support to serialize and deserialize 32 bit and 64 bit floating point values by @SchmErik in #545
- Added libm externs to zkvm guest by @mothran in #543
- Always provide
risc0_zkvm::guest
module for easier analyzing, even when not ontarget=zkvm
by @shkoo in #546 - Remove outdated limitation on EVM example by @tzerrell in #548
- Fix executor by accounting for extra cycles and patch continuations test for CI by @SchmErik in #556
- Fix spurious build warning about "duplicate package
wordle
". by @choongng in #550 - Use
crypto-bigint
instead ofnum-bigint
by @nategraf in #547 - Update to Rust 1.69.0 by @mothran in #553
- Add
FileSegmentRef
by @tzerrell in #560 - Store memory image as a btree of pages by @shkoo in #561
- Adding feature flag documentation to crate READMEs by @3lkn in #521
- Update Where's Waldo with syscalls and new hashing traits by @nategraf in #448
- Adjust
image_id
to be the hash of(merkle_root, pc)
by @flaub in #566 - Fix for FFI function signature mismatch (issue #569) by @flaub in #570
- Make
sys_sha_buffer
available as extern and add RustCrypto sha2 patching example by @nategraf in #567 - Add error string to opcode decode failure in Executor by @nategraf in #571
- Workaround to fix self-hosted runners by @flaub in #577
- Improve receipt docs by @tzerrell in #576
Full Changelog: v0.14.0...v0.15.0
v0.14.0
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 animage_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
andrisc0-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 newenv::stderr
,env::stdin
, andenv::stdout
! See theguest::env
documentation and theprove::io
documentation for more details. - Replaced
risc0_zkvm::MemoryImage::root
withrisc0_zkvm::MemoryImage::get_root()
. - Dropped
VerificationError::SealJournalLengthMismatch
and renamedVerificationError::JournalSealRootMismatch
toVerificationError::JournalDigestMismatch
.
Changelog
- Programmatically generate Poseidon constants by @jbruestle in #385
- Split each example methods into its own directory by @flaub in #396
- Use tempdir_in OUT_DIR to prevent cross-fs-unlink by @mothran in #395
- Add waldo example by @flaub in #399
- Benchmark workflows by @mothran in #398
- Using Blake2b as a hash function by @kubaplas in #401
- Add "copy-in" to rv32 circuit by @shkoo in #390
- Restrict benchmarks to bench machines by @flaub in #404
- Add starter template for Bonsai applications by @nategraf in #403
- Drop vulnerable remove_dir_all dep by @flaub in #405
- Update logo by @tzerrell in #411
- Scope benchmarks to just risc0 code by @mothran in #412
- Replace @kt3k/license-checker with license-check.py by @flaub in #406
- Add actions for rustup and sccache by @flaub in #413
- Remove FFPU by @shkoo in #397
- Have Bonsai template use path dep and address review comment from #403 by @nategraf in #408
- [Bonsai Template] Split Bonsai logic into BonsaiApp contract by @nategraf in #414
- Added python install step to CI by @mothran in #417
- CI: disable building dependency docs and zkvm guests by @mothran in #418
- [Bonsai Template] Update guest serialization to latest Bonsai commit by @nategraf in #416
- Expand examples in documentation by @tzerrell in #393
- Update Cargo.lock and drop unused by @flaub in #419
- One comment per benchmark PR check. by @mothran in #407
- Use new m2 macs by @flaub in #422
- Change RNG semantics to help Poseidon. by @jbruestle in #421
- Fixed example code linking to wrong youtube video by @KaiGeffen in #424
- Full documentation for
risc0_zkvm
by @tzerrell in #425 - Poseidon bug fix by @jbruestle in #427
- Drop INPUT region by @flaub in #428
- zkvm: add sys_rand to generate random numbers for the guest by @SchmErik in #389
- Require docs for
risc0-core
by @tzerrell in #429 - Document journal is written by commit by @tzerrell in #430
- Have cuda hal fall back to CPU for Poseidon support. by @jbruestle in #432
- Add rust-cache to workflows by @mothran in #423
- Guest I/O, now with posix style! by @shkoo in #426
- Added pull-req perms for comment creation by @mothran in #440
- Add additional perms for PR comments by @mothran in #442
- Partial experimental preflight implementation for riscv32im by @shkoo in #447
- zkvm: add guest support for getrandom by @SchmErik in #445
- Divide workflow for bench_pr to allow forked repo PR's. by @mothran in #446
- Split core zkp kernels and rv32im kernel into seperate sys crates by @jbruestle in #449
- Support for stdin and getenv in guest by @shkoo in #452
- Add no-std fix for WASM/Substrate chains by @justinfrevert in #438
- Add support for Cuda Poseidon hal. by @jbruestle in #454
- Attempt to fix unzip action failures by @mothran in #450
- Bug fix for new kernels by @jbruestle in #459
- Adjusted benchmark workflow with PR number by @mothran in #458
- Reference
rust guest workarounds
tag by @tzerrell in #451 - EVM example by @mothran in #455
- Move benchmark comment files to runner.temp by @mothran in #462
- Add concurrency to CI by @rlukata in #463
- adding warning about memory by @pdg744 in #464
- Continuations, part 1 by @flaub in #461
- Migrate guest's concept of "initial input" to be a more standard "stdin" by @shkoo in #468
- Update directories requirement from 4.0 to 5.0 by @dependabot in #456
- minor copy editing on evm example by @pdg744 in #467
- Updates to Wordle text and yellow highlight by @3lkn in #436
- Add tool for datasheet generation by @flaub in #473
- Workaround for sccache issue in CI by @flaub in #474
- Added
prod
label to workflows by @mothran in #475 - cargo-risczero tool by @mothran in #453
- Fixed a typo in
risczero new
template by @mothran in #477 - Fixes for cargo-risczero new by @flaub in #480
- Update template & examples references by @tzerrell in #478
- Bump version to 0.14.0-rc.1 by @flaub in #483
New Contributors
- @kubaplas made their first contribution in #401
- @KaiGeffen made their first contribution in #424
- @justinfrevert made their first contribution in #438
Full Changelog: v0.13.0...v0.14.0
v0.13.0
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 usedreceipt.verify(IMAGE_ID)
. (Wherereceipt
is arisc0_zkvm::receipt::Receipt
.)
- Now use
- We have updated our SHA accelerator interface
- Now use
risc0_zkvm::sha::Impl
instead ofrisc0_zkvm::sha::sha
. For example, where you would previously have calledrisc0_zkvm::sha::sha().hash_bytes(&bytes)
in v0.12, now you instead callrisc0_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
andrisc0_zkvm::guest::sha
modules for details.
- Now use
Changelog
- Decrease use of hardcoded set of buffers (accum, code, data), part 1 by @shkoo in #354
- risc0-sys crate / HAL refactor by @mothran in #348
- Add riscv-tests and fix divide extern by @flaub in #359
- Fix bug in decoding memory instructions by @flaub in #361
- Improvements to SHA-256 API by @nategraf in #330
- [NFC] Refactor code in advance of adding support for alternate hashes by @jbruestle in #367
- Fix metal support by @jbruestle in #369
- Reword & re-link zkvm README by @tzerrell in #370
- Update circuit to make it small enough that Metal works. by @jbruestle in #372
- Add GPU to CI by @flaub in #378
- Add support for the Poseidon hash and its use by the CPU + Metal Hals for proving and verifying by @jbruestle in #379
- Add tracing instrumentation to prover to restore granularity by @shkoo in #382
- Migrate factors & sha examples with shared methods by @tzerrell in #374
- Add example tests & GPU support by @tzerrell in #386
- Add SyncSlice for safe(r) multithreading use of slices by @shkoo in #387
- Fix for #381 by @flaub in #391
- Add risc0-build-kernel helper crate by @flaub in #392
- fix: remove unnecessary unsafe sync impls from Elem by @austinabell in #383
New Contributors
- @austinabell made their first contribution in #383
Full Changelog: v0.12.0...v0.13.0
v0.12.0
We have made a number of breaking changes in v0.12. If you are migrating code from v0.11, 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 members @Vesnica, @stskeeps and @0xkrabbypatty for their contributions to this release!
Breaking Changes
(If you still have trouble migrating your code after applying the updates in this section, take a look at our 0.12 migration FAQ.)
- 0.12 depends on a different version of Rust from 0.11.
- Please update
rust-toolchain
tochannel = "nightly-2022-10-28"
(instead of 2022-06-20)
- Please update
- The
risc0_build::link
function is no longer necessary and has been removed.- Remove
risc0_build::link
from build files. - In particular, the starter template (and examples) repo had the build file
methods/guest/build.rs
which was only used for thislink
function. This file should now be deleted altogether, as should analogous files in your own repositories.
- Remove
- The
risc0_zkvm_guest
crate no longer exists, and its contents have been moved to theguest
module of therisc0_zkvm
crate.- Replace
use risc0_zkvm_guest
withuse risc0_zkvm::guest
- Change your
Cargo.toml
files fromrisc0-zkvm-guest = "0.11"
to instead depend onrisc0-zkvm = { version = "0.12", default_features = false }
(guest code must not include default features, as those features include host-specific code). - If you are using our experimental rust standard library support in the guest, you must additionally specify
features = [ "std" ]
.
- Replace
- There is no longer a
host
module inrisc0_zkvm
, andProver
andReceipt
are now at the top level.- Use
risc0_zkvm::Prover
instead ofrisc0_zkvm::host::Prover
- Use
risc0_zkvm::Receipt
instead ofrisc0_zkvm::host::Receipt
- Use
- We have adjusted our SHA acceleration interface.
- Use the
risc0_zkvm::guest::sha::digest
function instead of the oldrisc0_zkvm_guest::sha_digest_u8_slice
function. - See the documentation for the
risc0_zkvm::guest::sha
andrisc0_zkvm::sha
modules for details on other parts of the SHA API.
- Use the
- There is no longer a
risc0_zkvm::Prover::add_input
function- Use
add_input_u32_slice
(oradd_input_u8_slice
) instead.
- Use
- You can now directly access a
risc0_zkvm::Receipt
’sjournal
andseal
fields, and the correspondingget_*
functions have been removed.- Replace
rec.get_journal_vec()
withrec.journal
- Replace
rec.get_seal()
withrec.seal
- Replace
rec.get_journal()
withrec.get_journal_bytes()
(orrec.journal
if you don’t specifically need the journal formatted as au8
slice)
- Replace
Receipt::get_output
now returns a&[u8]
- If you still want a
Vec<u32>
, useReceipt::get_output_u32_vec
- If you still want a
Changelog
(Full Changelog: v0.11.1...v0.12.0)
- Switch to pure Rust prover & verifier (#233, #258, #260)
- Genericize field used in ZKP to enable the possibility of using a different field in our circuit (#238, #250, #253, #255, #257, #272)
- Make TapSet in generated Rust code (#242)
- Adjust what functionality is included in the HAL, add VerifyHal (#241, #252, #266, #273)
- Use Montgomery form for field elements (#247)
- Move host-guest communication (#246)
- Update Rust version to
nightly-2022-10-28
(#248, #320) - Change some asserts to Result Errs (#251)
- Generate constant with Elf file contents to avoid needing to link to built files from code. (#244)
- Let guest methods indicate if they use std or are no_std and provide appropriate panic and alloc implementations based on this choice
- Add initial guest profiling support (#274)
- Standardize internal representation of SHA code, e.g. switching to big-endian (#268, #291, #303)
- Add
insecure_skip_seal
feature, allowing faster turnaround for development at the cost of security. WARNING: If you turn on this feature when running the verifier, it no longer verifies that the proof is correct. (#293) - Add risc0_zeroio crate with alternative serialization options (#301)
- Clean up memory map (#304)
- Update PRNG to run in fixed time (#305, #311)
- Add MemoryImage and replace MethodIDs with ImageIds (#326)
- Change visibility of
poly_ext
(#317, #309) - Use
$HOME/.risc0
for tmpdir for downloads (#327) - Improve build times by removing largely unused debugging info (#329)
- Improve nvcc error message (#340)
- Generate control_id in bootstrap (#339)
- Don’t unnecessarily publish the bootstrap package
- Fix build status badge
- Fix tap caching for multiple verifies (#346)
- Fix CUDA endianness (#353)
- Format private outputs for deserialization (#355)
- Fix typos and broken links (#237, #239)
- Clean up style & formatting (#264, #268)
- Improve documentation and comments (#254, #275, #280, #297, #306, #313, #314, #315, #316, #318, #319, #333, #345, #351)
- Expand tests, add benchmarks (#243, #259, #292, #289)
- Build system fixes (#350)
- Upgrade circuit (#276, #298, #337, #347)
- Update integration with the circuit (#317)
- Various performance upgrades (#263, #265, #269, #277, #290)
- Keep license headers up-to-date (#294, #331)
- Update dependencies and remove unnecessary dependencies (#268, #302, #310, #335, #336, #342, #352)