Skip to content

Commit f77f55c

Browse files
committed
Merge branch 'cleaning'
2 parents 011b1f9 + 95b6b7a commit f77f55c

File tree

89 files changed

+4432
-4882
lines changed

Some content is hidden

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

89 files changed

+4432
-4882
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ edition = "2024"
1010
[workspace]
1111
members = [
1212
"crates/*",
13-
"crates/lean_prover/vm_air",
1413
"crates/lean_prover/witness_generation",
1514
]
1615

@@ -54,12 +53,11 @@ lean_compiler = { path = "crates/lean_compiler" }
5453
lean_prover = { path = "crates/lean_prover" }
5554
rec_aggregation = { path = "crates/rec_aggregation" }
5655
witness_generation = { path = "crates/lean_prover/witness_generation" }
57-
vm_air = { path = "crates/lean_prover/vm_air" }
5856
poseidon_circuit = { path = "crates/poseidon_circuit" }
5957

6058
# External
6159
thiserror = "2.0"
62-
clap = { version = "4.3.10", features = ["derive"] }
60+
clap = { version = "4.5.52", features = ["derive"] }
6361
rand = "0.9.2"
6462
sha3 = "0.10.8"
6563
derive_more = { version = "2.0.1", features = ["full"] }
@@ -68,15 +66,15 @@ pest_derive = "2.7"
6866
itertools = "0.10.5"
6967
colored = "3.0.0"
7068
tracing = "0.1.26"
71-
serde_json = "*"
69+
serde_json = "1.0.145"
70+
num_enum = "0.7.5"
7271
tracing-subscriber = { version = "0.3.19", features = ["std", "env-filter"] }
73-
tracing-forest = { version = "0.2.0", features = ["ansi", "smallvec"] }
72+
tracing-forest = { version = "0.3.0", features = ["ansi", "smallvec"] }
7473
p3-koala-bear = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "modular-precompiles" }
7574
p3-baby-bear = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "modular-precompiles" }
7675
p3-poseidon2 = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "modular-precompiles" }
7776
p3-symmetric = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "modular-precompiles" }
7877
p3-air = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "modular-precompiles" }
79-
p3-uni-stark = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "modular-precompiles" }
8078
p3-goldilocks = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "modular-precompiles" }
8179
p3-challenger = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "modular-precompiles" }
8280
p3-util = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "modular-precompiles" }
@@ -96,19 +94,23 @@ poseidon_circuit.workspace = true
9694
# p3-poseidon2 = { path = "../zk/Plonky3/poseidon2" }
9795
# p3-symmetric = { path = "../zk/Plonky3/symmetric" }
9896
# p3-air = { path = "../zk/Plonky3/air" }
99-
# p3-uni-stark = { path = "../zk/Plonky3/uni-stark" }
10097
# p3-merkle-tree = { path = "../zk/Plonky3/merkle-tree" }
10198
# p3-commit = { path = "../zk/Plonky3/commit" }
10299
# p3-matrix = { path = "../zk/Plonky3/matrix" }
103100
# p3-dft = { path = "../zk/Plonky3/dft" }
104101
# p3-challenger = { path = "../zk/Plonky3/challenger" }
105102
# p3-monty-31 = { path = "../zk/Plonky3/monty-31" }
103+
# p3-maybe-rayon = { path = "../zk/Plonky3/maybe-rayon" }
104+
# p3-util = { path = "../zk/Plonky3/util" }
106105

107106
# [patch."https://github.com/TomWambsgans/whir-p3.git"]
108107
# whir-p3 = { path = "../zk/whir/fork-whir-p3" }
109108

110109
# [patch."https://github.com/leanEthereum/multilinear-toolkit.git"]
111110
# multilinear-toolkit = { path = "../zk/multilinear-toolkit" }
112111

112+
# [profile.release]
113+
# opt-level = 1
114+
113115
[profile.release]
114116
lto = "thin"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ RUSTFLAGS='-C target-cpu=native' cargo run --release -- xmss --n-signatures 990
6161
n = 2,000,000
6262

6363
```
64-
RUSTFLAGS='-C target-cpu=native' cargo test --release --package lean_prover --test test_zkvm -- --nocapture -- test_prove_fibonacci --exact --nocapture
64+
FIB_N=2000000 RUSTFLAGS='-C target-cpu=native' cargo test --release --package lean_prover --test test_zkvm -- --nocapture -- test_prove_fibonacci --exact --nocapture
6565
```
6666

6767
Proving time:

TODO.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
- Opti WHIR: in sumcheck we know more than f(0) + f(1), we know f(0) and f(1)
2727
- Opti WHIR https://github.com/tcoratger/whir-p3/issues/303 and https://github.com/tcoratger/whir-p3/issues/306
2828
- Avoid committing to the 3 index columns, and replace it by a sumcheck? Using this idea, we would only commit to PC and FP for the execution table. Idea by Georg (Powdr). Do we even need to commit to FP then?
29+
- Avoid the embedding overhead in logup, when denominators = "c - index", as it was previously done
2930

3031
- About the ordering of the variables in sumchecks, currently we do as follows:
3132

@@ -97,8 +98,6 @@ Fiat Shamir: add a claim tracing feature, to ensure all the claims are indeed ch
9798
- bounddary condition on dot_product table: first flag = 1
9899
- verify correctness of the Grand Product check
99100
- Proof size: replace all equality checks in the verifier algo by value deduction
100-
- WIR recursion: batch the multilinear_eval calls on initial merkle leaves
101-
- multilinear_eval precompile: we can reduce the number of sparse equality constraints required to verify the correctness of point / res into the memory
102101

103102
- KoalaBear extension of degree 5: the current implem (in a fork of Plonky3) has not been been optimized
104103
- KoalaBear extension of degree 6: in order to use the (proven) Johnson bound in WHIR

crates/air/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ workspace = true
1010
tracing.workspace = true
1111
utils.workspace = true
1212
p3-air.workspace = true
13-
p3-uni-stark.workspace = true
1413
p3-util.workspace = true
1514
multilinear-toolkit.workspace = true
1615

crates/air/src/lib.rs

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,11 @@
11
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
22

3-
use ::utils::ConstraintChecker;
4-
use multilinear_toolkit::prelude::*;
5-
use p3_air::Air;
6-
use p3_uni_stark::SymbolicAirBuilder;
7-
83
mod prove;
9-
mod table;
104
mod uni_skip_utils;
115
mod utils;
6+
mod validity_check;
127
mod verify;
138

149
pub use prove::*;
15-
pub use table::*;
10+
pub use validity_check::*;
1611
pub use verify::*;
17-
18-
#[cfg(test)]
19-
pub mod tests;
20-
21-
pub trait MyAir<EF: ExtensionField<PF<EF>>>:
22-
Air<SymbolicAirBuilder<PF<EF>>>
23-
+ for<'a> Air<ConstraintFolder<'a, PF<EF>, EF>>
24-
+ for<'a> Air<ConstraintFolder<'a, EF, EF>>
25-
+ for<'a> Air<ConstraintChecker<'a, PF<EF>, EF>>
26-
+ for<'a> Air<ConstraintChecker<'a, EF, EF>>
27-
+ for<'a> Air<ConstraintFolderPackedBase<'a, EF>>
28-
+ for<'a> Air<ConstraintFolderPackedExtension<'a, EF>>
29-
{
30-
}
31-
32-
impl<EF, A> MyAir<EF> for A
33-
where
34-
EF: ExtensionField<PF<EF>>,
35-
A: Air<SymbolicAirBuilder<PF<EF>>>
36-
+ for<'a> Air<ConstraintFolder<'a, PF<EF>, EF>>
37-
+ for<'a> Air<ConstraintFolder<'a, EF, EF>>
38-
+ for<'a> Air<ConstraintChecker<'a, PF<EF>, EF>>
39-
+ for<'a> Air<ConstraintChecker<'a, EF, EF>>
40-
+ for<'a> Air<ConstraintFolderPackedBase<'a, EF>>
41-
+ for<'a> Air<ConstraintFolderPackedExtension<'a, EF>>,
42-
{
43-
}

0 commit comments

Comments
 (0)