Skip to content

Commit 100691c

Browse files
Merge pull request #471 from worldfnd/perf/first-sumcheck-round-in-base
perf(prover): run the first sumcheck round in the base field
2 parents 04e93d6 + 0b6de00 commit 100691c

8 files changed

Lines changed: 690 additions & 76 deletions

File tree

Cargo.lock

Lines changed: 66 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ chrono = "0.4.41"
123123
# This is a workaround because different package selection based on target does not mix well with workspace dependencies.
124124
divan = "0.1.21"
125125
hex = "0.4.3"
126+
inferno = { version = "0.12", default-features = false }
126127
itertools = "0.14.0"
127128
num-bigint = "0.4"
128129
paste = "1.0.15"
@@ -153,6 +154,7 @@ tokio-util = "0.7.13"
153154
tower = "0.5.2"
154155
tower-http = { version = "0.6.6", features = ["cors", "timeout", "trace"] }
155156
tracing = "0.1.41"
157+
tracing-flame = "0.2"
156158
tracing-subscriber = { version = "0.3.18", features = ["env-filter", "ansi"] }
157159
tracing-tracy = "=0.11.4"
158160
tracy-client = "=0.18.0"

provekit/backend/bn254/src/mavros_prove.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use {
1818
},
1919
provekit_prover::{prove_from_alphas, run_zk_sumcheck_prover, WhirR1CSCommitment},
2020
tracing::instrument,
21-
whir::transcript::ProverState,
21+
whir::{algebra::embedding::Identity, transcript::ProverState},
2222
};
2323

2424
pub trait MavrosR1CSProver {
@@ -53,13 +53,11 @@ impl MavrosR1CSProver for WhirR1CSScheme<Bn254Field> {
5353
.as_ref()
5454
.ok_or_else(|| anyhow::anyhow!("c1 must carry blinding state"))?;
5555

56-
let [a, b, c] = [witgen.out_a, witgen.out_b, witgen.out_c];
5756
// `g` is committed separately in the extension field; open `blinding_eval`
5857
// against the blinding vector (g flattened at offset 0).
5958
let (alpha, blinding_eval) = run_zk_sumcheck_prover(
60-
a,
61-
b,
62-
c,
59+
&Identity::new(),
60+
[witgen.out_a, witgen.out_b, witgen.out_c],
6361
&mut merlin,
6462
self.m_0,
6563
&blinding.polynomial,

0 commit comments

Comments
 (0)