Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
2990c20
Merkle precompile
TomWambsgans Nov 24, 2025
d177bce
Merge branch 'better_xmss' into modular_precompiles
TomWambsgans Nov 26, 2025
e7cb50e
remove 8 columns from Merkle table (at the cost of not supporting hei…
TomWambsgans Nov 26, 2025
e0f5746
missing constraint
TomWambsgans Nov 26, 2025
13b28bd
SliceHash precompile
TomWambsgans Nov 26, 2025
2d48baf
naming
TomWambsgans Nov 26, 2025
ec4fe58
missing use of dot_product_be in recursion program
TomWambsgans Nov 26, 2025
81d6f23
fix
TomWambsgans Nov 26, 2025
c8cc114
EqPolyBaseExt Precompile
TomWambsgans Nov 26, 2025
9462d22
prepare "table on demand"
TomWambsgans Nov 27, 2025
41f0517
deactivate unused tables at runtime
TomWambsgans Nov 27, 2025
657d18b
wip
TomWambsgans Nov 27, 2025
c54efb9
Poseidon16 "core" table
TomWambsgans Nov 27, 2025
db2fb16
Poseidon24 "core" table
TomWambsgans Nov 27, 2025
da6611b
finally connect together the buses to poseidon core tables
TomWambsgans Nov 27, 2025
559c165
better recursion program
TomWambsgans Nov 27, 2025
51a94fb
w
TomWambsgans Nov 27, 2025
13db241
wip
TomWambsgans Nov 27, 2025
0ade96e
improve xmss guest program
TomWambsgans Nov 27, 2025
8ab0af4
magic number
TomWambsgans Nov 27, 2025
ffc4b61
multiple WHIR recursions proved together
TomWambsgans Nov 28, 2025
d822c06
remove CounterHint
TomWambsgans Nov 28, 2025
0b0810f
new hint: private_input_start
TomWambsgans Nov 28, 2025
f2ea57a
repeated whir proofs in memory for more realistic benchmark
TomWambsgans Nov 28, 2025
b3db6c2
no rayon on small instances in multilinear-toolkit
TomWambsgans Nov 29, 2025
08a6509
degree 2 in DotProduct table
TomWambsgans Dec 1, 2025
59921b6
PARALLEL_THRESHOLD = 512
TomWambsgans Dec 2, 2025
ec8a763
fix
TomWambsgans Dec 3, 2025
4392184
small fix
TomWambsgans Dec 4, 2025
ecd32db
deps
TomWambsgans Dec 4, 2025
84a059b
deps
TomWambsgans Dec 4, 2025
c70dc2d
update readme
TomWambsgans Dec 4, 2025
3b7eee3
clippy
TomWambsgans Dec 4, 2025
8fd2d2f
Merge branch 'main' into modular_precompiles
TomWambsgans Dec 4, 2025
060387b
fix readme
TomWambsgans Dec 4, 2025
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
89 changes: 59 additions & 30 deletions Cargo.lock

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

33 changes: 18 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,13 @@ itertools = "0.14.0"
colored = "3.0.0"
tracing = "0.1.26"
serde_json = "1.0.145"
serde = { version = "1.0.228", features = ["derive"] }
bincode = "1.3.3"
num_enum = "0.7.5"
tracing-subscriber = { version = "0.3.19", features = ["std", "env-filter"] }
tracing-forest = { version = "0.3.0", features = ["ansi", "smallvec"] }
p3-koala-bear = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }
p3-baby-bear = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }
p3-poseidon2 = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }
p3-symmetric = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }
p3-air = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }
Expand All @@ -92,25 +95,25 @@ multilinear-toolkit.workspace = true
whir-p3.workspace = true

# [patch."https://github.com/TomWambsgans/Plonky3.git"]
# p3-koala-bear = { path = "../zk/Plonky3/koala-bear" }
# p3-field = { path = "../zk/Plonky3/field" }
# p3-poseidon2 = { path = "../zk/Plonky3/poseidon2" }
# p3-symmetric = { path = "../zk/Plonky3/symmetric" }
# p3-air = { path = "../zk/Plonky3/air" }
# p3-merkle-tree = { path = "../zk/Plonky3/merkle-tree" }
# p3-commit = { path = "../zk/Plonky3/commit" }
# p3-matrix = { path = "../zk/Plonky3/matrix" }
# p3-dft = { path = "../zk/Plonky3/dft" }
# p3-challenger = { path = "../zk/Plonky3/challenger" }
# p3-monty-31 = { path = "../zk/Plonky3/monty-31" }
# p3-maybe-rayon = { path = "../zk/Plonky3/maybe-rayon" }
# p3-util = { path = "../zk/Plonky3/util" }
# p3-koala-bear = { path = "../Plonky3/koala-bear" }
# p3-field = { path = "../Plonky3/field" }
# p3-poseidon2 = { path = "../Plonky3/poseidon2" }
# p3-symmetric = { path = "../Plonky3/symmetric" }
# p3-air = { path = "../Plonky3/air" }
# p3-merkle-tree = { path = "../Plonky3/merkle-tree" }
# p3-commit = { path = "../Plonky3/commit" }
# p3-matrix = { path = "../Plonky3/matrix" }
# p3-dft = { path = "../Plonky3/dft" }
# p3-challenger = { path = "../Plonky3/challenger" }
# p3-monty-31 = { path = "../Plonky3/monty-31" }
# p3-maybe-rayon = { path = "../Plonky3/maybe-rayon" }
# p3-util = { path = "../Plonky3/util" }

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

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

# [profile.release]
# opt-level = 1
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

XMSS + minimal [zkVM](minimal_zkVM.pdf) = lightweight PQ signatures, with unbounded aggregation

## Status

- branch [main](https://github.com/leanEthereum/leanMultisig): optimized for **prover efficiency**
- branch [lean-vm-simple](https://github.com/leanEthereum/leanMultisig/tree/lean-vm-simple): optimized for **simplicity**

Both versions will eventually merge into one.

## Proving System

Expand Down Expand Up @@ -38,15 +44,17 @@ RUSTFLAGS='-C target-cpu=native' cargo run --release -- poseidon --log-n-perms 2
The full recursion program is not finished yet. Instead, we prove validity of a WHIR opening, with 25 variables, and rate = 1/4.

```console
RUSTFLAGS='-C target-cpu=native' cargo run --release -- recursion
RUSTFLAGS='-C target-cpu=native' cargo run --release -- recursion --count 8
```

![Alt text](docs/benchmark_graphs/graphs/recursive_whir_opening.svg)

Detail: before 4 December 2025, only 1 WHIR opening was benchmarked. Starting from now, we prove a dozen of openings together (to be closer to the n-to-1 aggregation scenario) and we report the proving time / WHIR.

### XMSS aggregation

```console
RUSTFLAGS='-C target-cpu=native' cargo run --release -- xmss --n-signatures 1000
RUSTFLAGS='-C target-cpu=native' cargo run --release -- xmss --n-signatures 1775
```

[Trivial encoding](docs/XMSS_trivial_encoding.pdf) (for now).
Expand Down
10 changes: 10 additions & 0 deletions crates/air/src/prove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ where
"TODO handle the case UNIVARIATE_SKIPS >= log_length"
);

// crate::check_air_validity(
// air,
// &extra_data,
// &columns_f,
// &columns_ef,
// last_row_shifted_f,
// last_row_shifted_ef,
// )
// .unwrap();

let alpha = prover_state.sample(); // random challenge for batching constraints

*extra_data.alpha_powers_mut() = alpha
Expand Down
2 changes: 1 addition & 1 deletion crates/air/tests/complex_air.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ fn test_air_helper<const VIRTUAL_COLUMN: bool>() {
virtual_column_statement_prover,
true,
);
let mut verifier_state = build_verifier_state(&prover_state);
let mut verifier_state = build_verifier_state(prover_state);

let virtual_column_statement_verifier = if VIRTUAL_COLUMN {
let virtual_column_evaluation_point =
Expand Down
2 changes: 1 addition & 1 deletion crates/air/tests/fib_air.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ fn test_air_fibonacci() {
None,
true,
);
let mut verifier_state = build_verifier_state(&prover_state);
let mut verifier_state = build_verifier_state(prover_state);

let (point_verifier, evaluations_remaining_to_verify_f, evaluations_remaining_to_verify_ef) = verify_air(
&mut verifier_state,
Expand Down
Loading