Skip to content

Commit fe1c5a8

Browse files
Schaeffjonathanpwangzlangleymanh9203
authored
Pull upstream main (#7)
* perf: cpu `TraceCommitter` should reserve capacity for LDE (openvm-org#68) * perf: avoid needless clones in permutation trace commit (openvm-org#69) * perf: `transmute_to_base` to avoid needless clones * chore: add note about p3 PR * chore: add debug asserts for safety * feat!: drop main trace earlier for lower peak memory (openvm-org#71) * feat: drop main trace earlier for lower peak memory * fix: trace_metrics * chore: log quotient poly cells (openvm-org#72) * feat: reserve capacity for perm & quotient LDE; avoid copy for quotient split (openvm-org#73) * chore: log quotient poly cells * feat: perm trace reserve extra capacity * feat: quotient no-resize and no-copy * fix: small trace heights * fix: misunderstanding of vertical striding * chore: clarify comment * chore: bump workspace version to `1.0.1` (openvm-org#74) * release: v1.1.0 (openvm-org#76) * feat: update security parameters (openvm-org#20) * chore: update status in readme (openvm-org#21) closes INT-4015 * fix: account for poles in log up security calculation (openvm-org#22) * chore: update readme * fix(plonky3): update plonky3 commit for security fix --------- Co-authored-by: Zach Langley <zblangley@gmail.com> * perf: optimize `compute_quotient_values` (openvm-org#75) * chore: rename keccak example to keccakf * feat: add example to bench compute_quotient and readme * chore: add bench script * chore: update profile script to use perf on linux * feat: `parallelize_chunks` * feat: allocate once per thread * feat: share alpha_powers and avoid `Vec::push` * chore: bump workspace version * feat: Export metrics to Prometheus server (openvm-org#70) * Add metrics exporter * Add tracing context * Fix tokio * Revert "Fix tokio" This reverts commit fdd16a8. * Install crypto provider * Increase interval length * Feature gate * Small fixes * chore: remove unused modules (openvm-org#77) --------- Co-authored-by: Jonathan Wang <31040440+jonathanpwang@users.noreply.github.com> Co-authored-by: Zach Langley <zblangley@gmail.com> Co-authored-by: Manh Dinh <manh9203@gmail.com>
1 parent dc01872 commit fe1c5a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1083
-2668
lines changed

Cargo.toml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace.package]
2-
version = "1.0.0"
2+
version = "1.1.1"
33
edition = "2021"
44
rust-version = "1.83"
55
authors = ["OpenVM contributors"]
@@ -51,35 +51,35 @@ openvm-stark-backend = { path = "crates/stark-backend", default-features = false
5151
openvm-stark-sdk = { path = "crates/stark-sdk", default-features = false }
5252

5353
# Plonky3
54-
p3-air = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
55-
p3-field = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
56-
p3-commit = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
57-
p3-matrix = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
54+
p3-air = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
55+
p3-field = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
56+
p3-commit = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
57+
p3-matrix = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
5858
p3-baby-bear = { git = "https://github.com/Plonky3/Plonky3.git", features = [
5959
"nightly-features",
60-
], rev = "1ba4e5c" }
60+
], rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
6161
p3-koala-bear = { git = "https://github.com/Plonky3/Plonky3.git", features = [
6262
"nightly-features",
63-
], rev = "1ba4e5c" }
64-
p3-util = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
65-
p3-challenger = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
66-
p3-dft = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
67-
p3-fri = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
68-
p3-goldilocks = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
69-
p3-keccak = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
70-
p3-keccak-air = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
71-
p3-blake3 = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
72-
p3-mds = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
73-
p3-merkle-tree = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
74-
p3-monty-31 = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
75-
p3-poseidon = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
76-
p3-poseidon2 = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
77-
p3-symmetric = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
78-
p3-uni-stark = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
79-
p3-maybe-rayon = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" } # the "parallel" feature is NOT on by default to allow single-threaded benchmarking
63+
], rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
64+
p3-util = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
65+
p3-challenger = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
66+
p3-dft = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
67+
p3-fri = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
68+
p3-goldilocks = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
69+
p3-keccak = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
70+
p3-keccak-air = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
71+
p3-blake3 = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
72+
p3-mds = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
73+
p3-merkle-tree = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
74+
p3-monty-31 = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
75+
p3-poseidon = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
76+
p3-poseidon2 = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
77+
p3-symmetric = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
78+
p3-uni-stark = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
79+
p3-maybe-rayon = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" } # the "parallel" feature is NOT on by default to allow single-threaded benchmarking
8080

8181
# Bn254 support
82-
p3-bn254-fr = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
82+
p3-bn254-fr = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }
8383
zkhash = { git = "https://github.com/HorizenLabs/poseidon2.git", rev = "bb476b9" }
8484
ff = { version = "0.13.0", default-features = false }
8585

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The backend is designed to be modular and compatible with different proof system
1414

1515
## Status
1616

17-
As of the v1.0.0 release in March 2025, OpenVM is recommended for production use. OpenVM completed an external [audit](https://github.com/openvm-org/openvm/blob/main/audits/v1-cantina-report.pdf) on [Cantina](https://cantina.xyz/) from January to March 2025 as well as an internal [audit](https://github.com/openvm-org/openvm/blob/main/audits/v1-internal/README.md) by members of the [Axiom](https://axiom.xyz/) team during the same timeframe.
17+
As of June 2025, STARK Backend v1.1.0 and later are recommended for production use. STARK Backend completed an external [audit](https://github.com/openvm-org/openvm/blob/main/audits/v1-cantina-report.pdf) on [Cantina](https://cantina.xyz/) from January to March 2025 as well as an internal [audit](https://github.com/openvm-org/openvm/blob/main/audits/v1-internal/README.md) by members of the [Axiom](https://axiom.xyz/) team during the same timeframe.
1818

1919
## Security
2020

crates/stark-backend/src/engine.rs

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{iter::zip, sync::Arc};
1+
use std::{iter::zip, marker::PhantomData, sync::Arc};
22

33
use itertools::{zip_eq, Itertools};
44
use p3_matrix::Matrix;
@@ -13,7 +13,7 @@ use crate::{
1313
},
1414
proof::Proof,
1515
prover::{
16-
cpu::{CpuBackend, CpuDevice, PcsData},
16+
cpu::PcsData,
1717
hal::{DeviceDataTransporter, TraceCommitter},
1818
types::{
1919
AirProofInput, AirProvingContext, ProofInput, ProvingContext, SingleCommitPreimage,
@@ -57,14 +57,7 @@ pub trait StarkEngine<SC: StarkGenericConfig> {
5757

5858
fn prover<'a>(&'a self) -> MultiTraceStarkProver<'a, SC>
5959
where
60-
Self: 'a,
61-
{
62-
MultiTraceStarkProver::new(
63-
CpuBackend::<SC>::default(),
64-
CpuDevice::new(self.config()),
65-
self.new_challenger(),
66-
)
67-
}
60+
Self: 'a;
6861

6962
fn verifier(&self) -> MultiTraceStarkVerifier<SC> {
7063
MultiTraceStarkVerifier::new(self.config())
@@ -135,16 +128,16 @@ pub trait StarkEngine<SC: StarkGenericConfig> {
135128
}
136129
})
137130
.collect_vec();
138-
let ctx_per_air = zip(proof_input.per_air, &cached_mains_per_air)
131+
let ctx_per_air = zip(proof_input.per_air, cached_mains_per_air)
139132
.map(|((air_id, input), cached_mains)| {
140133
let cached_mains = cached_mains
141-
.iter()
134+
.into_iter()
142135
.map(|(com, preimage)| {
143136
(
144137
com.clone(),
145138
SingleCommitPreimage {
146-
trace: &preimage.trace,
147-
data: &preimage.data,
139+
trace: preimage.trace,
140+
data: preimage.data,
148141
matrix_idx: preimage.matrix_idx,
149142
},
150143
)
@@ -154,6 +147,7 @@ pub trait StarkEngine<SC: StarkGenericConfig> {
154147
cached_mains,
155148
common_main: input.raw.common_main.map(Arc::new),
156149
public_values: input.raw.public_values,
150+
cached_lifetime: PhantomData,
157151
};
158152
(air_id, air_ctx)
159153
})
@@ -162,7 +156,7 @@ pub trait StarkEngine<SC: StarkGenericConfig> {
162156
per_air: ctx_per_air,
163157
};
164158
let mpk_view = backend.transport_pk_to_device(mpk, air_ids);
165-
let proof = Prover::prove(&mut prover, &mpk_view, ctx);
159+
let proof = Prover::prove(&mut prover, mpk_view, ctx);
166160
proof.into()
167161
}
168162

crates/stark-backend/src/gkr/gate.rs

Lines changed: 0 additions & 54 deletions
This file was deleted.

crates/stark-backend/src/gkr/mod.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)