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