Skip to content

release: v1.2.1-rc.0 #1646

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@ jobs:
- name: Build and run book examples
working-directory: examples
run: |
set -e
for dir in */; do
if [ -f "${dir}Cargo.toml" ]; then
echo "Building ${dir%/}"
cd "$dir"
cargo openvm build && cargo openvm run
cargo openvm build
cargo openvm run
cd ..
fi
done
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ jobs:

- name: Run clippy
run: |
# list of features generated using:
# echo -e "\033[1;32mAll unique features across workspace:\033[0m" && cargo metadata --format-version=1 --no-deps | jq -r '.packages[].features | to_entries[] | .key' | sort -u | sed 's/^/• /'
cargo clippy --all-targets --all --tests --features "aggregation bench-metrics bls12_381 bn254 default entrypoint evm-prove evm-verify export-getrandom export-libm function-span getrandom halo2-compiler halo2curves heap-embedded-alloc k256 jemalloc jemalloc-prof nightly-features panic-handler parallel rust-runtime static-verifier std test-utils unstable" -- -D warnings
# list of all unique features across workspace generated using:
# cargo metadata --format-version=1 --no-deps | jq -r '.packages[].features | to_entries[] | .key' | sort -u | tr '\n' ' ' && echo ""
# (exclude mimalloc since it conflicts with jemalloc)
cargo clippy --all-targets --all --tests --features "aggregation bench-metrics bls12_381 bn254 build-binaries default entrypoint evm-prove evm-verify export-intrinsics export-libm function-span getrandom-unsupported halo2-compiler halo2curves heap-embedded-alloc jemalloc jemalloc-prof k256 nightly-features p256 panic-handler parallel profiling rust-runtime static-verifier std test-utils" -- -D warnings
cargo clippy --all-targets --all --tests --no-default-features --features "mimalloc" -- -D warnings

- name: Run fmt, clippy for guest
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changelog

## v1.1.2 (2025-05-08)

- The solidity verifier contract no longer has any awareness of the OpenVM patch version. `{MAJOR_VERSION}.{MINOR_VERSION}` is the minimum information necessary to identify the verifier contract since any verifier contract changes will be accompanied by a minor version bump.

## v1.1.1 (2025-05-03)

- Adds `OpenVmHalo2Verifier` generation to the SDK which is a thin wrapper around the original `Halo2Verifier` contract exposing a more user-friendly interface.
- Updates the CLI to generate the new `OpenVmHalo2Verifier` contract during `cargo openvm setup`.
- Removes the ability to generate the old `Halo2Verifier` contract from the SDK and CLI.
- Changes the `EvmProof` struct to align with the interface of the `OpenVmHalo2Verifier` contract.
- Formats the verifier contract during generation for better readability on block explorers.
- For verifier contract compilation, explicitly sets the `solc` config via standard-json input for metadata consistency.

## v1.1.0 (2025-05-02)

### Security Fixes
- Fixes security vulnerability [OpenVM allows the byte decomposition of pc in AUIPC chip to overflow](https://github.com/advisories/GHSA-jf2r-x3j4-23m7)
30 changes: 27 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ members = [
"extensions/pairing/transpiler",
"extensions/pairing/guest",
"extensions/pairing/tests",
"guest-libs/verify_stark/guest",
]
exclude = ["crates/sdk/example"]
resolver = "2"
Expand Down Expand Up @@ -140,6 +141,7 @@ openvm-native-circuit = { path = "extensions/native/circuit", default-features =
openvm-native-compiler = { path = "extensions/native/compiler", default-features = false }
openvm-native-compiler-derive = { path = "extensions/native/compiler/derive", default-features = false }
openvm-native-recursion = { path = "extensions/native/recursion", default-features = false }
openvm-native-transpiler = { path = "extensions/native/transpiler", default-features = false }
openvm-keccak256-circuit = { path = "extensions/keccak256/circuit", default-features = false }
openvm-keccak256-transpiler = { path = "extensions/keccak256/transpiler", default-features = false }
openvm-keccak256-guest = { path = "extensions/keccak256/guest", default-features = false }
Expand All @@ -161,6 +163,7 @@ openvm-ecc-sw-macros = { path = "extensions/ecc/sw-macros", default-features = f
openvm-pairing-circuit = { path = "extensions/pairing/circuit", default-features = false }
openvm-pairing-transpiler = { path = "extensions/pairing/transpiler", default-features = false }
openvm-pairing-guest = { path = "extensions/pairing/guest", default-features = false }
openvm-verify-stark = { path = "guest-libs/verify_stark/guest", default-features = false }

# Benchmarking
openvm-benchmarks-utils = { path = "benchmarks/utils", default-features = false }
Expand Down
3 changes: 0 additions & 3 deletions benchmarks/guest/ecrecover/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ openvm_ecc_guest::sw_macros::sw_init! {
}

pub fn main() {
setup_all_moduli();
setup_all_curves();

let expected_address = read_vec();
for _ in 0..5 {
let input = read_vec();
Expand Down
6 changes: 2 additions & 4 deletions benchmarks/guest/kitchen-sink/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ openvm_algebra_guest::complex_macros::complex_init! {
}

pub fn main() {
// Setup will materialize every chip
setup_all_moduli();
setup_all_complex_extensions();
setup_all_curves();
// TODO: Since we don't explicitly call setup functions anymore, we should rewrite this test
// to use every declared modulus and curve to ensure that every chip is materialized.

let [one, six] = [1, 6].map(Seven::from_u32);
assert_eq!(one + six, Seven::ZERO);
Expand Down
5 changes: 0 additions & 5 deletions benchmarks/guest/pairing/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ openvm_algebra_guest::complex_macros::complex_init! {
const PAIR_ELEMENT_LEN: usize = 32 * (2 + 4); // 1 G1Affine (2 Fp), 1 G2Affine (4 Fp)

pub fn main() {
setup_all_moduli();
setup_all_complex_extensions();
// Pairing doesn't need G1Affine intrinsics, but we trigger it anyways to test the chips
setup_all_curves();

// copied from https://github.com/bluealloy/revm/blob/9e39df5dbc5fdc98779c644629b28b8bee75794a/crates/precompile/src/bn128.rs#L395
let input = hex::decode(
"\
Expand Down
12 changes: 11 additions & 1 deletion benchmarks/prove/src/bin/ecrecover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use openvm_algebra_circuit::{
use openvm_algebra_transpiler::ModularTranspilerExtension;
use openvm_benchmarks_prove::util::BenchmarkCli;
use openvm_circuit::{
arch::{instructions::exe::VmExe, SystemConfig},
arch::{instructions::exe::VmExe, InitFileGenerator, SystemConfig},
derive::VmConfig,
};
use openvm_ecc_circuit::{
Expand Down Expand Up @@ -66,6 +66,16 @@ pub struct Rv32ImEcRecoverConfig {
pub weierstrass: WeierstrassExtension,
}

impl InitFileGenerator for Rv32ImEcRecoverConfig {
fn generate_init_file_contents(&self) -> Option<String> {
Some(format!(
"// This file is automatically generated by cargo openvm. Do not rename or edit.\n{}\n{}\n",
self.modular.generate_moduli_init(),
self.weierstrass.generate_sw_init()
))
}
}

impl Rv32ImEcRecoverConfig {
pub fn for_curves(curves: Vec<CurveConfig>) -> Self {
let primes: Vec<BigUint> = curves
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/prove/src/bin/fib_e2e.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{path::PathBuf, sync::Arc};
use clap::Parser;
use eyre::Result;
use openvm_benchmarks_prove::util::BenchmarkCli;
use openvm_circuit::arch::instructions::{exe::VmExe, program::DEFAULT_MAX_NUM_PUBLIC_VALUES};
use openvm_circuit::arch::{instructions::exe::VmExe, DEFAULT_MAX_NUM_PUBLIC_VALUES};
use openvm_native_recursion::halo2::utils::{CacheHalo2ParamsReader, DEFAULT_PARAMS_DIR};
use openvm_rv32im_circuit::Rv32ImConfig;
use openvm_rv32im_transpiler::{
Expand Down
13 changes: 11 additions & 2 deletions benchmarks/prove/src/bin/kitchen_sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ use openvm_circuit::arch::{instructions::exe::VmExe, SystemConfig};
use openvm_ecc_circuit::{WeierstrassExtension, P256_CONFIG, SECP256K1_CONFIG};
use openvm_native_recursion::halo2::utils::{CacheHalo2ParamsReader, DEFAULT_PARAMS_DIR};
use openvm_pairing_circuit::{PairingCurve, PairingExtension};
use openvm_pairing_guest::{
bls12_381::BLS12_381_COMPLEX_STRUCT_NAME, bn254::BN254_COMPLEX_STRUCT_NAME,
};
use openvm_sdk::{
commit::commit_app_exe, config::SdkVmConfig, prover::EvmHalo2Prover,
DefaultStaticVerifierPvHandler, Sdk, StdIn,
Expand Down Expand Up @@ -46,8 +49,14 @@ fn main() -> Result<()> {
BigUint::from(7u32),
]))
.fp2(Fp2Extension::new(vec![
bn_config.modulus.clone(),
bls_config.modulus.clone(),
(
BN254_COMPLEX_STRUCT_NAME.to_string(),
bn_config.modulus.clone(),
),
(
BLS12_381_COMPLEX_STRUCT_NAME.to_string(),
bls_config.modulus.clone(),
),
]))
.ecc(WeierstrassExtension::new(vec![
SECP256K1_CONFIG.clone(),
Expand Down
7 changes: 5 additions & 2 deletions benchmarks/prove/src/bin/pairing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use openvm_benchmarks_prove::util::BenchmarkCli;
use openvm_circuit::arch::SystemConfig;
use openvm_ecc_circuit::WeierstrassExtension;
use openvm_pairing_circuit::{PairingCurve, PairingExtension};
use openvm_pairing_guest::bn254::{BN254_MODULUS, BN254_ORDER};
use openvm_pairing_guest::bn254::{BN254_COMPLEX_STRUCT_NAME, BN254_MODULUS, BN254_ORDER};
use openvm_sdk::{config::SdkVmConfig, Sdk, StdIn};
use openvm_stark_sdk::bench::run_with_metric_collection;

Expand All @@ -23,7 +23,10 @@ fn main() -> Result<()> {
BN254_MODULUS.clone(),
BN254_ORDER.clone(),
]))
.fp2(Fp2Extension::new(vec![BN254_MODULUS.clone()]))
.fp2(Fp2Extension::new(vec![(
BN254_COMPLEX_STRUCT_NAME.to_string(),
BN254_MODULUS.clone(),
)]))
.ecc(WeierstrassExtension::new(vec![
PairingCurve::Bn254.curve_config()
]))
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/prove/src/bin/verify_fibair.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use clap::Parser;
use eyre::Result;
use openvm_benchmarks_prove::util::BenchmarkCli;
use openvm_circuit::arch::instructions::program::DEFAULT_MAX_NUM_PUBLIC_VALUES;
use openvm_circuit::arch::DEFAULT_MAX_NUM_PUBLIC_VALUES;
use openvm_native_circuit::NativeConfig;
use openvm_native_compiler::conversion::CompilerOptions;
use openvm_native_recursion::testing_utils::inner::build_verification_program;
Expand Down
Loading
Loading