Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
88 changes: 29 additions & 59 deletions Cargo.lock

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

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ p3-goldilocks = { git = "https://github.com/TomWambsgans/Plonky3.git", branch =
p3-util = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }
p3-monty-31 = { git = "https://github.com/TomWambsgans/Plonky3.git", branch = "lean-multisig" }

whir-p3 = { git = "https://github.com/TomWambsgans/whir-p3", branch = "lean-multisig" }
multilinear-toolkit = { git = "https://github.com/leanEthereum/multilinear-toolkit.git" }

[dependencies]
clap.workspace = true
rec_aggregation.workspace = true
Expand All @@ -91,7 +91,6 @@ utils.workspace = true
p3-koala-bear.workspace = true
lean_vm.workspace = true
multilinear-toolkit.workspace = true
whir-p3.workspace = true

[profile.release]
lto = "thin"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ To reproduce:

### Proof size

WHIR intial rate = 1/4. Proof size ≈ 380 KiB. TODO: Merkle pruning + WHIR batch opening -> 256 KiB. (To go below 256 KiB -> rate 1/8 or 1/16 in the final recursion).
WHIR intial rate = 1/4. Proof size ≈ 325 KiB. TODO: WHIR batch opening + [2024/108](https://eprint.iacr.org/2024/108.pdf) section 3.1 -> close to 256 KiB. (To go below 256 KiB -> rate 1/8 or 1/16 in the final recursion).

## Credits

Expand Down
1 change: 0 additions & 1 deletion crates/lean_compiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ p3-poseidon2.workspace = true
p3-koala-bear.workspace = true
p3-symmetric.workspace = true
p3-util.workspace = true
whir-p3.workspace = true
tracing.workspace = true
air.workspace = true
sub_protocols.workspace = true
Expand Down
1 change: 0 additions & 1 deletion crates/lean_prover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ p3-poseidon2.workspace = true
p3-koala-bear.workspace = true
p3-symmetric.workspace = true
p3-util.workspace = true
whir-p3.workspace = true
tracing.workspace = true
air.workspace = true
sub_protocols.workspace = true
Expand Down
1 change: 0 additions & 1 deletion crates/lean_prover/src/common.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::*;
use lean_vm::*;
use multilinear_toolkit::prelude::*;

pub(crate) fn fold_bytecode(bytecode: &Bytecode, folding_challenges: &MultilinearPoint<EF>) -> Vec<EF> {
let encoded_bytecode = padd_with_zero_to_next_power_of_two(
Expand Down
2 changes: 1 addition & 1 deletion crates/lean_prover/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#![cfg_attr(not(test), allow(unused_crate_dependencies))]

use lean_vm::{EF, F};
use multilinear_toolkit::prelude::*;
use utils::*;

use lean_vm::execute_bytecode;
use whir_p3::{FoldingFactor, SecurityAssumption, WhirConfigBuilder};
use witness_generation::*;

mod common;
Expand Down
6 changes: 2 additions & 4 deletions crates/lean_prover/src/prove_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ use crate::common::*;
use crate::*;
use air::prove_air;
use lean_vm::*;
use multilinear_toolkit::prelude::*;

use p3_util::log2_ceil_usize;
use sub_protocols::*;
use tracing::info_span;
use utils::{build_prover_state, padd_with_zero_to_next_power_of_two};
use whir_p3::{SparseStatement, SparseValue, WhirConfig};
use xmss::Poseidon16History;

#[derive(Debug)]
Expand Down Expand Up @@ -219,9 +217,9 @@ pub fn prove_execution(
bytecode_pushforward_commitment,
&bytecode_pushforward.by_ref(),
);
let proof_size_fe = prover_state.proof_size_fe();
let proof_size_fe = prover_state.pruned_proof().proof_size_fe();
ExecutionProof {
proof: prover_state.into_proof(),
proof: prover_state.raw_proof(),
proof_size_fe,
exec_summary,
first_whir_n_vars,
Expand Down
2 changes: 0 additions & 2 deletions crates/lean_prover/src/verify_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ use crate::*;
use crate::{SnarkParams, common::*};
use air::verify_air;
use lean_vm::*;
use multilinear_toolkit::prelude::*;
use p3_util::{log2_ceil_usize, log2_strict_usize};
use sub_protocols::verify_logup_star;
use sub_protocols::*;
use utils::ToUsize;
use whir_p3::{SparseStatement, SparseValue, WhirConfig};

#[derive(Debug, Clone)]
pub struct ProofVerificationDetails {
Expand Down
1 change: 0 additions & 1 deletion crates/lean_prover/witness_generation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ p3-poseidon2.workspace = true
p3-koala-bear.workspace = true
p3-symmetric.workspace = true
p3-util.workspace = true
whir-p3.workspace = true
tracing.workspace = true
air.workspace = true
sub_protocols.workspace = true
Expand Down
1 change: 0 additions & 1 deletion crates/lean_vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ p3-poseidon2.workspace = true
p3-koala-bear.workspace = true
p3-symmetric.workspace = true
p3-util.workspace = true
whir-p3.workspace = true
tracing.workspace = true
air.workspace = true
thiserror.workspace = true
Expand Down
1 change: 0 additions & 1 deletion crates/rec_aggregation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ p3-poseidon2.workspace = true
p3-koala-bear.workspace = true
p3-symmetric.workspace = true
p3-util.workspace = true
whir-p3.workspace = true
tracing.workspace = true
air.workspace = true
sub_protocols.workspace = true
Expand Down
Loading