- Implement
keccakprecompile. This offers performance improvements for any guest program that uses thekeccakhash function, such as Ethereum block proving. - Implement
secp256r1(p256) precompile. This offers performance improvements for any guest program that performs arithmetic over thesecp256r1curve, such as verifying TEE attestations. - For more information about precompiles go to https://dev.risczero.com/api/zkvm/precompiles.
- Add
keccakexample. - Add
p256support to ECDSA example. - Add
RISC0_INFO=1to get profiling information. - Add
usedandfreemethods to bump allocator to enable collecting memory metrics on the guest.
- Add
RUST_LIB_BACKTRACEtosys_getenvallow-list to facilitate debugging guest code and allow theanyhow!macro to work without crashing the guest. - Add
RISC0_FEATURE_bigint2in the Docker build environment.
- Enable big integer acceleration in the rv32im circuit. The new
risc0-bigint2crate contains code that facilitates acceleration. - Accelerate RSA signature verification via bigint precompiles. Performance improvements vary by use case; as one example, our JWT validator example went from ~15M cycles to ~166k cycles.
- Add support for deferred assumptions. This is used as a foundation for precompiles such as the up-coming keccak precompile.
- Add union recursion program use to aggregate receipts. API will be solidified in future revisions.
- Add experimental APIs used to accelerate keccak. This enables keccak hashes to be computed in an unconstrained environment but does not prove the soundness of the hashes themselves.
- Update guest code to use Rust toolchain version
1.81.0. - Change visibility of groth16 proof to facilitate development to enable writing on-chain verifiers themselves.
- Add
seal_sizemethod to receipt types. - Make Bonsai Dependencies Optional under client feature flag.
bonsai-sdk: added preflight journal fetching.- Plumb
ReceiptClaimthroughSessionInfoand client-server to facilitate local testing. - Support wider range of client/server use cases including verification.
r0vm: addr0vm-ver-compatfeature flag to relax r0vm server version checks.risc0-build: allow guest methods binary targets to customize required-features and skip building such targets if not all required features were provided.- Enable forwarding custom rustc flags to guest builds.
- Change
cargo risczero datasheetto use guest code written in assembly to generate consistent cycle counts. risc0-zkp: Exportposeidon2constants.risc0-zkp: add changes to support extended field element use byzirgencode generation.- Use remark linter on website.
- Client/server: fix concurrent access to
TcpSocket. - Run
clippymore widely on risc0 repository using all targets and address warnings and errors. - Fix: gate
env::read_buffered()behind the 'std' feature - Fix missing cstdint include for cuda builds.
- Drop
risc0-circuit-bigintin favor ofrisc0-bigint2.
- Add
poly_dividekernel. This achieves proving speeds of 1.5 MHz on a 4090 GPU for proving rv32im programs.
- Enable environment variable to configure Bonsai poll time and reduce default.
- Client server: add an option to use redis.
- Fix cpp toolchain support for docker guest builds.
- Fix bugs in data sheet.
- Environment syscalls
sys_getenv,sys_argcandsys_argvare disabled by default, with the option to enable them via a feature flag on therisc0-zkvm-platformcrate. In host programs, environment variables and arguments are generally considered trusted. In contrast, the guest does not trust the host, which leads to risk that code designed for running on the host may result in insecure behavior when run in the guest. Disabling environment variables and args by default mitigates this risk.
- Allow static mut references in specific places
- Update reqwest and downloader
Support wider range of client/server use cases.
- Improve GPU performance. For more information see https://reports.risczero.com/benchmarks.
- Speed up null builds of guest programs.
- Released Rust toolchain
r0.1.79.0-1. This toolchain fixes a crash in the guest that appears when enabling the heap allocator in combination withthread_local!in the zkVM guest. - Enable support for running clippy on host-side code.
- Add linter to website
- Improve zero-knowledge property of the prover by increasing the amount of noise. We have used techniques described in this paper to strengthen the ZK property of the prover. See these docs for more information about zero knowledge and our proving system. This change results in a new set of control IDs. See the breaking changes section to learn more about this minor breaking change.
- Fix template generation for
--nostdmode.
- Add the
risc0-circuit-bigintcrate, which is the basis for many upcoming cryptographic accelerators. - Add examples and improve verbiage for datasheet.
- Add a
risc0_core::scope!macro used to measure performance. - Add blog link and use a cleaner mermaid theme for code examples on developer documentation website.
- Add "light builds". A new faster way to build guest programs intended for development only.
- Add an optional embedded allocator to the zkVM guest. By default, the zkvm uses an allocator that does not deallocate heap memory. The embedded allocator deallocates and is useful for long running guest programs.
- Add experimental support for
sys_fork. This syscall allows the zkVM to execute unconstrained code. The RISC-V code executed within this system call will not be encoded as a part of the trace execution. This can be used to implement hints and advice. - Use
stability::unstableto mark new experimental APIs. - Add unstable
env::read_frame()andenv::read_framed()which improves cycle counts when reading the input from the guest. - Re-vamped rzup. The rzup utility is used to install toolchains and extensions. The first implementation was a simple bash script. This has been replaced by a more robust rust implementation.
- Enable GPU proving by default on macOS.
- Add an example that shows how the
c-kzgcrate can be run in the zkVM. - Add an example that uses C as the guest code. This demonstrates how a user can use C to write an entire guest program without rust.
- Add a simple prover service example. This is a demonstration of how the public API can be used to build a simple proving service.
- Add the ability to serialize Receipts using the borsh serialization format.
- Add support for serialization of types such as
chronos::NaiveDatethat call intocollect_str.
- Due to the zero-knowledge change above, receipts generated by zkVM 1.0.x
cannot be verified with IDs from 1.1.x and verifiers using control IDs from
1.0.x are not compatible with 1.1.x. To avoid this control ID mismatch, users
who are verifying proofs must ensure that the version of their verifier must
match the version of their prover. For example, if a user is verifying proofs
that come from
risc0-zvkvm1.1.x, they must ensure that the verifier they are using fromrisc0-zkvmversion 1.1.x. If they are verifying proofs that come fromrisc0-zkvmversion 1.0.x, they must ensure that the verifier is also fromrisc0-zkvm1.1.x. Users of bonsai must ensure that their local verifier matches the version used by bonsai. For more information on why this change occurred, see the Fixes section.
- Change the host to validate the guest buffer address if its length is non-zero. This fixes an issue that occurs when building the guest with Rust toolchain version 1.79.0.
- Apply a workaround for LLVM compiler bug for rv32im to ensure that lower bits of addresses are preserved.
- Fix panic by remove page_size parameter from serialized MemoryImage
- Fix client/server version compatibility.
- Improve executor performance by 2x.
bonsai-sdk: enable execute-only mode. This will run the guest program but will not produce a receipt. This can be used to quickly measure the complexity of the guest program.bonsai-sdk: simplify the SDK by using themaybe_asynccrate.
- Fix
no_stdstarter template. - Fix serialization of structs such as
NaiveDatewhich calls intocollect_str.
- Fix issue with building CUDA kernels.
- Witness generation has been parallelized by adding another preflight pass.
- Improved performance by minimizing data transfers when constructing merkle proofs.
- Parallelized
step_verify_bytesfunction. - Changed
eval_checkto use precomputed powers for poly_mix.
- Fixed a bug with an unaligned short read.
- Commit globals in Fiat-Shamir transcript.
- Fixed an undefined behavior warning generated by rust 1.77.2 in guest.
- Addressed security vulnerabilities in the rv32im circuit.
- Fix clippy warnings in all published crates.
- Fix build issues arising from an undefined
_endsymbol.
- Generalized proof composition.
- Benchmarks have been improved.
- A new web app that can be used to display datasheets, prover benchmarks, application benchmarks and supported crates.
- Added the ability to compile Rust crates that bind to C code.
- Added a new
cargo risczero deploycommand to deploy ELF binaries to bonsai. ProverOptsnow has a newReceiptKindfield. This is used to select the minimum compression level of receipt to be generated by theProverandProverServertraits. The kinds include composite (a receipt containing a vector of segment receipts), succinct (a receipt where all segments have been compressed into a single receipt via the lift and join recursion programs), and compact (a snark receipt generated by compressing a succinct receipt using a groth16 prover. This used for on-chain proving).- A
compressfunction has been added to theProvertrait. This allows the users to more easily change receipts to a different kind in the host. - Rust's
alloc_zeroedfunction has been optimized in the guest. - Export
NullSegmentReffor use by host code. - Added a soundness error calculator.
- Bonsai SDK: added a method used to download receipts.
- Bonsai SDK: improved error messages.
- Bonsai SDK: added a new API to stop a proving session in Bonsai.
-
Change sys_cycle_count to return a
u64instead of u32. -
The
Provertrait'sprove()function now returns aProveInfo. Thisstructcontains the receipt as well as cycle and segment information gathered during the proof generation. The following is the definition ofProveInfoandSessionStatsstructs:
/// Information returned by the prover including receipt as well as other information useful for debugging
pub struct ProveInfo {
/// receipt from the computation
pub receipt: Receipt,
/// stats about cycle counts of the execution
pub stats: SessionStats,
}
/// Struct containing information about a prover's cycle count after running the guest program
pub struct SessionStats {
/// Count of segments in this proof request
pub segments: usize,
/// Total cycles run within guest
pub total_cycles: u64,
/// User cycles run within guest
pub user_cycles: u64,
}For those upgrading from v0.21.0, the following code change is necessary on the host side to retrieve the receipt.
- let receipt = prover.prove(env, BEVY_GUEST_ELF).unwrap();
+ let receipt = prover.prove(env, BEVY_GUEST_ELF).unwrap().receipt;-
Fix an issue where the temporary directory is not being removed when the
Sessiongoes out of scope. This helps prevent the depletion of disk space. -
Verification of groth16 receipts in rust that are compatible with Bonsai
- Add an improved Poseidon2 hashing function that replaces Poseidon for recursive proofs.
- For recursive proofs, the Poseidon hash function is replaced by the Poseidon2 hash function. Users can still create receipts using the older Poseidon hash function but these receipts will not be usable by Bonsai or any proof composition or rollup use cases.
- Revert change to
Prover::proveto return aSuccinctReceipt. This prevents a performance regression for default use cases.
- Restrict software ecall handler address range
- Fix argument handling in client/server mode
- Change jal to call in zkVM entrypoint #1257
- Improve ZKR zip file handling
- Support for Proof Composition
- Add execution statistics when using
RUST_LOG=info - Add XGBoost example using Spice AI query to train a model
- Improve CUDA performance by integrating sppark
- Add Poseidon2 support to CUDA backend
- Support for verifying Groth16 proofs
- Add exponential backoff to bonsai proof polling
- add
getrandomfeature to toggle getrandom in the guest - Adjust
Prover::proveto return aSuccinctReceiptby default
- Rename
ReceiptMetadatatoReceiptClaim - Drop
MemoryImagefrom the public API - Drop _elf suffix from API. For example,
Prover::prove_elfis renamedProver::prove.