Skip to content

Commit bfde85a

Browse files
authored
Simpler and faster (#89)
* wip * wip * wip * wip * gud * wip * wip * wip * wip * wip * wip * PackedLookup works * rename crate "packed_pcs" to "sub_protocols" * make subprotocol explicit: commit_extension_from_base * naming * wip * wip * normal packed lookup works * bellissimo * wip * simplify dependencies * clippy * replace branch by mul * wip * bellissimo * par_iter for inner evals in open_structured_columns * redundant evaluation * test_matrix_down_folded * remove dead code * still test_matrix_down_folded * wip * AIR: include the last transition (using padding "default" values) * bellissimo * better PrecompileFootprint * pave the way: univariate skip in GKR grand product * bellissimo: batch together the evaluation of the virtual column for GKR grand product (execution table) with the AIR transition check * simplify instruction encoding for precompiles * bellissimo: remove sumcheck to evaluate virtual column in DOT_PRODUCT table (for GKR grand product) * remove mod precompiles * benchmarks --------- Co-authored-by: Tom Wambsgans <[email protected]>
1 parent 8929f7d commit bfde85a

File tree

88 files changed

+4088
-3479
lines changed

Some content is hidden

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

88 files changed

+4088
-3479
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "lean-multisig"
2+
name = "modular-precompiles"
33
version.workspace = true
44
edition.workspace = true
55

@@ -8,7 +8,11 @@ version = "0.1.0"
88
edition = "2024"
99

1010
[workspace]
11-
members = ["crates/*", "crates/lean_prover/vm_air", "crates/lean_prover/witness_generation"]
11+
members = [
12+
"crates/*",
13+
"crates/lean_prover/vm_air",
14+
"crates/lean_prover/witness_generation",
15+
]
1216

1317
[workspace.lints]
1418
rust.missing_debug_implementations = "warn"
@@ -44,7 +48,7 @@ air = { path = "crates/air" }
4448
utils = { path = "crates/utils" }
4549
lean_vm = { path = "crates/lean_vm" }
4650
xmss = { path = "crates/xmss" }
47-
packed_pcs = { path = "crates/packed_pcs" }
51+
sub_protocols = { path = "crates/sub_protocols" }
4852
lookup = { path = "crates/lookup" }
4953
lean_compiler = { path = "crates/lean_compiler" }
5054
lean_prover = { path = "crates/lean_prover" }
@@ -58,32 +62,28 @@ thiserror = "2.0"
5862
clap = { version = "4.3.10", features = ["derive"] }
5963
rand = "0.9.2"
6064
sha3 = "0.10.8"
61-
rayon = "1.5.1"
6265
derive_more = { version = "2.0.1", features = ["full"] }
6366
pest = "2.7"
6467
pest_derive = "2.7"
68+
itertools = "0.10.5"
6569
colored = "3.0.0"
6670
tracing = "0.1.26"
6771
serde_json = "*"
6872
tracing-subscriber = { version = "0.3.19", features = ["std", "env-filter"] }
6973
tracing-forest = { version = "0.2.0", features = ["ansi", "smallvec"] }
70-
p3-koala-bear = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }
71-
p3-baby-bear = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }
72-
p3-field = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }
73-
p3-poseidon2 = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }
74-
p3-matrix = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }
75-
p3-blake3 = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }
76-
p3-symmetric = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }
77-
p3-air = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }
78-
p3-uni-stark = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }
79-
p3-poseidon2-air = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }
80-
p3-goldilocks = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }
81-
p3-challenger = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }
82-
p3-util = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }
83-
p3-monty-31 = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }
74+
p3-koala-bear = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "modular-precompiles" }
75+
p3-baby-bear = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "modular-precompiles" }
76+
p3-poseidon2 = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "modular-precompiles" }
77+
p3-symmetric = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "modular-precompiles" }
78+
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" }
80+
p3-goldilocks = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "modular-precompiles" }
81+
p3-challenger = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "modular-precompiles" }
82+
p3-util = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "modular-precompiles" }
83+
p3-monty-31 = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "modular-precompiles" }
8484

85-
whir-p3 = { git = "https://github.com/TomWambsgans/whir-p3", branch = "lean-multisig" }
86-
multilinear-toolkit = { git = "https://github.com/leanEthereum/multilinear-toolkit.git" }
85+
whir-p3 = { git = "https://github.com/TomWambsgans/whir-p3", branch = "modular-precompiles" }
86+
multilinear-toolkit = { git = "https://github.com/leanEthereum/multilinear-toolkit.git", branch = "modular-precompiles" }
8787

8888
[dependencies]
8989
clap.workspace = true
@@ -94,11 +94,12 @@ poseidon_circuit.workspace = true
9494
# p3-koala-bear = { path = "../zk/Plonky3/koala-bear" }
9595
# p3-field = { path = "../zk/Plonky3/field" }
9696
# p3-poseidon2 = { path = "../zk/Plonky3/poseidon2" }
97-
# p3-matrix = { path = "../zk/Plonky3/matrix" }
9897
# p3-symmetric = { path = "../zk/Plonky3/symmetric" }
9998
# p3-air = { path = "../zk/Plonky3/air" }
10099
# p3-uni-stark = { path = "../zk/Plonky3/uni-stark" }
101-
# p3-poseidon2-air = { path = "../zk/Plonky3/poseidon2-air" }
100+
# p3-merkle-tree = { path = "../zk/Plonky3/merkle-tree" }
101+
# p3-commit = { path = "../zk/Plonky3/commit" }
102+
# p3-matrix = { path = "../zk/Plonky3/matrix" }
102103
# p3-dft = { path = "../zk/Plonky3/dft" }
103104
# p3-challenger = { path = "../zk/Plonky3/challenger" }
104105
# p3-monty-31 = { path = "../zk/Plonky3/monty-31" }

crates/air/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,13 @@ edition.workspace = true
77
workspace = true
88

99
[dependencies]
10-
p3-field.workspace = true
1110
tracing.workspace = true
1211
utils.workspace = true
1312
p3-air.workspace = true
1413
p3-uni-stark.workspace = true
15-
p3-matrix.workspace = true
1614
p3-util.workspace = true
1715
multilinear-toolkit.workspace = true
1816

1917
[dev-dependencies]
2018
p3-koala-bear.workspace = true
21-
p3-matrix.workspace = true
2219
rand.workspace = true

crates/air/src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@
33
use ::utils::ConstraintChecker;
44
use multilinear_toolkit::prelude::*;
55
use p3_air::Air;
6-
use p3_field::ExtensionField;
76
use p3_uni_stark::SymbolicAirBuilder;
87

98
mod prove;
10-
pub mod table;
9+
mod table;
1110
mod uni_skip_utils;
1211
mod utils;
1312
mod verify;
1413

14+
pub use prove::*;
15+
pub use table::*;
16+
pub use verify::*;
17+
1518
#[cfg(test)]
1619
pub mod tests;
1720

0 commit comments

Comments
 (0)